From a956618336161f8addc49e78b95f409aee7fb802 Mon Sep 17 00:00:00 2001 From: Jack Forgash <58153492+forgxyz@users.noreply.github.com> Date: Thu, 19 May 2022 17:53:07 -0600 Subject: [PATCH] AN-1201/tests (#18) * tests * docs * date filter * and * events --- docs/catalog.json | 1 - docs/index.html | 102 ----------------------------- docs/manifest.json | 1 - macros/tests/sequence_gaps.sql | 34 ++++++++++ macros/tests/tx_gaps.sql | 35 ++++++++++ models/gold/gold__blocks.sql | 5 +- models/gold/gold__blocks.yml | 4 ++ models/gold/gold__events.sql | 10 +-- models/gold/gold__transactions.sql | 5 +- models/gold/gold__transactions.yml | 4 ++ models/silver/silver__blocks.yml | 2 +- target/catalog.json | 2 +- target/manifest.json | 2 +- 13 files changed, 92 insertions(+), 115 deletions(-) delete mode 100644 docs/catalog.json delete mode 100644 docs/index.html delete mode 100644 docs/manifest.json create mode 100644 macros/tests/sequence_gaps.sql create mode 100644 macros/tests/tx_gaps.sql diff --git a/docs/catalog.json b/docs/catalog.json deleted file mode 100644 index 9ca21d1..0000000 --- a/docs/catalog.json +++ /dev/null @@ -1 +0,0 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.4", "generated_at": "2022-05-06T01:20:31.639438Z", "invocation_id": "e497bf71-fe2d-454e-bc4a-d21d27da05c0", "env": {}}, "nodes": {"model.flow_models.bronze__transactions": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__transactions"}, "model.flow_models.silver__event_attributes": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENT_ATTRIBUTES", "database": "FLOW_DEV", "comment": "This table cleans and transform attributes from each event in the events table.", "owner": "INTERNAL_DEV"}, "columns": {"ATTRIBUTE_ID": {"type": "TEXT", "index": 1, "name": "ATTRIBUTE_ID", "comment": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "EVENT_ID": {"type": "TEXT", "index": 2, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 3, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "ATTRIBUTE_INDEX": {"type": "NUMBER", "index": 6, "name": "ATTRIBUTE_INDEX", "comment": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "ATTRIBUTE_KEY": {"type": "TEXT", "index": 9, "name": "ATTRIBUTE_KEY", "comment": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "DECODED_ADDRESS": {"type": "TEXT", "index": 10, "name": "DECODED_ADDRESS", "comment": "The decoded address, if applicable, for the attribute_value."}, "ATTRIBUTE_VALUE": {"type": "VARIANT", "index": 11, "name": "ATTRIBUTE_VALUE", "comment": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "ATTRIBUTE_VALUE_ADJ": {"type": "TEXT", "index": 12, "name": "ATTRIBUTE_VALUE_ADJ", "comment": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 13, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 8707379200.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:19UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 83363292.0, "include": true, "description": "An approximate count of rows in this table"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__event_attributes"}, "model.flow_models.silver__transactions": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": "tbd"}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": "Address of the transaction proposer."}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": "Address of the wallet paying for the transaction."}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": "Address(es) authorizing the transaction."}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": "Number of authorizers"}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": "Upper gas limit attached to the transaction."}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": "Outcome of the transaction, including events that were called."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": "tbd"}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 14, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 3196004352.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:18UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 4952325.0, "include": true, "description": "An approximate count of rows in this table"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__transactions"}, "model.flow_models.silver__blocks": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": "The blockchain network the block or transaction occurred on."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": "The number of transactions in the block."}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": "The block hash."}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": "The block hash for the parent block."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 8, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 177213952.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:19UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 1320927.0, "include": true, "description": "An approximate count of rows in this table"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__blocks"}, "model.flow_models.silver__events": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"EVENT_ID": {"type": "TEXT", "index": 1, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 3, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 4, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 5, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "EVENT_INDEX": {"type": "NUMBER", "index": 6, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "EVENT_DATA": {"type": "VARIANT", "index": 9, "name": "EVENT_DATA", "comment": "The raw event data from the event."}, "_EVENT_DATA_TYPE": {"type": "VARIANT", "index": 10, "name": "_EVENT_DATA_TYPE", "comment": "The type object from event_data."}, "_EVENT_DATA_FIELDS": {"type": "VARIANT", "index": 11, "name": "_EVENT_DATA_FIELDS", "comment": "The fields object from the event_data."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 12, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 3634104832.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:18UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 36737983.0, "include": true, "description": "An approximate count of rows in this table"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__events"}, "model.flow_models.bronze__blocks": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "BLOCKS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__blocks"}}, "sources": {"source.flow_models.prod.flow_blocks": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_BLOCKS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "INGESTED_AT", "comment": null}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 471641600.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:20UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 6246505.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_blocks"}, "source.flow_models.prod.flow_txs": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_TXS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "INGESTED_AT", "comment": null}}, "stats": {"bytes": {"id": "bytes", "label": "Approximate Size", "value": 27838913024.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-06 01:19UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 44397130.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_txs"}}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 0c4d0ec..0000000 --- a/docs/index.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - dbt Docs - - - - - - - - - - - - - - - - - -
icons
-
- - diff --git a/docs/manifest.json b/docs/manifest.json deleted file mode 100644 index 85c28d8..0000000 --- a/docs/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.4", "generated_at": "2022-05-06T01:20:13.746098Z", "invocation_id": "e497bf71-fe2d-454e-bc4a-d21d27da05c0", "env": {}, "project_id": "208886b48445c6c994c154eb26fa0660", "user_id": "ae8c306c-329d-4e70-837c-2ce0da7e4f48", "send_anonymous_usage_stats": true, "adapter_type": "snowflake"}, "nodes": {"model.flow_models.bronze__blocks": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n {{ source(\n 'prod',\n 'flow_blocks'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__blocks"], "unique_id": "model.flow_models.bronze__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__blocks.sql", "original_file_path": "models/bronze/bronze__blocks.sql", "name": "bronze__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "ee1b07ff3943e8c3050c73e465d67a27dea8fef911a949c333d12d3792f82cb5"}, "tags": [], "refs": [], "sources": [["prod", "flow_blocks"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1651799835.14518, "compiled_sql": "\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n chainwalkers.prod.flow_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.blocks"}, "model.flow_models.bronze__transactions": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n {{ source(\n 'prod',\n 'flow_txs'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_txs"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__transactions"], "unique_id": "model.flow_models.bronze__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__transactions.sql", "original_file_path": "models/bronze/bronze__transactions.sql", "name": "bronze__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "7df148fbc131022c3bb1ec5d7a28adbf721b689c32d8f16168e7275301d79e46"}, "tags": [], "refs": [], "sources": [["prod", "flow_txs"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1651799835.152056, "compiled_sql": "\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n chainwalkers.prod.flow_txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.transactions"}, "model.flow_models.silver__events": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'event_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__events"], "unique_id": "model.flow_models.silver__events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__events.sql", "original_file_path": "models/silver/silver__events.sql", "name": "silver__events", "alias": "events", "checksum": {"name": "sha256", "checksum": "04893b154d5c479d4cf721799022500d7e1961a7c081563c9023bf71296aa294"}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The raw event data from the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_type": {"name": "_event_data_type", "description": "The type object from event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_fields": {"name": "_event_data_fields", "description": "The fields object from the event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__events.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert"}, "created_at": 1651799835.243697, "compiled_sql": "\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.events"}, "model.flow_models.silver__transactions": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'tx_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__transactions"], "unique_id": "model.flow_models.silver__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__transactions.sql", "original_file_path": "models/silver/silver__transactions.sql", "name": "silver__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "83624dbe1e5e65d466c20b980977a85cb2eda3821b3cb031464b41771d0b9ebe"}, "tags": [], "refs": [["bronze__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__transactions.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert"}, "created_at": 1651799835.284042, "compiled_sql": "\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.transactions"}, "model.flow_models.silver__blocks": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'block_height',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__blocks') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__blocks"], "unique_id": "model.flow_models.silver__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__blocks.sql", "original_file_path": "models/silver/silver__blocks.sql", "name": "silver__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "630c91697fb92facb17e9594045f28b0ffab240bab62d524bd810a94296e2c88"}, "tags": [], "refs": [["bronze__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__blocks.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert"}, "created_at": 1651799835.200325, "compiled_sql": "\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.blocks\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.blocks"}, "model.flow_models.silver__event_attributes": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'attribute_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH events AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__events') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__event_attributes"], "unique_id": "model.flow_models.silver__event_attributes", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__event_attributes.sql", "original_file_path": "models/silver/silver__event_attributes.sql", "name": "silver__event_attributes", "alias": "event_attributes", "checksum": {"name": "sha256", "checksum": "65df59847b36268e4582cfc1dfff08e82477c59982eff2ff42c56d94453608b4"}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "This table cleans and transform attributes from each event in the events table.", "columns": {"attribute_id": {"name": "attribute_id", "description": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_index": {"name": "attribute_index", "description": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_key": {"name": "attribute_key", "description": "The key of the attribute key-value pair. This is the label while attribute_value is the data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "decoded_address": {"name": "decoded_address", "description": "The decoded address, if applicable, for the attribute_value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value": {"name": "attribute_value", "description": "The value of the attribute key-value pair. This is the data that attribute_key labels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value_adj": {"name": "attribute_value_adj", "description": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__event_attributes.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert"}, "created_at": 1651799835.329757, "compiled_sql": "\n\nWITH events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.events\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.event_attributes"}, "operation.flow_models.flow_models-on-run-start-0": {"raw_sql": "{{create_sps()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_sps"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-0", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-0"], "unique_id": "operation.flow_models.flow_models-on-run-start-0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-0.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-0", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-0.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1651799835.1717591, "compiled_sql": "\n \n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 0}, "operation.flow_models.flow_models-on-run-start-1": {"raw_sql": "{{create_tasks()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_tasks"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-1", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-1"], "unique_id": "operation.flow_models.flow_models-on-run-start-1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-1.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-1", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-1.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1651799835.1746671, "compiled_sql": "\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 1}, "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_height"], "unique_id": "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.204024, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.unique_silver__blocks_block_height.478ce02832": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__blocks_block_height"], "unique_id": "test.flow_models.unique_silver__blocks_block_height.478ce02832", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "unique_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/unique_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.204889, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480"}, "created_at": 1651799835.205676, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_timestamp.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_timestamp", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.21133, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739"}, "created_at": 1651799835.212207, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893"}, "created_at": 1651799835.2223182, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_network.2020ad46b9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_network"], "unique_id": "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_network.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_network", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.224323, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1"}, "created_at": 1651799835.225108, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_chain_id"], "unique_id": "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_chain_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_chain_id", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2272608, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e"}, "created_at": 1651799835.228033, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_tx_count"], "unique_id": "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_tx_count.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_tx_count", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.230151, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2"}, "created_at": 1651799835.2309, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_id.b40d544128": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_id"], "unique_id": "test.flow_models.not_null_silver__blocks_id.b40d544128", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_id", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.232922, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101"}, "created_at": 1651799835.233678, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_parent_id"], "unique_id": "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_parent_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_parent_id", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.236093, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c"}, "created_at": 1651799835.236854, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks__ingested_at"], "unique_id": "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks__ingested_at.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks__ingested_at", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.238993, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81"}, "created_at": 1651799835.239753, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__events_event_id.c5f00655c1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_id"], "unique_id": "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.24408, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.unique_silver__events_event_id.c34161972a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__events_event_id"], "unique_id": "test.flow_models.unique_silver__events_event_id.c34161972a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "unique_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/unique_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.244898, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.events\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_id.2724c3889b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_id"], "unique_id": "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_id", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2457469, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_timestamp.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_timestamp", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2464828, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0"}, "created_at": 1651799835.247221, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91"}, "created_at": 1651799835.24981, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_height.7977589637": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_height"], "unique_id": "test.flow_models.not_null_silver__events_block_height.7977589637", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_height.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_height", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2518091, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_692b835c226209a476c88646f66b5283\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283"}, "created_at": 1651799835.25261, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_succeeded.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_succeeded", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.254762, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5"}, "created_at": 1651799835.2555132, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_index.4e05dcc574": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_index"], "unique_id": "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_index.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_index", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.257496, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44"}, "created_at": 1651799835.258254, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_contract.d88483871a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_contract"], "unique_id": "test.flow_models.not_null_silver__events_event_contract.d88483871a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_contract.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_contract", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.260244, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d"}, "created_at": 1651799835.2610528, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_type"], "unique_id": "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_type", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.263197, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0"}, "created_at": 1651799835.263956, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_data"], "unique_id": "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_data.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_data", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.266081, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea"}, "created_at": 1651799835.266834, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_type.db25419673": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_type"], "unique_id": "test.flow_models.not_null_silver__events__event_data_type.db25419673", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_type", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.269109, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b"}, "created_at": 1651799835.269849, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_TYPE'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_fields"], "unique_id": "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_fields.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_fields", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_fields.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2718248, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_fields is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51"}, "created_at": 1651799835.272566, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_FIELDS'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__ingested_at"], "unique_id": "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__ingested_at.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__ingested_at", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.274543, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159"}, "created_at": 1651799835.275284, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad"}, "created_at": 1651799835.277298, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.silver.events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_id"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.284422, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__transactions_tx_id"], "unique_id": "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "unique_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/unique_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2851992, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_timestamp.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_timestamp", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.286043, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757"}, "created_at": 1651799835.2867908, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0"}, "created_at": 1651799835.28938, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_height.52f8623258": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_height"], "unique_id": "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_height.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_height", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.29139, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db"}, "created_at": 1651799835.2921689, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_chain_id"], "unique_id": "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_chain_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_chain_id", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.2943518, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82"}, "created_at": 1651799835.2951, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_index"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_index.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_index", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.297227, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563"}, "created_at": 1651799835.297986, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_proposer"], "unique_id": "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_proposer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_proposer", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.299965, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71"}, "created_at": 1651799835.3007119, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_payer"], "unique_id": "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_payer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_payer", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.303147, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df"}, "created_at": 1651799835.303891, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_authorizers", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3060071, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f"}, "created_at": 1651799835.306766, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_count_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_count_authorizers", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3087602, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0"}, "created_at": 1651799835.30951, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_gas_limit"], "unique_id": "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_gas_limit.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_gas_limit", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3115351, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb"}, "created_at": 1651799835.312284, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_transaction_result"], "unique_id": "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_transaction_result.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_transaction_result", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3142788, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49"}, "created_at": 1651799835.315051, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_succeeded.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_succeeded", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.31712, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500"}, "created_at": 1651799835.317872, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_error_msg"], "unique_id": "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_error_msg.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_error_msg", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3198578, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890"}, "created_at": 1651799835.320609, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions__ingested_at"], "unique_id": "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions__ingested_at.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions__ingested_at", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.322732, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78"}, "created_at": 1651799835.323508, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076"}, "created_at": 1651799835.3255758, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.silver.transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.330133, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "unique_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/unique_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.330901, "compiled_sql": "\n \n \n\nselect\n attribute_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is not null\ngroup by attribute_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04"}, "created_at": 1651799835.3316638, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_id", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.333864, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112"}, "created_at": 1651799835.3346272, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_tx_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_tx_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_tx_id", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3370292, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_block_timestamp.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_block_timestamp", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.337759, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0"}, "created_at": 1651799835.3386052, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.event_attributes\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f"}, "created_at": 1651799835.3412359, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_index", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3432178, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1"}, "created_at": 1651799835.343963, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_index", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.345942, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6"}, "created_at": 1651799835.346693, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_contract"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_contract.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_contract", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3487518, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9"}, "created_at": 1651799835.349507, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_type"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_type.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_type", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.351649, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee"}, "created_at": 1651799835.3524082, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_key"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_key.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_key", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.3545558, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108"}, "created_at": 1651799835.35532, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_KEY'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes__ingested_at"], "unique_id": "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes__ingested_at.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes__ingested_at", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1651799835.357516, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6"}, "created_at": 1651799835.358283, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index", "attribute_index"], "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618"}, "created_at": 1651799835.360296, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index, attribute_index\n from FLOW_DEV.silver.event_attributes\n group by tx_id, event_index, attribute_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__event_attributes"}}, "sources": {"source.flow_models.prod.flow_blocks": {"fqn": ["flow_models", "prod", "flow_blocks"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_blocks", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_blocks", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_blocks", "created_at": 1651799835.362319}, "source.flow_models.prod.flow_txs": {"fqn": ["flow_models", "prod", "flow_txs"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_txs", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_txs", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_txs", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_txs", "created_at": 1651799835.362386}}, "macros": {"macro.flow_models.create_tasks": {"unique_id": "macro.flow_models.create_tasks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_tasks.sql", "original_file_path": "macros/create_tasks.sql", "name": "create_tasks", "macro_sql": "{% macro create_tasks() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ task_run_sp_create_prod_clone('_internal') }};\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.task_run_sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.529494}, "macro.flow_models.create_sps": {"unique_id": "macro.flow_models.create_sps", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_sps.sql", "original_file_path": "macros/create_sps.sql", "name": "create_sps", "macro_sql": "{% macro create_sps() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ sp_create_prod_clone('_internal') }};\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.529857}, "macro.flow_models.generate_schema_name": {"unique_id": "macro.flow_models.generate_schema_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(\n custom_schema_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [0] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5303712}, "macro.flow_models.generate_alias_name": {"unique_id": "macro.flow_models.generate_alias_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(\n custom_alias_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [1] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.530656}, "macro.flow_models.task_run_sp_create_prod_clone": {"unique_id": "macro.flow_models.task_run_sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/task_run_sp_create_prod_clone.sql", "original_file_path": "macros/task_run_sp_create_prod_clone.sql", "name": "task_run_sp_create_prod_clone", "macro_sql": "{% macro task_run_sp_create_prod_clone(target_schema) -%}\n create or replace task {{target_schema}}.run_sp_create_prod_clone\n warehouse = dbt_cloud\n schedule = 'USING CRON 15 10 * * * UTC'\n as\n call {{ target_schema }}.create_prod_clone('flow', 'flow_dev', 'internal_dev');\n\n alter task {{ target_schema }}.run_sp_create_prod_clone resume\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.530955}, "macro.flow_models.sp_create_prod_clone": {"unique_id": "macro.flow_models.sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/sp_create_prod_clone.sql", "original_file_path": "macros/sp_create_prod_clone.sql", "name": "sp_create_prod_clone", "macro_sql": "{% macro sp_create_prod_clone(target_schema) -%}\n\ncreate or replace procedure {{ target_schema }}.create_prod_clone(source_db_name string, destination_db_name string, role_name string)\nreturns boolean \nlanguage javascript\nexecute as caller\nas\n$$\n snowflake.execute({sqlText: `BEGIN TRANSACTION;`});\n try {\n snowflake.execute({sqlText: `DROP DATABASE IF EXISTS ${DESTINATION_DB_NAME}`});\n snowflake.execute({sqlText: `CREATE DATABASE ${DESTINATION_DB_NAME} CLONE ${SOURCE_DB_NAME}`});\n snowflake.execute({sqlText: `DROP SCHEMA ${DESTINATION_DB_NAME}._INTERNAL`}); /* this only needs to be in prod */\n\n var existing_schemas = snowflake.execute({sqlText: `SELECT table_schema\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1;`});\n\n while (existing_schemas.next()) {\n var schema = existing_schemas.getColumnValue(1)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON SCHEMA ${DESTINATION_DB_NAME}.${schema} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n var existing_tables = snowflake.execute({sqlText: `SELECT table_schema, table_name\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1,2;`});\n\n while (existing_tables.next()) {\n var schema = existing_tables.getColumnValue(1)\n var table_name = existing_tables.getColumnValue(2)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON TABLE ${DESTINATION_DB_NAME}.${schema}.${table_name} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON DATABASE ${DESTINATION_DB_NAME} TO ROLE ${ROLE_NAME};`})\n snowflake.execute({sqlText: `COMMIT;`});\n } catch (err) {\n snowflake.execute({sqlText: `ROLLBACK;`});\n throw(err);\n }\n \n return true\n$$\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.531511}, "macro.dbt_snowflake.snowflake__get_catalog": {"unique_id": "macro.dbt_snowflake.snowflake__get_catalog", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "snowflake__get_catalog", "macro_sql": "{% macro snowflake__get_catalog(information_schema, schemas) -%}\n {% set query %}\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 comment as \"table_comment\",\n\n -- note: this is the _role_ that owns the table\n table_owner as \"table_owner\",\n\n 'Clustering Key' as \"stats:clustering_key:label\",\n clustering_key as \"stats:clustering_key:value\",\n 'The key used to cluster this table' as \"stats:clustering_key:description\",\n (clustering_key is not null) as \"stats:clustering_key:include\",\n\n 'Row Count' as \"stats:row_count:label\",\n row_count as \"stats:row_count:value\",\n 'An approximate count of rows in this table' as \"stats:row_count:description\",\n (row_count is not null) as \"stats:row_count:include\",\n\n 'Approximate Size' as \"stats:bytes:label\",\n bytes as \"stats:bytes:value\",\n 'Approximate size of the table as reported by Snowflake' as \"stats:bytes:description\",\n (bytes is not null) as \"stats:bytes:include\",\n\n 'Last Modified' as \"stats:last_modified:label\",\n to_varchar(convert_timezone('UTC', last_altered), 'yyyy-mm-dd HH24:MI'||'UTC') as \"stats:last_modified:value\",\n 'The timestamp for last update/change' as \"stats:last_modified:description\",\n (last_altered is not null and table_type='BASE TABLE') as \"stats:last_modified:include\"\n\n from {{ information_schema }}.tables\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 )\n\n select *\n from tables\n join columns using (\"table_database\", \"table_schema\", \"table_name\")\n where (\n {%- for schema in schemas -%}\n upper(\"table_schema\") = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n order by \"column_index\"\n {%- endset -%}\n\n {{ return(run_query(query)) }}\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": 1651799834.532491}, "macro.dbt_snowflake.snowflake__create_table_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_table_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_table_as", "macro_sql": "{% macro snowflake__create_table_as(temporary, relation, sql) -%}\n {%- set transient = config.get('transient', default=true) -%}\n {%- set cluster_by_keys = config.get('cluster_by', default=none) -%}\n {%- set enable_automatic_clustering = config.get('automatic_clustering', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n\n {%- if cluster_by_keys is not none and cluster_by_keys is string -%}\n {%- set cluster_by_keys = [cluster_by_keys] -%}\n {%- endif -%}\n {%- if cluster_by_keys is not none -%}\n {%- set cluster_by_string = cluster_by_keys|join(\", \")-%}\n {% else %}\n {%- set cluster_by_string = none -%}\n {%- endif -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace {% if temporary -%}\n temporary\n {%- elif transient -%}\n transient\n {%- endif %} table {{ relation }} {% if copy_grants and not temporary -%} copy grants {%- endif %} as\n (\n {%- if cluster_by_string is not none -%}\n select * from(\n {{ sql }}\n ) order by ({{ cluster_by_string }})\n {%- else -%}\n {{ sql }}\n {%- endif %}\n );\n {% if cluster_by_string is not none and not temporary -%}\n alter table {{relation}} cluster by ({{cluster_by_string}});\n {%- endif -%}\n {% if enable_automatic_clustering and cluster_by_string is not none and not temporary -%}\n alter table {{relation}} resume recluster;\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.543885}, "macro.dbt_snowflake.get_column_comment_sql": {"unique_id": "macro.dbt_snowflake.get_column_comment_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_column_comment_sql", "macro_sql": "{% macro get_column_comment_sql(column_name, column_dict) %}\n {{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} COMMENT $${{ column_dict[column_name]['description'] | replace('$', '[$]') }}$$\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.544211}, "macro.dbt_snowflake.get_persist_docs_column_list": {"unique_id": "macro.dbt_snowflake.get_persist_docs_column_list", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_persist_docs_column_list", "macro_sql": "{% macro get_persist_docs_column_list(model_columns, query_columns) %}\n(\n {% for column_name in query_columns %}\n {% if (column_name|upper in model_columns) or (column_name in model_columns) %}\n {{ get_column_comment_sql(column_name, model_columns) }}\n {% else %}\n {{column_name}}\n {% endif %}\n {{ \", \" if not loop.last else \"\" }}\n {% endfor %}\n)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5446742}, "macro.dbt_snowflake.snowflake__create_view_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_view_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_view_as", "macro_sql": "{% macro snowflake__create_view_as(relation, sql) -%}\n {%- set secure = config.get('secure', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create or replace {% if secure -%}\n secure\n {%- endif %} view {{ relation }} \n {% if config.persist_column_docs() -%}\n {% set model_columns = model.columns %}\n {% set query_columns = get_columns_in_query(sql) %}\n {{ get_persist_docs_column_list(model_columns, query_columns) }}\n \n {%- endif %}\n {% if copy_grants -%} copy grants {%- endif %} as (\n {{ sql }}\n );\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt_snowflake.get_persist_docs_column_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5454159}, "macro.dbt_snowflake.snowflake__get_columns_in_relation": {"unique_id": "macro.dbt_snowflake.snowflake__get_columns_in_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__get_columns_in_relation", "macro_sql": "{% macro snowflake__get_columns_in_relation(relation) -%}\n {%- set sql -%}\n describe table {{ 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['name'], row['type'])) %}\n {% endfor %}\n {% do return(columns) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.546188}, "macro.dbt_snowflake.snowflake__list_schemas": {"unique_id": "macro.dbt_snowflake.snowflake__list_schemas", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_schemas", "macro_sql": "{% macro snowflake__list_schemas(database) -%}\n {# 10k limit from here: https://docs.snowflake.net/manuals/sql-reference/sql/show-schemas.html#usage-notes #}\n {% set maximum = 10000 %}\n {% set sql -%}\n show terse schemas in database {{ database }}\n limit {{ maximum }}\n {%- endset %}\n {% set result = run_query(sql) %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in database {{ database }}! dbt can only get\n information about databases with fewer than {{ maximum }} schemas.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {{ return(result) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.546727}, "macro.dbt_snowflake.snowflake__list_relations_without_caching": {"unique_id": "macro.dbt_snowflake.snowflake__list_relations_without_caching", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_relations_without_caching", "macro_sql": "{% macro snowflake__list_relations_without_caching(schema_relation) %}\n {%- set sql -%}\n show terse objects in {{ schema_relation }}\n {%- endset -%}\n\n {%- set result = run_query(sql) -%}\n {% set maximum = 10000 %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in schema {{ schema_relation }}! dbt can only get\n information about schemas with fewer than {{ maximum }} objects.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {%- do return(result) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.547222}, "macro.dbt_snowflake.snowflake__check_schema_exists": {"unique_id": "macro.dbt_snowflake.snowflake__check_schema_exists", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__check_schema_exists", "macro_sql": "{% macro snowflake__check_schema_exists(information_schema, schema) -%}\n {% call statement('check_schema_exists', fetch_result=True) -%}\n select count(*)\n from {{ information_schema }}.schemata\n where upper(schema_name) = upper('{{ schema }}')\n and upper(catalog_name) = upper('{{ information_schema.database }}')\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": 1651799834.5475368}, "macro.dbt_snowflake.snowflake__current_timestamp": {"unique_id": "macro.dbt_snowflake.snowflake__current_timestamp", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__current_timestamp", "macro_sql": "{% macro snowflake__current_timestamp() -%}\n convert_timezone('UTC', current_timestamp())\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.547611}, "macro.dbt_snowflake.snowflake__snapshot_string_as_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_string_as_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_string_as_time", "macro_sql": "{% macro snowflake__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"to_timestamp_ntz('\" ~ timestamp ~ \"')\" -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.547785}, "macro.dbt_snowflake.snowflake__snapshot_get_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_get_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_get_time", "macro_sql": "{% macro snowflake__snapshot_get_time() -%}\n to_timestamp_ntz({{ current_timestamp() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.547888}, "macro.dbt_snowflake.snowflake__rename_relation": {"unique_id": "macro.dbt_snowflake.snowflake__rename_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__rename_relation", "macro_sql": "{% macro snowflake__rename_relation(from_relation, to_relation) -%}\n {% call statement('rename_relation') -%}\n alter table {{ 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": 1651799834.548073}, "macro.dbt_snowflake.snowflake__alter_column_type": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_type", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_type", "macro_sql": "{% macro snowflake__alter_column_type(relation, column_name, new_column_type) -%}\n {% call statement('alter_column_type') %}\n alter table {{ relation }} alter {{ adapter.quote(column_name) }} set data type {{ new_column_type }};\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": 1651799834.5483189}, "macro.dbt_snowflake.snowflake__alter_relation_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_comment", "macro_sql": "{% macro snowflake__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": 1651799834.5485198}, "macro.dbt_snowflake.snowflake__alter_column_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_comment", "macro_sql": "{% macro snowflake__alter_column_comment(relation, column_dict) -%}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n alter {{ relation.type }} {{ relation }} alter\n {% for column_name in column_dict if (column_name in existing_columns) or (column_name|upper in existing_columns) %}\n {{ get_column_comment_sql(column_name, column_dict) }} {{ ',' if not loop.last else ';' }}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.549024}, "macro.dbt_snowflake.get_current_query_tag": {"unique_id": "macro.dbt_snowflake.get_current_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_current_query_tag", "macro_sql": "{% macro get_current_query_tag() -%}\n {{ return(run_query(\"show parameters like 'query_tag' in session\").rows[0]['value']) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.549215}, "macro.dbt_snowflake.set_query_tag": {"unique_id": "macro.dbt_snowflake.set_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "set_query_tag", "macro_sql": "{% macro set_query_tag() -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% set original_query_tag = get_current_query_tag() %}\n {{ log(\"Setting query_tag to '\" ~ new_query_tag ~ \"'. Will reset to '\" ~ original_query_tag ~ \"' after materialization.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(new_query_tag)) %}\n {{ return(original_query_tag)}}\n {% endif %}\n {{ return(none)}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_current_query_tag", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.549679}, "macro.dbt_snowflake.unset_query_tag": {"unique_id": "macro.dbt_snowflake.unset_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "unset_query_tag", "macro_sql": "{% macro unset_query_tag(original_query_tag) -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% if original_query_tag %}\n {{ log(\"Resetting query_tag to '\" ~ original_query_tag ~ \"'.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(original_query_tag)) %}\n {% else %}\n {{ log(\"No original query_tag, unsetting parameter.\") }}\n {% do run_query(\"alter session unset query_tag\") %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5502279}, "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_add_remove_columns", "macro_sql": "{% macro snowflake__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column\n {% for column in add_columns %}\n {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n {% endif %}\n\n {% if remove_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column\n {% for column in remove_columns %}\n {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n \n {% do run_query(sql) %}\n \n {% endif %}\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": 1651799834.5510259}, "macro.dbt_snowflake.snowflake_dml_explicit_transaction": {"unique_id": "macro.dbt_snowflake.snowflake_dml_explicit_transaction", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake_dml_explicit_transaction", "macro_sql": "{% macro snowflake_dml_explicit_transaction(dml) %}\n {#\n Use this macro to wrap all INSERT, MERGE, UPDATE, DELETE, and TRUNCATE \n statements before passing them into run_query(), or calling in the 'main' statement\n of a materialization\n #}\n {% set dml_transaction -%}\n begin;\n {{ dml }};\n commit;\n {%- endset %}\n \n {% do return(dml_transaction) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5512562}, "macro.dbt_snowflake.snowflake__truncate_relation": {"unique_id": "macro.dbt_snowflake.snowflake__truncate_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__truncate_relation", "macro_sql": "{% macro snowflake__truncate_relation(relation) -%}\n {% set truncate_dml %}\n truncate table {{ relation }}\n {% endset %}\n {% call statement('truncate_relation') -%}\n {{ snowflake_dml_explicit_transaction(truncate_dml) }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.551489}, "macro.dbt_snowflake.snowflake__get_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_merge_sql", "macro_sql": "{% macro snowflake__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) -%}\n\n {#\n Workaround for Snowflake not being happy with a merge on a constant-false predicate.\n When no unique_key is provided, this macro will do a regular insert. If a unique_key\n is provided, then this macro will do a proper merge instead.\n #}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute='name')) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set dml -%}\n {%- if unique_key is none -%}\n\n {{ sql_header if sql_header is not none }}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source_sql }}\n )\n\n {%- else -%}\n\n {{ default__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) }}\n\n {%- endif -%}\n {%- endset -%}\n \n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.default__get_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.552723}, "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_delete_insert_merge_sql", "macro_sql": "{% macro snowflake__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% set dml = default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.553004}, "macro.dbt_snowflake.snowflake__snapshot_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__snapshot_merge_sql", "macro_sql": "{% macro snowflake__snapshot_merge_sql(target, source, insert_cols) %}\n {% set dml = default__snapshot_merge_sql(target, source, insert_cols) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5532548}, "macro.dbt_snowflake.snowflake__load_csv_rows": {"unique_id": "macro.dbt_snowflake.snowflake__load_csv_rows", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "snowflake__load_csv_rows", "macro_sql": "{% macro snowflake__load_csv_rows(model, agate_table) %}\n {% set batch_size = get_batch_size() %}\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 %s\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query('BEGIN', auto_begin=False) %}\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n {% do adapter.add_query('COMMIT', auto_begin=False) %}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.555347}, "macro.dbt_snowflake.materialization_seed_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_seed_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "materialization_seed_snowflake", "macro_sql": "{% materialization seed, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_seed_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_seed_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.555638}, "macro.dbt_snowflake.materialization_view_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_view_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_snowflake", "macro_sql": "{% materialization view, adapter='snowflake' -%}\n\n {% set original_query_tag = set_query_tag() %}\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n {% do persist_docs(target_relation, model, for_columns=false) %}\n\n {% do return(to_return) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.create_or_replace_view", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.556216}, "macro.dbt_snowflake.materialization_table_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_table_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_snowflake", "macro_sql": "{% materialization table, adapter='snowflake' %}\n\n {% set original_query_tag = set_query_tag() %}\n\n {%- set identifier = model['alias'] -%}\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, type='table') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#-- Drop the relation if it was a view to \"convert\" it in a table. This may lead to\n -- downtime, but it should be a relatively infrequent occurrence #}\n {% if old_relation is not none and not old_relation.is_table %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ drop_relation_if_exists(old_relation) }}\n {% endif %}\n\n --build model\n {% call statement('main') -%}\n {{ create_table_as(false, target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.557636}, "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_snowflake_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'delete+insert'\n {%- endset %}\n {% if strategy not in ['merge', 'delete+insert'] %}\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": 1651799834.558945}, "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_get_incremental_sql", "macro_sql": "{% macro dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n {% if strategy == 'merge' %}\n {% do return(get_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% elif strategy == 'delete+insert' %}\n {% do return(get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% else %}\n {% do exceptions.raise_compiler_error('invalid strategy: ' ~ strategy) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql", "macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.559526}, "macro.dbt_snowflake.materialization_incremental_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_incremental_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_snowflake", "macro_sql": "{% materialization incremental, adapter='snowflake' -%}\n \n {% set original_query_tag = set_query_tag() %}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set target_relation = this %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_snowflake_validate_get_incremental_strategy(config) -%}\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif existing_relation.is_view %}\n {#-- 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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif full_refresh_mode %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = target_relation.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5615969}, "macro.dbt_snowflake.materialization_snapshot_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_snapshot_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "materialization_snapshot_snowflake", "macro_sql": "{% materialization snapshot, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_snapshot_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_snapshot_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.562012}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.563094}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.563287}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.563425}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.563562}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5636969}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.564107}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.564398}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.564693}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.565161}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.565419}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.568668}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5688362}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.56905}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.569191}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5692852}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5700421}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5702028}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.570376}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\n {%- set ns = namespace() -%} {# handle for-loop scoping with a namespace #}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.571341}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.573163}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.576294}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.576575}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.57674}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.576822}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5770261}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select \n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n \n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n \n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.577874}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.578059}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.578305}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5787299}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.584507}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n \n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n \n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n \n {% do relations.append(target_relation) %}\n \n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n \n {{ adapter.commit() }}\n \n {% else %}\n\n {% set main_sql = sql %}\n \n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n \n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.586545}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.587032}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.587334}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.587741}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.588109}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n \n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.588928}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n \n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n \n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.589468}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n \n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }} \n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.590071}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.592813}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ predicates | join(' and ') }}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.593936}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.594174}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5945852}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.5948439}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.595457}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.596127}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {% set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %} \n {% do adapter.rename_relation(target_relation, backup_relation) %} \n {% do adapter.rename_relation(intermediate_relation, target_relation) %} \n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6009889}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n \n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n \n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n \n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6055942}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n \n {% set schema_changed = False %}\n \n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n \n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n \n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.606808}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n \n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n \n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %} \n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n \n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n \n {% do log(schema_change_message) %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.607991}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n \n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n \n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n \n {% if schema_changes_dict['schema_changed'] %}\n \n {% if on_schema_change == 'fail' %}\n \n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways: \n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n {% endset %}\n \n {% do exceptions.raise_compiler_error(fail_msg) %}\n \n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n \n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {% endif %}\n \n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.608701}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6123362}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6128058}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.61299}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.613188}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n \n {{ sql_header if sql_header is not none }}\n \n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.61359}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"old_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6170812}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.617437}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6176581}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.61886}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.619266}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.619422}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.619602}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.619853}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set agate_table = load_agate_table() -%}\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.622622}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.62649}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6273699}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.627603}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.628083}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.628223}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.628333}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.628491}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.628604}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6290739}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.629312}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.63053}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.630989}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6312268}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6317801}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.632032}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.63232}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.632753}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.633}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.633394}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6336231}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6339169}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.634505}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6356108}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6361809}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6364632}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.638151}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.639458}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.640197}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.640428}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.640857}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6410382}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6411982}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.641376}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.641862}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.641991}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.642144}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.642532}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.644077}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.644383}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.644563}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.644767}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.644944}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.645099}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6453}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6455848}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.645835}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.646465}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.646708}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.646894}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.64741}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter '+adapter.type()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.647553}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.647777}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.648201}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.648882}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6490471}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6492531}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6494138}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.649678}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6501582}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6515489}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6518028}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.651981}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.652125}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6522949}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.652533}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6527412}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.653095}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.653277}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.653435}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6551511}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.655305}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6556082}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6557891}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.656121}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.656346}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.65693}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.657184}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n \n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n \n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.657959}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.658518}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.658746}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.659022}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6592908}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.659594}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.659668}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.659734}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.660115}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n \n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6602712}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.660575}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.660758}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661439}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.66151}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661579}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661644}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.66171}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661864}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661932}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.661999}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6620622}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662216}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662283}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662349}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662501}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662571}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662637}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662787}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.662854}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6629179}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.663239}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6633081}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6633759}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.663868}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.664211}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.664313}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.664407}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.664983}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.665139}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.665292}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6654458}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.665631}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.665928}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.665998}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.666066}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.666442}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6665778}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.666709}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6668391}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.667402}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.6675332}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.667688}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.695128}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.69746}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.697859}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.698133}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n \n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.698514}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %} \n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.699434}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.701893}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.702052}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7022111}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7039402}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.70414}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.704561}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7046988}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.70482}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7049391}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7052832}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.705423}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7055519}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.70592}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7060611}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7061849}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.706719}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.706839}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7069418}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.707326}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.707446}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.707554}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7079701}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.708098}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.708222}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.708595}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.708697}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7092679}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.709374}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7094421}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7095108}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.709665}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.70977}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.709907}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.710017}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.710143}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.711586}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.712063}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7125142}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7126951}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7130702}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.713171}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7132642}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7133598}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7139368}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.714268}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.714427}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.714865}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7150452}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7155159}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.715673}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.715841}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.716219}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.716346}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7164721}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.717338}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7228749}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7233841}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.723701}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7241821}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.729287}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.729721}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.730203}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.730721}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.731372}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.731746}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7320588}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7326279}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.732851}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.73329}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'coalesce(diff_count, 0)') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.733582}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.734286}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7346509}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.735111}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.735432}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7358022}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.735975}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.736608}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7371478}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7377212}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.738094}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7385511}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.738719}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7390919}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7392662}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.739914}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.740576}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.741185}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.74152}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7420318}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.74234}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.742843}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\nwith validation as (\n select\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n),\nvalidation_errors as (\n select\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.743351}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.744029}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.744697}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.745159}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.745327}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.746088}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.746956}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7498949}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions nore cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.751411}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.751742}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7519062}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.752235}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.752429}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.752743}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7529228}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.753439}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7541509}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{dbt_utils.datediff(start_date, end_date, datepart)}}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.754737}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7549682}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt_utils.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7553222}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7556858}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7560918}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.756791}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.757642}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.758514}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.758941}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.759132}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.759638}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.760344}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.761179}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.761635}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.761914}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.76255}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('*') }}\n {% endif %}\n\n {%- for col in dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7633731}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.765057}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.767172}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.769372}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.772119}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.772484}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.772732}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, group_by, order_by=order_by, relation_alias=relation_alias)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7734468}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n _inner.*,\n row_number() over (\n partition by {{ group_by }}\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n ) as rn\n from {{ relation if relation_alias is none else relation_alias }} as _inner\n ) as deduped\n where deduped.rn = 1\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7738361}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n array_agg (\n original\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n limit 1\n )[offset(0)] as deduped\n from {{ relation if relation_alias is none else relation_alias }} as original\n group by {{ group_by }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.774273}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7749062}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7758179}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.776247}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.776521}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.776902}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.777228}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7786932}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.778961}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.779661}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7802298}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7812018}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.782638}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7836952}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7845278}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.785028}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.785741}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.786172}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.786749}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7872488}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.787332}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.787414}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.787492}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.788509}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.788783}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.789359}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7903569}, "macro.dbt_date.get_date_dimension": {"unique_id": "macro.dbt_date.get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "get_date_dimension", "macro_sql": "{% macro get_date_dimension(start_date, end_date) %}\n {{ adapter.dispatch('get_date_dimension', 'dbt_date') (start_date, end_date) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_date_dimension"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.7982159}, "macro.dbt_date.default__get_date_dimension": {"unique_id": "macro.dbt_date.default__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "default__get_date_dimension", "macro_sql": "{% macro default__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=false) }} as day_of_week,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week_iso,\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'quarter') }} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.800482}, "macro.dbt_date.postgres__get_date_dimension": {"unique_id": "macro.dbt_date.postgres__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "postgres__get_date_dimension", "macro_sql": "{% macro postgres__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week,\n\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n {# dbt_utils.last_day does not support quarter because postgresql does not support quarter interval. #}\n cast({{dbt_utils.dateadd('day', '-1', dbt_utils.dateadd('month', '3', dbt_utils.date_trunc('quarter', 'd.date_day')))}} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.802879}, "macro.dbt_date.get_base_dates": {"unique_id": "macro.dbt_date.get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "get_base_dates", "macro_sql": "{% macro get_base_dates(start_date=None, end_date=None, n_dateparts=None, datepart=\"day\") %}\n {{ adapter.dispatch('get_base_dates', 'dbt_date') (start_date, end_date, n_dateparts, datepart) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_base_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.803893}, "macro.dbt_date.default__get_base_dates": {"unique_id": "macro.dbt_date.default__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "default__get_base_dates", "macro_sql": "{% macro default__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.80463}, "macro.dbt_date.bigquery__get_base_dates": {"unique_id": "macro.dbt_date.bigquery__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "bigquery__get_base_dates", "macro_sql": "{% macro bigquery__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as date )\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as date )\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.805291}, "macro.dbt_date.get_fiscal_year_dates": {"unique_id": "macro.dbt_date.get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "get_fiscal_year_dates", "macro_sql": "{% macro get_fiscal_year_dates(dates, year_end_month=12, week_start_day=1, shift_year=1) %}\n{{ adapter.dispatch('get_fiscal_year_dates', 'dbt_date') (dates, year_end_month, week_start_day, shift_year) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_fiscal_year_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8069508}, "macro.dbt_date.default__get_fiscal_year_dates": {"unique_id": "macro.dbt_date.default__get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "default__get_fiscal_year_dates", "macro_sql": "{% macro default__get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) %}\n-- this gets all the dates within a fiscal year\n-- determined by the given year-end-month\n-- ending on the saturday closest to that month's end date\nwith date_dimension as (\n select * from {{ dates }}\n),\nyear_month_end as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.month_end_date\n from\n date_dimension d\n where\n d.month_of_year = {{ year_end_month }}\n group by 1,2\n\n),\nweeks as (\n\n select\n d.year_number,\n d.month_of_year,\n d.date_day as week_start_date,\n cast({{ dbt_utils.dateadd('day', 6, 'd.date_day') }} as date) as week_end_date\n from\n date_dimension d\n where\n d.day_of_week = {{ week_start_day }}\n\n),\n-- get all the weeks that start in the month the year ends\nyear_week_ends as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.week_end_date\n from\n weeks d\n where\n d.month_of_year = {{ year_end_month }}\n group by\n 1,2\n\n),\n-- then calculate which Saturday is closest to month end\nweeks_at_month_end as (\n\n select\n d.fiscal_year_number,\n d.week_end_date,\n m.month_end_date,\n rank() over\n (partition by d.fiscal_year_number\n order by\n abs({{ dbt_utils.datediff('d.week_end_date', 'm.month_end_date', 'day') }})\n\n ) as closest_to_month_end\n from\n year_week_ends d\n join\n year_month_end m on d.fiscal_year_number = m.fiscal_year_number\n),\nfiscal_year_range as (\n\n select\n w.fiscal_year_number,\n cast(\n {{ dbt_utils.dateadd('day', 1,\n 'lag(w.week_end_date) over(order by w.week_end_date)') }}\n as date) as fiscal_year_start_date,\n w.week_end_date as fiscal_year_end_date\n from\n weeks_at_month_end w\n where\n w.closest_to_month_end = 1\n\n),\nfiscal_year_dates as (\n\n select\n d.date_day,\n m.fiscal_year_number,\n m.fiscal_year_start_date,\n m.fiscal_year_end_date,\n w.week_start_date,\n w.week_end_date,\n -- we reset the weeks of the year starting with the merch year start date\n dense_rank()\n over(\n partition by m.fiscal_year_number\n order by w.week_start_date\n ) as fiscal_week_of_year\n from\n date_dimension d\n join\n fiscal_year_range m on d.date_day between m.fiscal_year_start_date and m.fiscal_year_end_date\n join\n weeks w on d.date_day between w.week_start_date and w.week_end_date\n\n)\nselect * from fiscal_year_dates order by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.807515}, "macro.dbt_date.get_fiscal_periods": {"unique_id": "macro.dbt_date.get_fiscal_periods", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_periods.sql", "original_file_path": "macros/fiscal_date/get_fiscal_periods.sql", "name": "get_fiscal_periods", "macro_sql": "{% macro get_fiscal_periods(dates, year_end_month, week_start_day, shift_year=1) %}\n{# \nThis macro requires you to pass in a ref to a date dimension, created via\ndbt_date.get_date_dimension()s\n#}\nwith fscl_year_dates_for_periods as (\n {{ dbt_date.get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) }}\n),\nfscl_year_w13 as (\n\n select\n f.*,\n -- We count the weeks in a 13 week period\n -- and separate the 4-5-4 week sequences\n mod(cast(\n (f.fiscal_week_of_year-1) as {{ dbt_utils.type_int() }}\n ), 13) as w13_number,\n -- Chop weeks into 13 week merch quarters\n cast(\n least(\n floor((f.fiscal_week_of_year-1)/13.0)\n , 3)\n as {{ dbt_utils.type_int() }}) as quarter_number\n from\n fscl_year_dates_for_periods f\n\n),\nfscl_periods as (\n\n select\n f.date_day,\n f.fiscal_year_number,\n f.week_start_date,\n f.week_end_date,\n f.fiscal_week_of_year,\n case \n -- we move week 53 into the 3rd period of the quarter\n when f.fiscal_week_of_year = 53 then 3\n when f.w13_number between 0 and 3 then 1\n when f.w13_number between 4 and 8 then 2\n when f.w13_number between 9 and 12 then 3\n end as period_of_quarter,\n f.quarter_number\n from\n fscl_year_w13 f\n\n),\nfscl_periods_quarters as (\n\n select\n f.*,\n cast((\n (f.quarter_number * 3) + f.period_of_quarter\n ) as {{ dbt_utils.type_int() }}) as fiscal_period_number\n from\n fscl_periods f\n\n)\nselect\n date_day,\n fiscal_year_number,\n week_start_date,\n week_end_date,\n fiscal_week_of_year, \n dense_rank() over(partition by fiscal_period_number order by fiscal_week_of_year) as fiscal_week_of_period,\n fiscal_period_number,\n quarter_number+1 as fiscal_quarter_number,\n period_of_quarter as fiscal_period_of_quarter\nfrom \n fscl_periods_quarters \norder by 1,2\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_fiscal_year_dates", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.808461}, "macro.dbt_date.tomorrow": {"unique_id": "macro.dbt_date.tomorrow", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/tomorrow.sql", "original_file_path": "macros/calendar_date/tomorrow.sql", "name": "tomorrow", "macro_sql": "{%- macro tomorrow(date=None, tz=None) -%}\n{{ dbt_date.n_days_away(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8087401}, "macro.dbt_date.next_week": {"unique_id": "macro.dbt_date.next_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_week.sql", "original_file_path": "macros/calendar_date/next_week.sql", "name": "next_week", "macro_sql": "{%- macro next_week(tz=None) -%}\n{{ dbt_date.n_weeks_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8089778}, "macro.dbt_date.next_month_name": {"unique_id": "macro.dbt_date.next_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_name.sql", "original_file_path": "macros/calendar_date/next_month_name.sql", "name": "next_month_name", "macro_sql": "{%- macro next_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.next_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8092852}, "macro.dbt_date.next_month": {"unique_id": "macro.dbt_date.next_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month.sql", "original_file_path": "macros/calendar_date/next_month.sql", "name": "next_month", "macro_sql": "{%- macro next_month(tz=None) -%}\n{{ dbt_date.n_months_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.809521}, "macro.dbt_date.day_name": {"unique_id": "macro.dbt_date.day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "day_name", "macro_sql": "{%- macro day_name(date, short=True) -%}\n {{ adapter.dispatch('day_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.810148}, "macro.dbt_date.default__day_name": {"unique_id": "macro.dbt_date.default__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "default__day_name", "macro_sql": "\n\n{%- macro default__day_name(date, short) -%}\n{%- set f = 'Dy' if short else 'Day' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.810345}, "macro.dbt_date.snowflake__day_name": {"unique_id": "macro.dbt_date.snowflake__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "snowflake__day_name", "macro_sql": "\n\n{%- macro snowflake__day_name(date, short) -%}\n {%- if short -%}\n dayname({{ date }})\n {%- else -%}\n -- long version not implemented on Snowflake so we're doing it manually :/\n case dayname({{ date }})\n when 'Mon' then 'Monday'\n when 'Tue' then 'Tuesday'\n when 'Wed' then 'Wednesday'\n when 'Thu' then 'Thursday'\n when 'Fri' then 'Friday'\n when 'Sat' then 'Saturday'\n when 'Sun' then 'Sunday'\n end\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81055}, "macro.dbt_date.bigquery__day_name": {"unique_id": "macro.dbt_date.bigquery__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "bigquery__day_name", "macro_sql": "\n\n{%- macro bigquery__day_name(date, short) -%}\n{%- set f = '%a' if short else '%A' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8107462}, "macro.dbt_date.postgres__day_name": {"unique_id": "macro.dbt_date.postgres__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "postgres__day_name", "macro_sql": "\n\n{%- macro postgres__day_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMDy' if short else 'FMDay' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8109398}, "macro.dbt_date.to_unixtimestamp": {"unique_id": "macro.dbt_date.to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "to_unixtimestamp", "macro_sql": "{%- macro to_unixtimestamp(timestamp) -%}\n {{ adapter.dispatch('to_unixtimestamp', 'dbt_date') (timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__to_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.811288}, "macro.dbt_date.default__to_unixtimestamp": {"unique_id": "macro.dbt_date.default__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "default__to_unixtimestamp", "macro_sql": "\n\n{%- macro default__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8114219}, "macro.dbt_date.snowflake__to_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "snowflake__to_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch_seconds', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.811554}, "macro.dbt_date.bigquery__to_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "bigquery__to_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__to_unixtimestamp(timestamp) -%}\n unix_seconds({{ timestamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81165}, "macro.dbt_date.n_days_away": {"unique_id": "macro.dbt_date.n_days_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_away.sql", "original_file_path": "macros/calendar_date/n_days_away.sql", "name": "n_days_away", "macro_sql": "{%- macro n_days_away(n, date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(-1 * n, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.812008}, "macro.dbt_date.week_start": {"unique_id": "macro.dbt_date.week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "week_start", "macro_sql": "{%- macro week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.812525}, "macro.dbt_date.default__week_start": {"unique_id": "macro.dbt_date.default__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "default__week_start", "macro_sql": "{%- macro default__week_start(date) -%}\ncast({{ dbt_utils.date_trunc('week', date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8126678}, "macro.dbt_date.snowflake__week_start": {"unique_id": "macro.dbt_date.snowflake__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "snowflake__week_start", "macro_sql": "\n\n{%- macro snowflake__week_start(date) -%}\n {#\n Get the day of week offset: e.g. if the date is a Sunday,\n dbt_date.day_of_week returns 1, so we subtract 1 to get a 0 offset\n #}\n {% set off_set = dbt_date.day_of_week(date, isoweek=False) ~ \" - 1\" %}\n cast({{ dbt_utils.dateadd(\"day\", \"-1 * (\" ~ off_set ~ \")\", date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.day_of_week", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.812955}, "macro.dbt_date.postgres__week_start": {"unique_id": "macro.dbt_date.postgres__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "postgres__week_start", "macro_sql": "\n\n{%- macro postgres__week_start(date) -%}\n-- Sunday as week start date\ncast({{ dbt_utils.dateadd('day', -1, dbt_utils.date_trunc('week', dbt_utils.dateadd('day', 1, date))) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.813215}, "macro.dbt_date.iso_week_start": {"unique_id": "macro.dbt_date.iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "iso_week_start", "macro_sql": "{%- macro iso_week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.813739}, "macro.dbt_date._iso_week_start": {"unique_id": "macro.dbt_date._iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "_iso_week_start", "macro_sql": "{%- macro _iso_week_start(date, week_type) -%}\ncast({{ dbt_utils.date_trunc(week_type, date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81389}, "macro.dbt_date.default__iso_week_start": {"unique_id": "macro.dbt_date.default__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "default__iso_week_start", "macro_sql": "\n\n{%- macro default__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.814024}, "macro.dbt_date.snowflake__iso_week_start": {"unique_id": "macro.dbt_date.snowflake__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "snowflake__iso_week_start", "macro_sql": "\n\n{%- macro snowflake__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.814156}, "macro.dbt_date.postgres__iso_week_start": {"unique_id": "macro.dbt_date.postgres__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "postgres__iso_week_start", "macro_sql": "\n\n{%- macro postgres__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8142872}, "macro.dbt_date.n_days_ago": {"unique_id": "macro.dbt_date.n_days_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_ago.sql", "original_file_path": "macros/calendar_date/n_days_ago.sql", "name": "n_days_ago", "macro_sql": "{%- macro n_days_ago(n, date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{%- set n = n|int -%}\ncast({{ dbt_utils.dateadd('day', -1 * n, dt) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81475}, "macro.dbt_date.last_week": {"unique_id": "macro.dbt_date.last_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_week.sql", "original_file_path": "macros/calendar_date/last_week.sql", "name": "last_week", "macro_sql": "{%- macro last_week(tz=None) -%}\n{{ dbt_date.n_weeks_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8149881}, "macro.dbt_date.now": {"unique_id": "macro.dbt_date.now", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/now.sql", "original_file_path": "macros/calendar_date/now.sql", "name": "now", "macro_sql": "{%- macro now(tz=None) -%}\n{{ dbt_date.convert_timezone(dbt_utils.current_timestamp(), tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.convert_timezone", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.815242}, "macro.dbt_date.periods_since": {"unique_id": "macro.dbt_date.periods_since", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/periods_since.sql", "original_file_path": "macros/calendar_date/periods_since.sql", "name": "periods_since", "macro_sql": "{%- macro periods_since(date_col, period_name='day', tz=None) -%}\n{{ dbt_utils.datediff(date_col, dbt_date.now(tz), period_name) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.815556}, "macro.dbt_date.today": {"unique_id": "macro.dbt_date.today", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/today.sql", "original_file_path": "macros/calendar_date/today.sql", "name": "today", "macro_sql": "{%- macro today(tz=None) -%}\ncast({{ dbt_date.now(tz) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.815785}, "macro.dbt_date.last_month": {"unique_id": "macro.dbt_date.last_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month.sql", "original_file_path": "macros/calendar_date/last_month.sql", "name": "last_month", "macro_sql": "{%- macro last_month(tz=None) -%}\n{{ dbt_date.n_months_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.816017}, "macro.dbt_date.day_of_year": {"unique_id": "macro.dbt_date.day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "day_of_year", "macro_sql": "{%- macro day_of_year(date) -%}\n{{ adapter.dispatch('day_of_year', 'dbt_date') (date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__day_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.816371}, "macro.dbt_date.default__day_of_year": {"unique_id": "macro.dbt_date.default__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "default__day_of_year", "macro_sql": "\n\n{%- macro default__day_of_year(date) -%}\n {{ dbt_date.date_part('dayofyear', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8165052}, "macro.dbt_date.postgres__day_of_year": {"unique_id": "macro.dbt_date.postgres__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "postgres__day_of_year", "macro_sql": "\n\n{%- macro postgres__day_of_year(date) -%}\n {{ dbt_date.date_part('doy', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.816637}, "macro.dbt_date.redshift__day_of_year": {"unique_id": "macro.dbt_date.redshift__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "redshift__day_of_year", "macro_sql": "\n\n{%- macro redshift__day_of_year(date) -%}\n cast({{ dbt_date.date_part('dayofyear', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8168142}, "macro.dbt_date.from_unixtimestamp": {"unique_id": "macro.dbt_date.from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "from_unixtimestamp", "macro_sql": "{%- macro from_unixtimestamp(epochs, format=\"seconds\") -%}\n {{ adapter.dispatch('from_unixtimestamp', 'dbt_date') (epochs, format) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__from_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.818068}, "macro.dbt_date.default__from_unixtimestamp": {"unique_id": "macro.dbt_date.default__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "default__from_unixtimestamp", "macro_sql": "\n\n{%- macro default__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp({{ epochs }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.818321}, "macro.dbt_date.postgres__from_unixtimestamp": {"unique_id": "macro.dbt_date.postgres__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "postgres__from_unixtimestamp", "macro_sql": "\n\n{%- macro postgres__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n cast(to_timestamp({{ epochs }}) at time zone 'UTC' as timestamp)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8185759}, "macro.dbt_date.snowflake__from_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "snowflake__from_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n {%- set scale = 0 -%}\n {%- elif format == \"milliseconds\" -%}\n {%- set scale = 3 -%}\n {%- elif format == \"microseconds\" -%}\n {%- set scale = 6 -%}\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp_ntz({{ epochs }}, {{ scale }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81903}, "macro.dbt_date.bigquery__from_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "bigquery__from_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n timestamp_seconds({{ epochs }})\n {%- elif format == \"milliseconds\" -%}\n timestamp_millis({{ epochs }})\n {%- elif format == \"microseconds\" -%}\n timestamp_micros({{ epochs }})\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8194208}, "macro.dbt_date.n_months_ago": {"unique_id": "macro.dbt_date.n_months_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_ago.sql", "original_file_path": "macros/calendar_date/n_months_ago.sql", "name": "n_months_ago", "macro_sql": "{%- macro n_months_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.81987}, "macro.dbt_date.date_part": {"unique_id": "macro.dbt_date.date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "date_part", "macro_sql": "{% macro date_part(datepart, date) -%}\n {{ adapter.dispatch('date_part', 'dbt_date') (datepart, date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.820215}, "macro.dbt_date.default__date_part": {"unique_id": "macro.dbt_date.default__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "default__date_part", "macro_sql": "{% macro default__date_part(datepart, date) -%}\n date_part('{{ datepart }}', {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.820346}, "macro.dbt_date.bigquery__date_part": {"unique_id": "macro.dbt_date.bigquery__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "bigquery__date_part", "macro_sql": "{% macro bigquery__date_part(datepart, date) -%}\n extract({{ datepart }} from {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8204732}, "macro.dbt_date.n_weeks_away": {"unique_id": "macro.dbt_date.n_weeks_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_away.sql", "original_file_path": "macros/calendar_date/n_weeks_away.sql", "name": "n_weeks_away", "macro_sql": "{%- macro n_weeks_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8208792}, "macro.dbt_date.day_of_month": {"unique_id": "macro.dbt_date.day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "day_of_month", "macro_sql": "{%- macro day_of_month(date) -%}\n{{ dbt_date.date_part('day', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.821142}, "macro.dbt_date.redshift__day_of_month": {"unique_id": "macro.dbt_date.redshift__day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "redshift__day_of_month", "macro_sql": "\n\n{%- macro redshift__day_of_month(date) -%}\ncast({{ dbt_date.date_part('day', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8213198}, "macro.dbt_date.yesterday": {"unique_id": "macro.dbt_date.yesterday", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/yesterday.sql", "original_file_path": "macros/calendar_date/yesterday.sql", "name": "yesterday", "macro_sql": "{%- macro yesterday(date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.821592}, "macro.dbt_date.day_of_week": {"unique_id": "macro.dbt_date.day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "day_of_week", "macro_sql": "{%- macro day_of_week(date, isoweek=true) -%}\n{{ adapter.dispatch('day_of_week', 'dbt_date') (date, isoweek) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_of_week"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.823235}, "macro.dbt_date.default__day_of_week": {"unique_id": "macro.dbt_date.default__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "default__day_of_week", "macro_sql": "\n\n{%- macro default__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else {{ dow }}\n end\n {%- else -%}\n {{ dow }} + 1\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.823529}, "macro.dbt_date.snowflake__day_of_week": {"unique_id": "macro.dbt_date.snowflake__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "snowflake__day_of_week", "macro_sql": "\n\n{%- macro snowflake__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'dayofweekiso' -%}\n {{ dbt_date.date_part(dow_part, date) }}\n {%- else -%}\n {%- set dow_part = 'dayofweek' -%}\n case\n when {{ dbt_date.date_part(dow_part, date) }} = 7 then 1\n else {{ dbt_date.date_part(dow_part, date) }} + 1\n end\n {%- endif -%}\n\n\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.823932}, "macro.dbt_date.bigquery__day_of_week": {"unique_id": "macro.dbt_date.bigquery__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "bigquery__day_of_week", "macro_sql": "\n\n{%- macro bigquery__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (1) to Monday (2)\n when {{ dow }} = 1 then 7\n else {{ dow }} - 1\n end\n {%- else -%}\n {{ dow }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.82422}, "macro.dbt_date.postgres__day_of_week": {"unique_id": "macro.dbt_date.postgres__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "postgres__day_of_week", "macro_sql": "\n\n\n{%- macro postgres__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'isodow' -%}\n -- Monday(1) to Sunday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} as {{ dbt_utils.type_int() }})\n {%- else -%}\n {%- set dow_part = 'dow' -%}\n -- Sunday(1) to Saturday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} + 1 as {{ dbt_utils.type_int() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.82465}, "macro.dbt_date.redshift__day_of_week": {"unique_id": "macro.dbt_date.redshift__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "redshift__day_of_week", "macro_sql": "\n\n\n{%- macro redshift__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else cast({{ dow }} as {{ dbt_utils.type_bigint() }})\n end\n {%- else -%}\n cast({{ dow }} + 1 as {{ dbt_utils.type_bigint() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.825087}, "macro.dbt_date.iso_week_end": {"unique_id": "macro.dbt_date.iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "iso_week_end", "macro_sql": "{%- macro iso_week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.825633}, "macro.dbt_date._iso_week_end": {"unique_id": "macro.dbt_date._iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "_iso_week_end", "macro_sql": "{%- macro _iso_week_end(date, week_type) -%}\n{%- set dt = dbt_date.iso_week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.iso_week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.825851}, "macro.dbt_date.default__iso_week_end": {"unique_id": "macro.dbt_date.default__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "default__iso_week_end", "macro_sql": "\n\n{%- macro default__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8259861}, "macro.dbt_date.snowflake__iso_week_end": {"unique_id": "macro.dbt_date.snowflake__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "snowflake__iso_week_end", "macro_sql": "\n\n{%- macro snowflake__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8261209}, "macro.dbt_date.n_weeks_ago": {"unique_id": "macro.dbt_date.n_weeks_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_ago.sql", "original_file_path": "macros/calendar_date/n_weeks_ago.sql", "name": "n_weeks_ago", "macro_sql": "{%- macro n_weeks_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.82657}, "macro.dbt_date.month_name": {"unique_id": "macro.dbt_date.month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "month_name", "macro_sql": "{%- macro month_name(date, short=True) -%}\n {{ adapter.dispatch('month_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__month_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.827096}, "macro.dbt_date.default__month_name": {"unique_id": "macro.dbt_date.default__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "default__month_name", "macro_sql": "\n\n{%- macro default__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MONTH' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.827297}, "macro.dbt_date.bigquery__month_name": {"unique_id": "macro.dbt_date.bigquery__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "bigquery__month_name", "macro_sql": "\n\n{%- macro bigquery__month_name(date, short) -%}\n{%- set f = '%b' if short else '%B' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.827494}, "macro.dbt_date.snowflake__month_name": {"unique_id": "macro.dbt_date.snowflake__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "snowflake__month_name", "macro_sql": "\n\n{%- macro snowflake__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MMMM' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.827688}, "macro.dbt_date.postgres__month_name": {"unique_id": "macro.dbt_date.postgres__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "postgres__month_name", "macro_sql": "\n\n{%- macro postgres__month_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMMon' if short else 'FMMonth' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.827899}, "macro.dbt_date.last_month_name": {"unique_id": "macro.dbt_date.last_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_name.sql", "original_file_path": "macros/calendar_date/last_month_name.sql", "name": "last_month_name", "macro_sql": "{%- macro last_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.last_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8282208}, "macro.dbt_date.week_of_year": {"unique_id": "macro.dbt_date.week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "week_of_year", "macro_sql": "{%- macro week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.default__week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8286872}, "macro.dbt_date.default__week_of_year": {"unique_id": "macro.dbt_date.default__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "default__week_of_year", "macro_sql": "{%- macro default__week_of_year(date) -%}\ncast({{ dbt_date.date_part('week', date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.828869}, "macro.dbt_date.postgres__week_of_year": {"unique_id": "macro.dbt_date.postgres__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "postgres__week_of_year", "macro_sql": "\n\n{%- macro postgres__week_of_year(date) -%}\n{# postgresql 'week' returns isoweek. Use to_char instead.\n WW = the first week starts on the first day of the year #}\ncast(to_char({{ date }}, 'WW') as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.82901}, "macro.dbt_date.convert_timezone": {"unique_id": "macro.dbt_date.convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "convert_timezone", "macro_sql": "{%- macro convert_timezone(column, target_tz=None, source_tz=None) -%}\n{%- set source_tz = \"UTC\" if not source_tz else source_tz -%}\n{%- set target_tz = var(\"dbt_date:time_zone\") if not target_tz else target_tz -%}\n{{ adapter.dispatch('convert_timezone', 'dbt_date') (column, target_tz, source_tz) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.830208}, "macro.dbt_date.default__convert_timezone": {"unique_id": "macro.dbt_date.default__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "default__convert_timezone", "macro_sql": "{% macro default__convert_timezone(column, target_tz, source_tz) -%}\n{%- if not source_tz -%}\ncast(convert_timezone('{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast(convert_timezone('{{ source_tz }}', '{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.830563}, "macro.dbt_date.bigquery__convert_timezone": {"unique_id": "macro.dbt_date.bigquery__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "bigquery__convert_timezone", "macro_sql": "{%- macro bigquery__convert_timezone(column, target_tz, source_tz=None) -%}\ntimestamp(datetime({{ column }}, '{{ target_tz}}'))\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.830718}, "macro.dbt_date.spark__convert_timezone": {"unique_id": "macro.dbt_date.spark__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "spark__convert_timezone", "macro_sql": "{%- macro spark__convert_timezone(column, target_tz, source_tz) -%}\nfrom_utc_timestamp(\n to_utc_timestamp({{ column }}, '{{ source_tz }}'),\n '{{ target_tz }}'\n )\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.830873}, "macro.dbt_date.postgres__convert_timezone": {"unique_id": "macro.dbt_date.postgres__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "postgres__convert_timezone", "macro_sql": "{% macro postgres__convert_timezone(column, target_tz, source_tz) -%}\n{%- if source_tz -%}\ncast({{ column }} at time zone '{{ source_tz }}' at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast({{ column }} at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.831247}, "macro.dbt_date.redshift__convert_timezone": {"unique_id": "macro.dbt_date.redshift__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "redshift__convert_timezone", "macro_sql": "{%- macro redshift__convert_timezone(column, target_tz, source_tz) -%}\n{{ return(dbt_date.default__convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.831435}, "macro.dbt_date.n_months_away": {"unique_id": "macro.dbt_date.n_months_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_away.sql", "original_file_path": "macros/calendar_date/n_months_away.sql", "name": "n_months_away", "macro_sql": "{%- macro n_months_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.831841}, "macro.dbt_date.iso_week_of_year": {"unique_id": "macro.dbt_date.iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "iso_week_of_year", "macro_sql": "{%- macro iso_week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.83241}, "macro.dbt_date._iso_week_of_year": {"unique_id": "macro.dbt_date._iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "_iso_week_of_year", "macro_sql": "{%- macro _iso_week_of_year(date, week_type) -%}\ncast({{ dbt_date.date_part(week_type, date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.832603}, "macro.dbt_date.default__iso_week_of_year": {"unique_id": "macro.dbt_date.default__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "default__iso_week_of_year", "macro_sql": "\n\n{%- macro default__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.832737}, "macro.dbt_date.snowflake__iso_week_of_year": {"unique_id": "macro.dbt_date.snowflake__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "snowflake__iso_week_of_year", "macro_sql": "\n\n{%- macro snowflake__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.832869}, "macro.dbt_date.postgres__iso_week_of_year": {"unique_id": "macro.dbt_date.postgres__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "postgres__iso_week_of_year", "macro_sql": "\n\n{%- macro postgres__iso_week_of_year(date) -%}\n-- postgresql week is isoweek, the first week of a year containing January 4 of that year.\n{{ dbt_date._iso_week_of_year(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.833014}, "macro.dbt_date.week_end": {"unique_id": "macro.dbt_date.week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "week_end", "macro_sql": "{%- macro week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8335092}, "macro.dbt_date.default__week_end": {"unique_id": "macro.dbt_date.default__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "default__week_end", "macro_sql": "{%- macro default__week_end(date) -%}\n{{ dbt_utils.last_day(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.833662}, "macro.dbt_date.snowflake__week_end": {"unique_id": "macro.dbt_date.snowflake__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "snowflake__week_end", "macro_sql": "\n\n{%- macro snowflake__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.833859}, "macro.dbt_date.postgres__week_end": {"unique_id": "macro.dbt_date.postgres__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "postgres__week_end", "macro_sql": "\n\n{%- macro postgres__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.834054}, "macro.dbt_date.next_month_number": {"unique_id": "macro.dbt_date.next_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_number.sql", "original_file_path": "macros/calendar_date/next_month_number.sql", "name": "next_month_number", "macro_sql": "{%- macro next_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.next_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.834336}, "macro.dbt_date.last_month_number": {"unique_id": "macro.dbt_date.last_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_number.sql", "original_file_path": "macros/calendar_date/last_month_number.sql", "name": "last_month_number", "macro_sql": "{%- macro last_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.last_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.834622}, "macro.dbt_expectations.type_timestamp": {"unique_id": "macro.dbt_expectations.type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_expectations')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835037}, "macro.dbt_expectations.default__type_timestamp": {"unique_id": "macro.dbt_expectations.default__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() -%}\n timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.83511}, "macro.dbt_expectations.snowflake__type_timestamp": {"unique_id": "macro.dbt_expectations.snowflake__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835176}, "macro.dbt_expectations.postgres__type_timestamp": {"unique_id": "macro.dbt_expectations.postgres__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8352408}, "macro.dbt_expectations.type_datetime": {"unique_id": "macro.dbt_expectations.type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_datetime", "macro_sql": "{% macro type_datetime() -%}\n {{ return(adapter.dispatch('type_datetime', 'dbt_expectations')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835406}, "macro.dbt_expectations.default__type_datetime": {"unique_id": "macro.dbt_expectations.default__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_datetime", "macro_sql": "{% macro default__type_datetime() -%}\n datetime\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835474}, "macro.dbt_expectations.snowflake__type_datetime": {"unique_id": "macro.dbt_expectations.snowflake__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_datetime", "macro_sql": "{% macro snowflake__type_datetime() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835541}, "macro.dbt_expectations.postgres__type_datetime": {"unique_id": "macro.dbt_expectations.postgres__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_datetime", "macro_sql": "{% macro postgres__type_datetime() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.835666}, "macro.dbt_expectations.regexp_instr": {"unique_id": "macro.dbt_expectations.regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "regexp_instr", "macro_sql": "{% macro regexp_instr(source_value, regexp, position=1, occurrence=1) %}\n\n {{ adapter.dispatch('regexp_instr', 'dbt_expectations')(\n source_value, regexp, position, occurrence\n ) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__regexp_instr"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.836286}, "macro.dbt_expectations.default__regexp_instr": {"unique_id": "macro.dbt_expectations.default__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "default__regexp_instr", "macro_sql": "{% macro default__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.836479}, "macro.dbt_expectations.redshift__regexp_instr": {"unique_id": "macro.dbt_expectations.redshift__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "redshift__regexp_instr", "macro_sql": "{% macro redshift__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8366778}, "macro.dbt_expectations.postgres__regexp_instr": {"unique_id": "macro.dbt_expectations.postgres__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "postgres__regexp_instr", "macro_sql": "{% macro postgres__regexp_instr(source_value, regexp, position, occurrence) %}\narray_length((select regexp_matches({{ source_value }}, '{{ regexp }}')), 1)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.836826}, "macro.dbt_expectations.spark__regexp_instr": {"unique_id": "macro.dbt_expectations.spark__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "spark__regexp_instr", "macro_sql": "{% macro spark__regexp_instr(source_value, regexp, position, occurrence) %}\ncase when {{ source_value }} rlike '{{ regexp }}' then 1 else 0 end\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.836968}, "macro.dbt_expectations.log_natural": {"unique_id": "macro.dbt_expectations.log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "log_natural", "macro_sql": "{% macro log_natural(x) -%}\n {{ adapter.dispatch('log_natural', 'dbt_expectations') (x) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8372989}, "macro.dbt_expectations.default__log_natural": {"unique_id": "macro.dbt_expectations.default__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "default__log_natural", "macro_sql": "{% macro default__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.837399}, "macro.dbt_expectations.bigquery__log_natural": {"unique_id": "macro.dbt_expectations.bigquery__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "bigquery__log_natural", "macro_sql": "{% macro bigquery__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.837493}, "macro.dbt_expectations.snowflake__log_natural": {"unique_id": "macro.dbt_expectations.snowflake__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "snowflake__log_natural", "macro_sql": "{% macro snowflake__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.83759}, "macro.dbt_expectations.rand": {"unique_id": "macro.dbt_expectations.rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "rand", "macro_sql": "{% macro rand() -%}\n {{ adapter.dispatch('rand', 'dbt_expectations') () }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__rand"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8379571}, "macro.dbt_expectations.default__rand": {"unique_id": "macro.dbt_expectations.default__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "default__rand", "macro_sql": "{% macro default__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8380501}, "macro.dbt_expectations.bigquery__rand": {"unique_id": "macro.dbt_expectations.bigquery__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "bigquery__rand", "macro_sql": "{% macro bigquery__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.838123}, "macro.dbt_expectations.snowflake__rand": {"unique_id": "macro.dbt_expectations.snowflake__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "snowflake__rand", "macro_sql": "{% macro snowflake__rand(seed) %}\n\n uniform(0::float, 1::float, random())\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.838197}, "macro.dbt_expectations.postgres__rand": {"unique_id": "macro.dbt_expectations.postgres__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "postgres__rand", "macro_sql": "{% macro postgres__rand() %}\n\n random()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.838262}, "macro.dbt_expectations.redshift__rand": {"unique_id": "macro.dbt_expectations.redshift__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "redshift__rand", "macro_sql": "{% macro redshift__rand() %}\n\n random()\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.83833}, "macro.dbt_expectations.median": {"unique_id": "macro.dbt_expectations.median", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/median.sql", "original_file_path": "macros/math/median.sql", "name": "median", "macro_sql": "{% macro median(field) %}\n{{ dbt_expectations.percentile_cont(field, 0.5) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.838597}, "macro.dbt_expectations.percentile_cont": {"unique_id": "macro.dbt_expectations.percentile_cont", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "percentile_cont", "macro_sql": "{% macro percentile_cont(field, quantile, partition=None) %}\n {{ adapter.dispatch('quantile', 'dbt_expectations') (field, quantile, partition) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__quantile"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8390641}, "macro.dbt_expectations.default__quantile": {"unique_id": "macro.dbt_expectations.default__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "default__quantile", "macro_sql": "{% macro default__quantile(field, quantile, partition) -%}\n percentile_cont({{ quantile }}) within group (order by {{ field }})\n {%- if partition %}over(partition by {{ partition }}){% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.839262}, "macro.dbt_expectations.bigquery__quantile": {"unique_id": "macro.dbt_expectations.bigquery__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "bigquery__quantile", "macro_sql": "{% macro bigquery__quantile(field, quantile, partition) %}\n percentile_cont({{ field }}, {{ quantile }})\n over({%- if partition %}partition by {{ partition }}{% endif -%})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.839515}, "macro.dbt_expectations.test_expression_between": {"unique_id": "macro.dbt_expectations.test_expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "test_expression_between", "macro_sql": "{% test expression_between(model,\n expression,\n min_value=None,\n max_value=None,\n group_by_columns=None,\n row_condition=None,\n strictly=False\n ) %}\n\n {{ dbt_expectations.expression_between(model, expression, min_value, max_value, group_by_columns, row_condition, strictly) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.840655}, "macro.dbt_expectations.expression_between": {"unique_id": "macro.dbt_expectations.expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "expression_between", "macro_sql": "{% macro expression_between(model,\n expression,\n min_value,\n max_value,\n group_by_columns,\n row_condition,\n strictly\n ) %}\n\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n\n{%- set strict_operator = \"\" if strictly else \"=\" -%}\n\n{% set expression_min_max %}\n( 1=1\n{%- if min_value is not none %} and {{ expression | trim }} >{{ strict_operator }} {{ min_value }}{% endif %}\n{%- if max_value is not none %} and {{ expression | trim }} <{{ strict_operator }} {{ max_value }}{% endif %}\n)\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression_min_max,\n group_by_columns=group_by_columns,\n row_condition=row_condition)\n }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8413801}, "macro.dbt_expectations.test_expression_is_true": {"unique_id": "macro.dbt_expectations.test_expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n\n {{ dbt_expectations.expression_is_true(model, expression, test_condition, group_by_columns, row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.842308}, "macro.dbt_expectations.expression_is_true": {"unique_id": "macro.dbt_expectations.expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "expression_is_true", "macro_sql": "{% macro expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n {{ adapter.dispatch('expression_is_true', 'dbt_expectations') (model, expression, test_condition, group_by_columns, row_condition) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.842595}, "macro.dbt_expectations.default__expression_is_true": {"unique_id": "macro.dbt_expectations.default__expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "default__expression_is_true", "macro_sql": "{% macro default__expression_is_true(model, expression, test_condition, group_by_columns, row_condition) -%}\nwith grouped_expression as (\n select\n {% if group_by_columns %}\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ dbt_expectations.truth_expression(expression) }}\n from {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by_columns %}\n group by\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }}{% if not loop.last %},{% endif %}\n {% endfor %}\n {% endif %}\n\n),\nvalidation_errors as (\n\n select\n *\n from\n grouped_expression\n where\n not(expression {{ test_condition }})\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.84319}, "macro.dbt_expectations.get_select": {"unique_id": "macro.dbt_expectations.get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "get_select", "macro_sql": "{% macro get_select(model, expression, row_condition, group_by) -%}\n {{ adapter.dispatch('get_select', 'dbt_expectations') (model, expression, row_condition, group_by) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.848042}, "macro.dbt_expectations.default__get_select": {"unique_id": "macro.dbt_expectations.default__get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__get_select", "macro_sql": "\n\n{%- macro default__get_select(model, expression, row_condition, group_by) %}\n select\n {% if group_by %}\n {% for g in group_by -%}\n {{ g }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ expression }} as expression\n from\n {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by %}\n group by\n {% for g in group_by -%}\n {{ loop.index }}{% if not loop.last %},{% endif %}\n {% endfor %}\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": 1651799834.8485918}, "macro.dbt_expectations.test_equal_expression": {"unique_id": "macro.dbt_expectations.test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "test_equal_expression", "macro_sql": "{% test equal_expression(model, expression,\n compare_model=None,\n compare_expression=None,\n group_by=None,\n compare_group_by=None,\n row_condition=None,\n compare_row_condition=None,\n tolerance=0.0,\n tolerance_percent=None\n ) -%}\n\n {{ adapter.dispatch('test_equal_expression', 'dbt_expectations') (\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.849068}, "macro.dbt_expectations.default__test_equal_expression": {"unique_id": "macro.dbt_expectations.default__test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__test_equal_expression", "macro_sql": "\n\n{%- macro default__test_equal_expression(\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) -%}\n\n {%- set compare_model = model if not compare_model else compare_model -%}\n {%- set compare_expression = expression if not compare_expression else compare_expression -%}\n {%- set compare_row_condition = row_condition if not compare_row_condition else compare_row_condition -%}\n {%- set compare_group_by = group_by if not compare_group_by else compare_group_by -%}\n\n {%- set n_cols = (group_by|length) if group_by else 0 %}\n with a as (\n {{ dbt_expectations.get_select(model, expression, row_condition, group_by) }}\n ),\n b as (\n {{ dbt_expectations.get_select(compare_model, compare_expression, compare_row_condition, compare_group_by) }}\n ),\n final as (\n\n select\n {% for i in range(1, n_cols + 1) -%}\n coalesce(a.col_{{ i }}, b.col_{{ i }}) as col_{{ i }},\n {% endfor %}\n a.expression,\n b.expression as compare_expression,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0)) as expression_difference,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0))/\n nullif(a.expression * 1.0, 0) as expression_difference_percent\n from\n {% if n_cols > 0 %}\n a\n full outer join\n b on\n {% for i in range(1, n_cols + 1) -%}\n a.col_{{ i }} = b.col_{{ i }} {% if not loop.last %}and{% endif %}\n {% endfor -%}\n {% else %}\n a cross join b\n {% endif %}\n )\n -- DEBUG:\n -- select * from final\n select\n *\n from final\n where\n {% if tolerance_percent %}\n expression_difference_percent > {{ tolerance_percent }}\n {% else %}\n expression_difference > {{ tolerance }}\n {% endif %}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.850328}, "macro.dbt_expectations.truth_expression": {"unique_id": "macro.dbt_expectations.truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "truth_expression", "macro_sql": "{% macro truth_expression(expression) %}\n {{ adapter.dispatch('truth_expression', 'dbt_expectations') (expression) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8506298}, "macro.dbt_expectations.default__truth_expression": {"unique_id": "macro.dbt_expectations.default__truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "default__truth_expression", "macro_sql": "{% macro default__truth_expression(expression) %}\n {{ expression }} as expression\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.85073}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "name": "test_expect_column_values_to_match_like_pattern", "macro_sql": "{% test expect_column_values_to_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8513}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "name": "test_expect_column_values_to_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8523269}, "macro.dbt_expectations.test_expect_column_values_to_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "name": "test_expect_column_values_to_match_regex", "macro_sql": "{% test expect_column_values_to_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.852959}, "macro.dbt_expectations.test_expect_column_value_lengths_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "name": "test_expect_column_value_lengths_to_equal", "macro_sql": "{% test expect_column_value_lengths_to_equal(model, column_name,\n value,\n row_condition=None\n ) %}\n\n{% set expression = dbt_utils.length(column_name) ~ \" = \" ~ value %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.853514}, "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "name": "test_expect_column_value_lengths_to_be_between", "macro_sql": "{% test expect_column_value_lengths_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\n{{ dbt_utils.length(column_name) }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8543842}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "name": "test_expect_column_values_to_not_match_regex", "macro_sql": "{% test expect_column_values_to_not_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.855009}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "name": "test_expect_column_values_to_not_match_regex_list", "macro_sql": "{% test expect_column_values_to_not_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for regex in regex_list %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{%- if not loop.last %}\n{{ \" and \" if match_on == \"all\" else \" or \"}}\n{% endif -%}\n{% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8560572}, "macro.dbt_expectations.test_expect_column_values_to_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "name": "test_expect_column_values_to_match_regex_list", "macro_sql": "{% test expect_column_values_to_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for regex in regex_list %}\n {{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8570611}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "name": "test_expect_column_values_to_not_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.858081}, "macro.dbt_expectations._get_like_pattern_expression": {"unique_id": "macro.dbt_expectations._get_like_pattern_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "original_file_path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "name": "_get_like_pattern_expression", "macro_sql": "{% macro _get_like_pattern_expression(column_name, like_pattern, positive) %}\n{{ column_name }} {{ \"not\" if not positive else \"\" }} like '{{ like_pattern }}'\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.858384}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "name": "test_expect_column_values_to_not_match_like_pattern", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8589492}, "macro.dbt_expectations.test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "test_expect_row_values_to_have_recent_data", "macro_sql": "{% test expect_row_values_to_have_recent_data(model,\n column_name,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_row_values_to_have_recent_data', 'dbt_expectations') (model,\n column_name,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.860043}, "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "default__test_expect_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_row_values_to_have_recent_data(model, column_name, datepart, interval, row_condition) %}\n{%- set default_start_date = '1970-01-01' -%}\nwith max_recency as (\n\n select max(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})) as max_timestamp\n from\n {{ model }}\n where\n cast({{ column_name }} as {{ dbt_utils.type_timestamp() }}) <= {{ dbt_date.now() }}\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('{{ default_start_date }}' as {{ dbt_utils.type_timestamp() }}))\n <\n cast({{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }} as {{ dbt_utils.type_timestamp() }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_date.now", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.860666}, "macro.dbt_expectations.test_expect_table_columns_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "name": "test_expect_table_columns_to_contain_set", "macro_sql": "{%- test expect_table_columns_to_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n input_columns i\n left join\n relation_columns r on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n r.relation_column is null\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.861881}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "name": "test_expect_table_row_count_to_equal_other_table", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table(model, compare_model, factor=1, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_equal_expression(model, \"count(*)\",\n compare_model=compare_model,\n compare_expression=\"count(*) * \" + factor|string,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8623412}, "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "name": "test_expect_table_columns_to_not_contain_set", "macro_sql": "{%- test expect_table_columns_to_not_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n -- catch any column in input list that is in the list of table columns\n select *\n from\n input_columns i\n inner join\n relation_columns r on r.relation_column = i.input_column\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8634722}, "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% test expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_grouped_row_values_to_have_recent_data', 'dbt_expectations') (model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.865165}, "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "default__test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) %}\nwith latest_grouped_timestamps as (\n\n select\n {%- for g in group_by %}\n {{ g }},\n {%- endfor %}\n max(1) as join_key,\n max({{ timestamp_column }}) as latest_timestamp_column\n from\n {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {{ dbt_utils.group_by(group_by | length )}}\n\n),\ntotal_row_counts as (\n\n select\n max(1) as join_key,\n count(*) as row_count\n from\n latest_grouped_timestamps\n\n),\noutdated_grouped_timestamps as (\n\n select *\n from\n latest_grouped_timestamps\n where\n latest_timestamp_column < {{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }}\n\n),\nvalidation_errors as (\n\n select\n r.row_count,\n t.*\n from\n total_row_counts r\n left join\n outdated_grouped_timestamps t\n on r.join_key = t.join_key\n where\n -- fail if either no rows were returned due to row_condition,\n -- or the recency test returned failed rows\n r.row_count = 0\n or\n t.join_key is not null\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.group_by", "macro.dbt_utils.dateadd", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.865688}, "macro.dbt_expectations.test_expect_column_to_exist": {"unique_id": "macro.dbt_expectations.test_expect_column_to_exist", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "original_file_path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "name": "test_expect_column_to_exist", "macro_sql": "{%- test expect_column_to_exist(model, column_name, column_index=None, transform=\"upper\") -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | map(transform) | join -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n\n {%- set matching_column_index = relation_column_names.index(column_name) if column_name in relation_column_names else -1 %}\n\n {%- if column_index -%}\n\n {%- set column_index_0 = column_index - 1 if column_index > 0 else 0 -%}\n\n {%- set column_index_matches = true if matching_column_index == column_index_0 else false %}\n\n {%- else -%}\n\n {%- set column_index_matches = true -%}\n\n {%- endif %}\n\n with test_data as (\n\n select\n cast('{{ column_name }}' as {{ dbt_utils.type_string() }}) as column_name,\n {{ matching_column_index }} as matching_column_index,\n {{ column_index_matches }} as column_index_matches\n\n )\n select *\n from test_data\n where\n not(matching_column_index >= 0 and column_index_matches)\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8668742}, "macro.dbt_expectations.test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "test_expect_table_row_count_to_equal", "macro_sql": "{%- test expect_table_row_count_to_equal(model,\n value,\n group_by=None,\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_table_row_count_to_equal',\n 'dbt_expectations') (model,\n value,\n group_by,\n row_condition\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_table_row_count_to_equal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8678558}, "macro.dbt_expectations.default__test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.default__test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "default__test_expect_table_row_count_to_equal", "macro_sql": "\n\n\n\n{%- macro default__test_expect_table_row_count_to_equal(model,\n value,\n group_by,\n row_condition\n ) -%}\n{% set expression %}\ncount(*) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8681412}, "macro.dbt_expectations.test_expect_table_row_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "name": "test_expect_table_row_count_to_be_between", "macro_sql": "{%- test expect_table_row_count_to_be_between(model,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n{% set expression %}\ncount(*)\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.868876}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "name": "test_expect_table_row_count_to_equal_other_table_times_factor", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table_times_factor(model, compare_model, factor, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_expect_table_row_count_to_equal_other_table(model, compare_model,\n factor=factor,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8692439}, "macro.dbt_expectations.test_expect_table_columns_to_match_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "name": "test_expect_table_columns_to_match_set", "macro_sql": "{%- test expect_table_columns_to_match_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n -- or any table column that is not in the input list\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.870537}, "macro.dbt_expectations._get_column_list": {"unique_id": "macro.dbt_expectations._get_column_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_get_column_list.sql", "original_file_path": "macros/schema_tests/table_shape/_get_column_list.sql", "name": "_get_column_list", "macro_sql": "{%- macro _get_column_list(model, transform=\"upper\") -%}\n{%- set relation_columns = adapter.get_columns_in_relation(model) -%}\n{%- set relation_column_names = relation_columns | map(attribute=\"name\") | map(transform) | list -%}\n{%- do return(relation_column_names) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.870965}, "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "name": "test_expect_table_columns_to_match_ordered_list", "macro_sql": "{%- test expect_table_columns_to_match_ordered_list(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select\n {{ loop.index }} as relation_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select\n {{ loop.index }} as input_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column and r.relation_column_idx = i.input_column_idx\n where\n -- catch any column in input list that is not in the sequence of table columns\n -- or any table column that is not in the input sequence\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.872324}, "macro.dbt_expectations._list_intersect": {"unique_id": "macro.dbt_expectations._list_intersect", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_list_intersect.sql", "original_file_path": "macros/schema_tests/table_shape/_list_intersect.sql", "name": "_list_intersect", "macro_sql": "{%- macro _list_intersect(list1, list2) -%}\n{%- set matching_items = [] -%}\n{%- for itm in list1 -%}\n {%- if itm in list2 -%}\n {%- do matching_items.append(itm) -%}\n {%- endif -%}\n{%- endfor -%}\n{%- do return(matching_items) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.872778}, "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "name": "test_expect_table_column_count_to_equal_other_table", "macro_sql": "{%- test expect_table_column_count_to_equal_other_table(model, compare_model) -%}\n{%- if execute -%}\n{%- set number_columns = (adapter.get_columns_in_relation(model) | length) -%}\n{%- set compare_number_columns = (adapter.get_columns_in_relation(compare_model) | length) -%}\nwith test_data as (\n\n select\n {{ number_columns }} as number_columns,\n {{ compare_number_columns }} as compare_number_columns\n\n)\nselect *\nfrom test_data\nwhere\n number_columns != compare_number_columns\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.873291}, "macro.dbt_expectations.test_expect_table_column_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "name": "test_expect_table_column_count_to_equal", "macro_sql": "{%- test expect_table_column_count_to_equal(model, value) -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ value }} as value\n\n)\nselect *\nfrom test_data\nwhere\n number_actual_columns != value\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.873694}, "macro.dbt_expectations.test_expect_table_column_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "name": "test_expect_table_column_count_to_be_between", "macro_sql": "{%- test expect_table_column_count_to_be_between(model,\n min_value=None,\n max_value=None\n ) -%}\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\n\n{%- set expression %}\n( 1=1\n{%- if min_value %} and number_actual_columns >= min_value{% endif %}\n{%- if max_value %} and number_actual_columns <= max_value{% endif %}\n)\n{% endset -%}\n\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ min_value if min_value else 0 }} as min_value,\n {{ max_value if max_value else 0 }} as max_value\n\n)\nselect *\nfrom test_data\nwhere\n not {{ expression }}\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.874676}, "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "name": "test_expect_column_values_to_not_be_in_set", "macro_sql": "{% test expect_column_values_to_not_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that match the set\n select\n v.value_field\n from\n all_values v\n join\n set_values s on v.value_field = s.value_field\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.875561}, "macro.dbt_expectations.test_expect_column_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "name": "test_expect_column_values_to_be_in_set", "macro_sql": "{% test expect_column_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.876466}, "macro.dbt_expectations.test_expect_column_values_to_be_increasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_increasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "name": "test_expect_column_values_to_be_increasing", "macro_sql": "{% test expect_column_values_to_be_increasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \">\" if strictly else \">=\" -%}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8778071}, "macro.dbt_expectations.test_expect_column_values_to_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "name": "test_expect_column_values_to_be_null", "macro_sql": "{% test expect_column_values_to_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.878332}, "macro.dbt_expectations.test_expect_column_values_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "name": "test_expect_column_values_to_be_unique", "macro_sql": "{% test expect_column_values_to_be_unique(model, column_name, row_condition=None) %}\n{{ dbt_expectations.test_expect_compound_columns_to_be_unique(model, [column_name], row_condition=row_condition) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_compound_columns_to_be_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8786361}, "macro.dbt_expectations.test_expect_column_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "name": "test_expect_column_values_to_be_between", "macro_sql": "{% test expect_column_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ column_name }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.87941}, "macro.dbt_expectations.test_expect_column_values_to_be_decreasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_decreasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "name": "test_expect_column_values_to_be_decreasing", "macro_sql": "{% test expect_column_values_to_be_decreasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \"<\" if strictly else \"<=\" %}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.880577}, "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "name": "test_expect_column_values_to_be_in_type_list", "macro_sql": "{%- test expect_column_values_to_be_in_type_list(model, column_name, column_type_list) -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | upper -%}\n {%- set columns_in_relation = adapter.get_columns_in_relation(model) -%}\n {%- set column_type_list = column_type_list| map(\"upper\") | list -%}\n with relation_columns as (\n\n {% for column in columns_in_relation %}\n select\n cast('{{ column.name | upper }}' as {{ dbt_utils.type_string() }}) as relation_column,\n cast('{{ column.dtype | upper }}' as {{ dbt_utils.type_string() }}) as relation_column_type\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '{{ column_name }}'\n and\n relation_column_type not in ('{{ column_type_list | join(\"', '\") }}')\n\n )\n select *\n from test_data\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8816462}, "macro.dbt_expectations.test_expect_column_values_to_be_of_type": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_of_type", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "name": "test_expect_column_values_to_be_of_type", "macro_sql": "{%- test expect_column_values_to_be_of_type(model, column_name, column_type) -%}\n{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(model, column_name, [column_type]) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8819451}, "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "name": "test_expect_column_values_to_have_consistent_casing", "macro_sql": "{% test expect_column_values_to_have_consistent_casing(model, column_name, display_inconsistent_columns=False) %}\n\nwith test_data as (\n\n select\n distinct {{ column_name }} as distinct_values\n from\n {{ model }}\n\n ),\n {% if display_inconsistent_columns %}\n validation_errors as (\n\n select\n lower(distinct_values) as inconsistent_columns,\n count(distinct_values) as set_count_case_insensitive\n from\n test_data\n group by 1\n having\n count(distinct_values) > 1\n\n )\n select * from validation_errors\n {% else %}\n validation_errors as (\n\n select\n count(1) as set_count,\n count(distinct lower(distinct_values)) as set_count_case_insensitive\n from\n test_data\n\n )\n select *\n from\n validation_errors\n where\n set_count != set_count_case_insensitive\n {% endif %}\n {%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8824372}, "macro.dbt_expectations.test_expect_column_values_to_not_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "name": "test_expect_column_values_to_not_be_null", "macro_sql": "{% test expect_column_values_to_not_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is not null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8829281}, "macro.dbt_expectations.test_expect_column_min_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_min_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "name": "test_expect_column_min_to_be_between", "macro_sql": "{% test expect_column_min_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmin({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.883801}, "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "name": "test_expect_column_unique_value_count_to_be_between", "macro_sql": "{% test expect_column_unique_value_count_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.884619}, "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "name": "test_expect_column_quantile_values_to_be_between", "macro_sql": "{% test expect_column_quantile_values_to_be_between(model, column_name,\n quantile,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.percentile_cont(column_name, quantile) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.885489}, "macro.dbt_expectations.test_expect_column_median_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_median_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "name": "test_expect_column_median_to_be_between", "macro_sql": "{% test expect_column_median_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.median(column_name) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.median", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.886376}, "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "name": "test_expect_column_proportion_of_unique_values_to_be_between", "macro_sql": "{% test expect_column_proportion_of_unique_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})/count({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.887254}, "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "name": "test_expect_column_distinct_values_to_equal_set", "macro_sql": "{% test expect_column_distinct_values_to_equal_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as column_value\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n all_values v\n full outer join\n unique_set_values s on v.column_value = s.value_field\n where\n v.column_value is null or\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.888143}, "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% test expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values=False,\n data_type=\"decimal\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_column_most_common_value_to_be_in_set', 'dbt_expectations') (model, column_name, value_set, top_n, quote_values, data_type, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.889706}, "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "default__test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% macro default__test_expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values,\n data_type,\n row_condition\n ) %}\n\nwith value_counts as (\n\n select\n {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %} as value_field,\n count(*) as value_count\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n group by {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %}\n\n),\nvalue_counts_ranked as (\n\n select\n *,\n row_number() over(order by value_count desc) as value_count_rank\n from\n value_counts\n\n),\nvalue_count_top_n as (\n\n select\n value_field\n from\n value_counts_ranked\n where\n value_count_rank = {{ top_n }}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n cast({{ value }} as {{ data_type }})\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n value_field\n from\n value_count_top_n\n where\n value_field not in (select value_field from unique_set_values)\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.890456}, "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "name": "test_expect_column_distinct_values_to_contain_set", "macro_sql": "{% test expect_column_distinct_values_to_contain_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values in set that are not in the list of values from the model\n select\n s.value_field\n from\n unique_set_values s\n left join\n all_values v on s.value_field = v.value_field\n where\n v.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.891361}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "name": "test_expect_column_distinct_count_to_equal", "macro_sql": "{% test expect_column_distinct_count_to_equal(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.892025}, "macro.dbt_expectations.test_expect_column_sum_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_sum_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "name": "test_expect_column_sum_to_be_between", "macro_sql": "{% test expect_column_sum_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nsum({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.892829}, "macro.dbt_expectations.test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "test_expect_column_stdev_to_be_between", "macro_sql": "{% test expect_column_stdev_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n {{ adapter.dispatch('test_expect_column_stdev_to_be_between', 'dbt_expectations') (\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_stdev_to_be_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.8941948}, "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "default__test_expect_column_stdev_to_be_between", "macro_sql": "{% macro default__test_expect_column_stdev_to_be_between(\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) %}\n\n{% set expression %}\nstddev({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.89459}, "macro.dbt_expectations.test_expect_column_mean_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_mean_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "name": "test_expect_column_mean_to_be_between", "macro_sql": "{% test expect_column_mean_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\navg({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.895406}, "macro.dbt_expectations.test_expect_column_max_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_max_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "name": "test_expect_column_max_to_be_between", "macro_sql": "{% test expect_column_max_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmax({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.896204}, "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "name": "test_expect_column_distinct_count_to_be_greater_than", "macro_sql": "{% test expect_column_distinct_count_to_be_greater_than(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) > {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.896876}, "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "name": "test_expect_column_distinct_values_to_be_in_set", "macro_sql": "{% test expect_column_distinct_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=False,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n unique_set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.897758}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "name": "test_expect_column_distinct_count_to_equal_other_table", "macro_sql": "{% test expect_column_distinct_count_to_equal_other_table(model,\n compare_model,\n column_name,\n compare_column_name,\n row_condition=None,\n compare_row_condition=None\n ) %}\n{%- set expression -%}\ncount(distinct {{ column_name }})\n{%- endset -%}\n{%- set compare_expression -%}\n{%- if compare_column_name -%}\ncount(distinct {{ compare_column_name }})\n{%- else -%}\n{{ expression }}\n{%- endif -%}\n{%- endset -%}\n{{ dbt_expectations.test_equal_expression(\n model,\n expression=expression,\n compare_model=compare_model,\n compare_expression=compare_expression,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.898526}, "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "original_file_path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "name": "test_expect_row_values_to_have_data_for_every_n_datepart", "macro_sql": "{%- test expect_row_values_to_have_data_for_every_n_datepart(model,\n date_col,\n date_part=\"day\",\n interval=None,\n row_condition=None,\n exclusion_condition=None,\n test_start_date=None,\n test_end_date=None) -%}\n{% if not execute %}\n {{ return('') }}\n{% endif %}\n\n{% if not test_start_date or not test_end_date %}\n {% set sql %}\n\n select\n min({{ date_col }}) as start_{{ date_part }},\n max({{ date_col }}) as end_{{ date_part }}\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {% endset %}\n\n {%- set dr = run_query(sql) -%}\n {%- set db_start_date = dr.columns[0].values()[0].strftime('%Y-%m-%d') -%}\n {%- set db_end_date = dr.columns[1].values()[0].strftime('%Y-%m-%d') -%}\n\n{% endif %}\n\n{% if not test_start_date %}\n{% set start_date = db_start_date %}\n{% else %}\n{% set start_date = test_start_date %}\n{% endif %}\n\n\n{% if not test_end_date %}\n{% set end_date = db_end_date %}\n{% else %}\n{% set end_date = test_end_date %}\n{% endif %}\nwith base_dates as (\n\n {{ dbt_date.get_base_dates(start_date=start_date, end_date=end_date, datepart=date_part) }}\n {% if interval %}\n {# \n Filter the date spine created above down to the interval granularity using a modulo operation.\n The number of date_parts after the start_date divided by the integer interval will produce no remainder for the desired intervals, \n e.g. for 2-day interval from a starting Jan 1, 2020:\n params: start_date = '2020-01-01', date_part = 'day', interval = 2\n date spine created above: [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-04, 2020-01-05, ...]\n The first parameter to the `mod` function would be the number of days between the start_date and the spine date, i.e. [0, 1, 2, 3, 4 ...]\n The second parameter to the `mod` function would be the integer interval, i.e. 2\n This modulo operation produces the following remainders: [0, 1, 0, 1, 0, ...]\n Filtering the spine only where this remainder == 0 will return a spine with every other day as desired, i.e. [2020-01-01, 2020-01-03, 2020-01-05, ...]\n #}\n where mod(\n cast({{ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", 'date_' ~ date_part, date_part) }} as {{ dbt_utils.type_int() }}),\n cast({{interval}} as {{ dbt_utils.type_int() }})\n ) = 0\n {% endif %}\n\n),\nmodel_data as (\n\n select\n {% if not interval %}\n\n cast({{ dbt_utils.date_trunc(date_part, date_col) }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n\n {% else %}\n {# \n Use a modulo operator to determine the number of intervals that a date_col is away from the interval-date spine \n and subtracts that amount to effectively slice each date_col record into its corresponding spine bucket,\n e.g. given a date_col of with records [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-11, 2020-01-12]\n if we want to slice these dates into their 2-day buckets starting Jan 1, 2020 (start_date = '2020-01-01', date_part='day', interval=2),\n the modulo operation described above will produce these remainders: [0, 1, 0, 0, 1]\n subtracting that number of days from the observations will produce records [2020-01-01, 2020-01-01, 2020-01-03, 2020-01-11, 2020-01-11],\n all of which align with records from the interval-date spine\n #}\n {{dbt_utils.dateadd(\n date_part, \n \"mod(\n cast(\" ~ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", date_col, date_part) ~ \" as \" ~ dbt_utils.type_int() ~ \" ),\n cast(\" ~ interval ~ \" as \" ~ dbt_utils.type_int() ~ \" )\n ) * (-1)\", \n \"cast( \" ~ dbt_utils.date_trunc(date_part, date_col) ~ \" as \" ~ dbt_expectations.type_datetime() ~ \")\"\n )}} as date_{{ date_part }},\n \n {% endif %}\n \n count(*) as row_cnt\n from\n {{ model }} f\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n group by\n date_{{date_part}}\n\n),\n\nfinal as (\n\n select\n cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n case when f.date_{{ date_part }} is null then true else false end as is_missing,\n coalesce(f.row_cnt, 0) as row_cnt\n from\n base_dates d\n left join\n model_data f on cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) = f.date_{{ date_part }}\n)\nselect\n *\nfrom final\nwhere row_cnt = 0\n{% if exclusion_condition %}\n and {{ exclusion_condition }}\n{% endif %}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt_date.get_base_dates", "macro.dbt_utils.datediff", "macro.dbt_utils.type_int", "macro.dbt_utils.date_trunc", "macro.dbt_expectations.type_datetime", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.902434}, "macro.dbt_expectations._get_metric_expression": {"unique_id": "macro.dbt_expectations._get_metric_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "_get_metric_expression", "macro_sql": "{%- macro _get_metric_expression(metric_column, take_logs) -%}\n\n{%- if take_logs %}\n{%- set expr = \"nullif(\" ~ metric_column ~ \", 0)\" -%}\ncoalesce({{ dbt_expectations.log_natural(expr) }}, 0)\n{%- else -%}\ncoalesce({{ metric_column }}, 0)\n{%- endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.905687}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period='day',\n lookback_periods=1,\n trend_periods=7,\n test_periods=14,\n sigma_threshold=3,\n sigma_threshold_upper=None,\n sigma_threshold_lower=None,\n take_diffs=true,\n take_logs=true\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_moving_stdevs', 'dbt_expectations') (model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.9062028}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) %}\n\n{%- set sigma_threshold_upper = sigma_threshold_upper if sigma_threshold_upper else sigma_threshold -%}\n{%- set sigma_threshold_lower = sigma_threshold_lower if sigma_threshold_lower else -1 * sigma_threshold -%}\n\nwith metric_values as (\n\n with grouped_metric_values as (\n\n select\n {{ dbt_utils.date_trunc(period, date_column_name) }} as metric_period,\n sum({{ column_name }}) as agg_metric_value\n from\n {{ model }}\n group by\n 1\n\n ),\n {%- if take_diffs %}\n grouped_metric_values_with_priors as (\n\n select\n *,\n lag(agg_metric_value, {{ lookback_periods }}) over(order by metric_period) as prior_agg_metric_value\n from\n grouped_metric_values d\n\n )\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n -\n {{ dbt_expectations._get_metric_expression(\"prior_agg_metric_value\", take_logs) }}\n as metric_test_value\n from\n grouped_metric_values_with_priors d\n\n {%- else %}\n\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n from\n grouped_metric_values\n\n {%- endif %}\n\n),\nmetric_moving_calcs as (\n\n select\n *,\n avg(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_average,\n stddev(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_stddev\n from\n metric_values\n\n),\nmetric_sigma as (\n\n select\n *,\n (metric_test_value - metric_test_rolling_average) as metric_test_delta,\n (metric_test_value - metric_test_rolling_average)/nullif(metric_test_rolling_stddev, 0) as metric_test_sigma\n from\n metric_moving_calcs\n\n)\nselect\n *\nfrom\n metric_sigma\nwhere\n\n metric_period >= cast(\n {{ dbt_utils.dateadd(period, -test_periods, dbt_utils.date_trunc(period, dbt_date.now())) }}\n as {{ dbt_utils.type_timestamp() }})\n and\n metric_period < {{ dbt_utils.date_trunc(period, dbt_date.now()) }}\n and\n\n not (\n metric_test_sigma >= {{ sigma_threshold_lower }} and\n metric_test_sigma <= {{ sigma_threshold_upper }}\n )\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_expectations._get_metric_expression", "macro.dbt_utils.dateadd", "macro.dbt_date.now", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.9073012}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by=None,\n sigma_threshold=3\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_stdevs', 'dbt_expectations') (model, column_name, group_by, sigma_threshold) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.908233}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by,\n sigma_threshold\n ) %}\nwith metric_values as (\n\n {% if group_by -%}\n select\n {{ group_by }} as metric_date,\n sum({{ column_name }}) as {{ column_name }}\n from\n {{ model }}\n group by\n 1\n {%- else -%}\n select\n {{ column_name }} as {{ column_name }}\n from\n {{ model }}\n {%- endif %}\n\n),\nmetric_values_with_statistics as (\n\n select\n *,\n avg({{ column_name }}) over() as {{ column_name }}_average,\n stddev({{ column_name }}) over() as {{ column_name }}_stddev\n from\n metric_values\n\n),\nmetric_values_z_scores as (\n\n select\n *,\n ({{ column_name }} - {{ column_name }}_average)/{{ column_name }}_stddev as {{ column_name }}_sigma\n from\n metric_values_with_statistics\n\n)\nselect\n *\nfrom\n metric_values_z_scores\nwhere\n abs({{ column_name }}_sigma) > {{ sigma_threshold }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.908752}, "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% test expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_select_column_values_to_be_unique_within_record', 'dbt_expectations') (model, column_list, quote_columns, ignore_row_if, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.9105349}, "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "default__test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% macro default__test_expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns,\n ignore_row_if,\n row_condition\n ) %}\n\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\nwith column_values as (\n\n select\n row_number() over(order by 1) as row_index,\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where 1=1\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n {% if ignore_row_if == \"all_values_are_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {%- endfor %}\n )\n {% elif ignore_row_if == \"any_value_is_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {%- endfor %}\n )\n {% endif %}\n\n),\nunpivot_columns as (\n\n {% for column in columns %}\n select row_index, '{{ column }}' as column_name, {{ column }} as column_value from column_values\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n\n select\n row_index,\n count(distinct column_value) as column_values\n from unpivot_columns\n group by 1\n having count(distinct column_value) < {{ columns | length }}\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.911812}, "macro.dbt_expectations.test_expect_compound_columns_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_compound_columns_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "original_file_path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "name": "test_expect_compound_columns_to_be_unique", "macro_sql": "{% test expect_compound_columns_to_be_unique(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) %}\n{% if not column_list %}\n {{ exceptions.raise_compiler_error(\n \"`column_list` must be specified as a list of columns. Got: '\" ~ column_list ~\"'.'\"\n ) }}\n{% endif %}\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for expect_compound_columns_to_be_unique test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set row_condition_ext -%}\n\n{%- if row_condition %}\n {{ row_condition }} and\n{% endif -%}\n\n{%- if ignore_row_if == \"all_values_are_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {% endfor %}\n )\n{%- elif ignore_row_if == \"any_value_is_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {% endfor %}\n )\n{%- endif -%}\n{%- endset -%}\n\nwith validation_errors as (\n\n select\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where\n 1=1\n {%- if row_condition_ext %}\n and {{ row_condition_ext }}\n {% endif %}\n group by\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n having count(*) > 1\n\n)\nselect * from validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.91445}, "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "name": "test_expect_multicolumn_sum_to_equal", "macro_sql": "{% test expect_multicolumn_sum_to_equal(model,\n column_list,\n sum_total,\n group_by=None,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for column in column_list %}\nsum({{ column }}){% if not loop.last %} + {% endif %}\n{% endfor %} = {{ sum_total }}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.9153678}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "name": "test_expect_column_pair_values_to_be_equal", "macro_sql": "{% test expect_column_pair_values_to_be_equal(model,\n column_A,\n column_B,\n row_condition=None\n ) %}\n\n{% set operator = \"=\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.916022}, "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "name": "test_expect_column_pair_values_A_to_be_greater_than_B", "macro_sql": "{% test expect_column_pair_values_A_to_be_greater_than_B(model,\n column_A,\n column_B,\n or_equal=False,\n row_condition=None\n ) %}\n\n{% set operator = \">=\" if or_equal else \">\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.916725}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "name": "test_expect_column_pair_values_to_be_in_set", "macro_sql": "{% test expect_column_pair_values_to_be_in_set(model,\n column_A,\n column_B,\n value_pairs_set,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for pair in value_pairs_set %}\n{%- if (pair | length) == 2 %}\n({{ column_A }} = {{ pair[0] }} and {{ column_B }} = {{ pair[1] }}){% if not loop.last %} or {% endif %}\n{% else %}\n{{ exceptions.raise_compiler_error(\n \"`value_pairs_set` argument for expect_column_pair_values_to_be_in_set test cannot have more than 2 item per element.\n Got: '\" ~ pair ~ \"'.'\"\n ) }}\n{% endif %}\n{% endfor %}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1651799834.9181361}}, "docs": {"flow_models.tx_count": {"unique_id": "flow_models.tx_count", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_count.md", "original_file_path": "models/descriptions/tx_count.md", "name": "tx_count", "block_contents": "The number of transactions in the block."}, "flow_models.count_authorizers": {"unique_id": "flow_models.count_authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/count_authorizers.md", "original_file_path": "models/descriptions/count_authorizers.md", "name": "count_authorizers", "block_contents": "Number of authorizers"}, "flow_models.tx_id": {"unique_id": "flow_models.tx_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_id.md", "original_file_path": "models/descriptions/tx_id.md", "name": "tx_id", "block_contents": "ID for the transaction."}, "flow_models.event_index": {"unique_id": "flow_models.event_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_index.md", "original_file_path": "models/descriptions/event_index.md", "name": "event_index", "block_contents": "The index of the event within the transaction, i.e. in what order the events occurred."}, "flow_models.network": {"unique_id": "flow_models.network", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/network.md", "original_file_path": "models/descriptions/network.md", "name": "network", "block_contents": "The blockchain network the block or transaction occurred on."}, "flow_models.proposer": {"unique_id": "flow_models.proposer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/proposer.md", "original_file_path": "models/descriptions/proposer.md", "name": "proposer", "block_contents": "Address of the transaction proposer."}, "flow_models.event_contract": {"unique_id": "flow_models.event_contract", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_contract.md", "original_file_path": "models/descriptions/event_contract.md", "name": "event_contract", "block_contents": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "flow_models.tx_succeeded": {"unique_id": "flow_models.tx_succeeded", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_succeeded.md", "original_file_path": "models/descriptions/tx_succeeded.md", "name": "tx_succeeded", "block_contents": "Transaction status, if it succeeded or failed."}, "flow_models.gas_limit": {"unique_id": "flow_models.gas_limit", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/gas_limit.md", "original_file_path": "models/descriptions/gas_limit.md", "name": "gas_limit", "block_contents": "Upper gas limit attached to the transaction."}, "flow_models.attribute_key": {"unique_id": "flow_models.attribute_key", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_key.md", "original_file_path": "models/descriptions/attribute_key.md", "name": "attribute_key", "block_contents": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "flow_models.attribute_value": {"unique_id": "flow_models.attribute_value", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value.md", "original_file_path": "models/descriptions/attribute_value.md", "name": "attribute_value", "block_contents": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "flow_models._ingested_at": {"unique_id": "flow_models._ingested_at", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_ingested_at.md", "original_file_path": "models/descriptions/_ingested_at.md", "name": "_ingested_at", "block_contents": "When the record was ingested by the chainwalker."}, "flow_models.event_data": {"unique_id": "flow_models.event_data", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_data.md", "original_file_path": "models/descriptions/event_data.md", "name": "event_data", "block_contents": "The raw event data from the event."}, "flow_models.payer": {"unique_id": "flow_models.payer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/payer.md", "original_file_path": "models/descriptions/payer.md", "name": "payer", "block_contents": "Address of the wallet paying for the transaction."}, "flow_models.decoded_address": {"unique_id": "flow_models.decoded_address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/decoded_address.md", "original_file_path": "models/descriptions/decoded_address.md", "name": "decoded_address", "block_contents": "The decoded address, if applicable, for the attribute_value."}, "flow_models.attribute_id": {"unique_id": "flow_models.attribute_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_id.md", "original_file_path": "models/descriptions/attribute_id.md", "name": "attribute_id", "block_contents": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "flow_models.id": {"unique_id": "flow_models.id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/id.md", "original_file_path": "models/descriptions/id.md", "name": "id", "block_contents": "The block hash."}, "flow_models._event_data_type": {"unique_id": "flow_models._event_data_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_type.md", "original_file_path": "models/descriptions/_event_data_type.md", "name": "_event_data_type", "block_contents": "The type object from event_data."}, "flow_models.attribute_index": {"unique_id": "flow_models.attribute_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_index.md", "original_file_path": "models/descriptions/attribute_index.md", "name": "attribute_index", "block_contents": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "flow_models._event_data_fields": {"unique_id": "flow_models._event_data_fields", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_fields.md", "original_file_path": "models/descriptions/_event_data_fields.md", "name": "_event_data_fields", "block_contents": "The fields object from the event_data."}, "flow_models.attribute_value_adj": {"unique_id": "flow_models.attribute_value_adj", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value_adj.md", "original_file_path": "models/descriptions/attribute_value_adj.md", "name": "attribute_value_adj", "block_contents": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "flow_models.block_height": {"unique_id": "flow_models.block_height", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_height.md", "original_file_path": "models/descriptions/block_height.md", "name": "block_height", "block_contents": "The block height the block was recorded at."}, "flow_models.event_id": {"unique_id": "flow_models.event_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_id.md", "original_file_path": "models/descriptions/event_id.md", "name": "event_id", "block_contents": "The id for the event, which is a concatenation of tx_id-event_index."}, "flow_models.transaction_result": {"unique_id": "flow_models.transaction_result", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/transaction_result.md", "original_file_path": "models/descriptions/transaction_result.md", "name": "transaction_result", "block_contents": "Outcome of the transaction, including events that were called."}, "flow_models.authorizers": {"unique_id": "flow_models.authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/authorizers.md", "original_file_path": "models/descriptions/authorizers.md", "name": "authorizers", "block_contents": "Address(es) authorizing the transaction."}, "flow_models.event_type": {"unique_id": "flow_models.event_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_type.md", "original_file_path": "models/descriptions/event_type.md", "name": "event_type", "block_contents": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "flow_models.parent_id": {"unique_id": "flow_models.parent_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/parent_id.md", "original_file_path": "models/descriptions/parent_id.md", "name": "parent_id", "block_contents": "The block hash for the parent block."}, "flow_models.chain_id": {"unique_id": "flow_models.chain_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/chain_id.md", "original_file_path": "models/descriptions/chain_id.md", "name": "chain_id", "block_contents": "The id for the chain of the network on which this block occurred."}, "flow_models.block_timestamp": {"unique_id": "flow_models.block_timestamp", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_timestamp.md", "original_file_path": "models/descriptions/block_timestamp.md", "name": "block_timestamp", "block_contents": "The date and time for when the block was written."}, "dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"model.flow_models.bronze__blocks": ["source.flow_models.prod.flow_blocks"], "model.flow_models.bronze__transactions": ["source.flow_models.prod.flow_txs"], "model.flow_models.silver__events": ["model.flow_models.silver__transactions"], "model.flow_models.silver__transactions": ["model.flow_models.bronze__transactions"], "model.flow_models.silver__blocks": ["model.flow_models.bronze__blocks"], "model.flow_models.silver__event_attributes": ["model.flow_models.silver__events"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": ["model.flow_models.silver__blocks"], "test.flow_models.unique_silver__blocks_block_height.478ce02832": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_id.b40d544128": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": ["model.flow_models.silver__events"], "test.flow_models.unique_silver__events_event_id.c34161972a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_height.7977589637": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_contract.d88483871a": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_type.db25419673": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": ["model.flow_models.silver__events"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": ["model.flow_models.silver__transactions"], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": ["model.flow_models.silver__event_attributes"], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": ["model.flow_models.silver__event_attributes"], "source.flow_models.prod.flow_blocks": [], "source.flow_models.prod.flow_txs": []}, "child_map": {"model.flow_models.bronze__blocks": ["model.flow_models.silver__blocks"], "model.flow_models.bronze__transactions": ["model.flow_models.silver__transactions"], "model.flow_models.silver__events": ["model.flow_models.silver__event_attributes", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "test.flow_models.not_null_silver__events__event_data_type.db25419673", "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "test.flow_models.not_null_silver__events_block_height.7977589637", "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "test.flow_models.not_null_silver__events_event_contract.d88483871a", "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "test.flow_models.unique_silver__events_event_id.c34161972a"], "model.flow_models.silver__transactions": ["model.flow_models.silver__events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169"], "model.flow_models.silver__blocks": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "test.flow_models.not_null_silver__blocks_id.b40d544128", "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "test.flow_models.unique_silver__blocks_block_height.478ce02832"], "model.flow_models.silver__event_attributes": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": [], "test.flow_models.unique_silver__blocks_block_height.478ce02832": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": [], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": [], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": [], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": [], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": [], "test.flow_models.not_null_silver__blocks_id.b40d544128": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": [], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": [], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": [], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": [], "test.flow_models.unique_silver__events_event_id.c34161972a": [], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": [], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": [], "test.flow_models.not_null_silver__events_block_height.7977589637": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": [], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": [], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": [], "test.flow_models.not_null_silver__events_event_contract.d88483871a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": [], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": [], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": [], "test.flow_models.not_null_silver__events__event_data_type.db25419673": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": [], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": [], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": [], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": [], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": [], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": [], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": [], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": [], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": [], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": [], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": [], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": [], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": [], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": [], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": [], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": [], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": [], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": [], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": [], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": [], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": [], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": [], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": [], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": [], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": [], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": [], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": [], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": [], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": [], "source.flow_models.prod.flow_blocks": ["model.flow_models.bronze__blocks"], "source.flow_models.prod.flow_txs": ["model.flow_models.bronze__transactions"]}} \ No newline at end of file diff --git a/macros/tests/sequence_gaps.sql b/macros/tests/sequence_gaps.sql new file mode 100644 index 0000000..9425003 --- /dev/null +++ b/macros/tests/sequence_gaps.sql @@ -0,0 +1,34 @@ +{% test sequence_gaps( + model, + partition_by, + column_name +) %} +{%- set partition_sql = partition_by | join(", ") -%} +{%- set previous_column = "prev_" ~ column_name -%} +WITH source AS ( + SELECT + {{ partition_sql + "," if partition_sql }} + {{ column_name }}, + LAG( + {{ column_name }}, + 1 + ) over ( + {{ "PARTITION BY " ~ partition_sql if partition_sql }} + ORDER BY + {{ column_name }} ASC + ) AS {{ previous_column }} + FROM + {{ model }} +) +SELECT + {{ partition_sql + "," if partition_sql }} + {{ previous_column }}, + {{ column_name }}, + {{ column_name }} - {{ previous_column }} + - 1 AS gap +FROM + source +WHERE + {{ column_name }} - {{ previous_column }} <> 1 +ORDER BY + gap DESC {% endtest %} diff --git a/macros/tests/tx_gaps.sql b/macros/tests/tx_gaps.sql new file mode 100644 index 0000000..448380d --- /dev/null +++ b/macros/tests/tx_gaps.sql @@ -0,0 +1,35 @@ +{% test tx_gaps( + model, + column_name, + column_block, + column_tx_count +) %} +WITH block_base AS ( + SELECT + {{ column_block }}, + {{ column_tx_count }} + FROM + {{ ref('silver__blocks') }} +), +model_name AS ( + SELECT + {{ column_block }}, + COUNT( + DISTINCT {{ column_name }} + ) AS model_tx_count + FROM + {{ model }} + GROUP BY + {{ column_block }} +) +SELECT + block_base.{{ column_block }}, + {{ column_tx_count }}, + model_name.{{ column_block }}, + model_tx_count +FROM + block_base + LEFT JOIN model_name + ON block_base.{{ column_block }} = model_name.{{ column_block }} +WHERE + {{ column_tx_count }} <> model_tx_count {% endtest %} diff --git a/models/gold/gold__blocks.sql b/models/gold/gold__blocks.sql index ce43362..2ba5e8a 100644 --- a/models/gold/gold__blocks.sql +++ b/models/gold/gold__blocks.sql @@ -11,10 +11,11 @@ WITH silver_blocks AS ( * FROM {{ ref('silver__blocks') }} + WHERE + block_timestamp >= '2022-05-09' {% if is_incremental() %} -WHERE - _ingested_at :: DATE >= CURRENT_DATE - 2 +AND _ingested_at :: DATE >= CURRENT_DATE - 2 {% endif %} ), gold_blocks AS ( diff --git a/models/gold/gold__blocks.yml b/models/gold/gold__blocks.yml index 7d3b874..feb728c 100644 --- a/models/gold/gold__blocks.yml +++ b/models/gold/gold__blocks.yml @@ -4,6 +4,10 @@ version: 2 models: - name: gold__blocks description: Information about blocks on the FLOW network and corresponding metadata. + tests: + - sequence_gaps: + column_name: block_height + where: BLOCK_TIMESTAMP < CURRENT_DATE columns: - name: block_height diff --git a/models/gold/gold__events.sql b/models/gold/gold__events.sql index c255a5e..bd06719 100644 --- a/models/gold/gold__events.sql +++ b/models/gold/gold__events.sql @@ -11,10 +11,11 @@ WITH silver_events AS ( * FROM {{ ref('silver__events') }} + WHERE + block_timestamp >= '2022-05-09' {% if is_incremental() %} -WHERE - _ingested_at :: DATE >= CURRENT_DATE -2 +AND _ingested_at :: DATE >= CURRENT_DATE -2 {% endif %} ), silver_event_attributes AS ( @@ -22,10 +23,11 @@ silver_event_attributes AS ( * FROM {{ ref('silver__event_attributes') }} + WHERE + block_timestamp >= '2022-05-09' {% if is_incremental() %} -WHERE - _ingested_at :: DATE >= CURRENT_DATE -2 +AND _ingested_at :: DATE >= CURRENT_DATE -2 {% endif %} ), objs AS ( diff --git a/models/gold/gold__transactions.sql b/models/gold/gold__transactions.sql index e37edde..e7f8e92 100644 --- a/models/gold/gold__transactions.sql +++ b/models/gold/gold__transactions.sql @@ -11,10 +11,11 @@ WITH silver_txs AS ( * FROM {{ ref('silver__transactions') }} + WHERE + block_timestamp >= '2022-05-09' {% if is_incremental() %} -WHERE - _ingested_at :: DATE > CURRENT_DATE - 2 +AND _ingested_at :: DATE > CURRENT_DATE - 2 {% endif %} ), gold_txs AS ( diff --git a/models/gold/gold__transactions.yml b/models/gold/gold__transactions.yml index 258e55b..2867ead 100644 --- a/models/gold/gold__transactions.yml +++ b/models/gold/gold__transactions.yml @@ -17,6 +17,10 @@ models: tests: - not_null - unique + - tx_gaps: + column_block: block_height + column_tx_count: tx_count + where: BLOCK_TIMESTAMP < CURRENT_DATE - name: block_timestamp description: "{{ doc('block_timestamp') }}" diff --git a/models/silver/silver__blocks.yml b/models/silver/silver__blocks.yml index 189caec..d92ad10 100644 --- a/models/silver/silver__blocks.yml +++ b/models/silver/silver__blocks.yml @@ -8,7 +8,7 @@ models: - dbt_utils.unique_combination_of_columns: combination_of_columns: - block_height - + columns: - name: block_height description: "{{ doc('block_height') }}" diff --git a/target/catalog.json b/target/catalog.json index dcd5d8d..13a6cf9 100644 --- a/target/catalog.json +++ b/target/catalog.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.4", "generated_at": "2022-05-18T22:36:16.988057Z", "invocation_id": "9b0b8ce6-16de-4ecd-a7a6-c90d0b506fc7", "env": {}}, "nodes": {"model.flow_models.bronze__labels": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "LABELS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"_SYSTEM_CREATED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "_SYSTEM_CREATED_AT", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "_INGESTED_AT", "comment": null}, "BLOCKCHAIN": {"type": "TEXT", "index": 3, "name": "BLOCKCHAIN", "comment": null}, "ADDRESS": {"type": "TEXT", "index": 4, "name": "ADDRESS", "comment": null}, "CREATOR": {"type": "TEXT", "index": 5, "name": "CREATOR", "comment": null}, "LABEL_TYPE": {"type": "TEXT", "index": 6, "name": "LABEL_TYPE", "comment": null}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 7, "name": "LABEL_SUBTYPE", "comment": null}, "ADDRESS_NAME": {"type": "TEXT", "index": 8, "name": "ADDRESS_NAME", "comment": null}, "PROJECT_NAME": {"type": "TEXT", "index": 9, "name": "PROJECT_NAME", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__labels"}, "model.flow_models.bronze__transactions": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__transactions"}, "model.flow_models.gold__transactions": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": "tbd"}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": "Address of the transaction proposer."}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": "Address of the wallet paying for the transaction."}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": "Address(es) authorizing the transaction."}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": "Number of authorizers"}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": "Upper gas limit attached to the transaction."}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": "Outcome of the transaction, including events that were called."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": "tbd"}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 14008719.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 7752527872.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__transactions"}, "model.flow_models.silver__blocks": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": "The blockchain network the block or transaction occurred on."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": "The number of transactions in the block."}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": "The block hash."}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": "The block hash for the parent block."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 8, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 2644078.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 233382400.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__blocks"}, "model.flow_models.silver__events": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"EVENT_ID": {"type": "TEXT", "index": 1, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 3, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 4, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 5, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "EVENT_INDEX": {"type": "NUMBER", "index": 6, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "EVENT_DATA": {"type": "VARIANT", "index": 9, "name": "EVENT_DATA", "comment": "The raw event data from the event."}, "_EVENT_DATA_TYPE": {"type": "VARIANT", "index": 10, "name": "_EVENT_DATA_TYPE", "comment": "The type object from event_data."}, "_EVENT_DATA_FIELDS": {"type": "VARIANT", "index": 11, "name": "_EVENT_DATA_FIELDS", "comment": "The fields object from the event_data."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 12, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 85294839.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 7361309696.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__events"}, "model.flow_models.silver__labels": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "LABELS", "database": "FLOW_DEV", "comment": "This table provides labels for addresses on the Flow blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}, "BLOCKCHAIN": {"type": "TEXT", "index": 2, "name": "BLOCKCHAIN", "comment": "The name of the blockchain for this address."}, "ADDRESS": {"type": "TEXT", "index": 3, "name": "ADDRESS", "comment": "The on-chain address."}, "CREATOR": {"type": "TEXT", "index": 4, "name": "CREATOR", "comment": "The source of the labeling information for the address."}, "LABEL_TYPE": {"type": "TEXT", "index": 5, "name": "LABEL_TYPE", "comment": "Predominant label categorization, such as CEX, Operator, NFT, etc."}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 6, "name": "LABEL_SUBTYPE", "comment": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc."}, "ADDRESS_NAME": {"type": "TEXT", "index": 7, "name": "ADDRESS_NAME", "comment": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator."}, "PROJECT_NAME": {"type": "TEXT", "index": 8, "name": "PROJECT_NAME", "comment": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names)."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(address)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 6255.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 162816.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__labels"}, "model.flow_models.silver__transactions": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": "tbd"}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": "Address of the transaction proposer."}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": "Address of the wallet paying for the transaction."}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": "Address(es) authorizing the transaction."}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": "Number of authorizers"}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": "Upper gas limit attached to the transaction."}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": "Outcome of the transaction, including events that were called."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": "tbd"}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 14, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 14008719.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 7728078848.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__transactions"}, "model.flow_models.core__fact_blocks": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": null}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": null}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_blocks"}, "model.flow_models.core__fact_events": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": null}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 4, "name": "TX_SUCCEEDED", "comment": null}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": null}, "EVENT_CONTRACT": {"type": "TEXT", "index": 6, "name": "EVENT_CONTRACT", "comment": null}, "EVENT_TYPE": {"type": "TEXT", "index": 7, "name": "EVENT_TYPE", "comment": null}, "EVENT_DATA": {"type": "OBJECT", "index": 8, "name": "EVENT_DATA", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_events"}, "model.flow_models.core__fact_transactions": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": null}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": null}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": null}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": null}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": null}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": null}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": null}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": null}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": null}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_transactions"}, "model.flow_models.gold__events": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 4, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 6, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "EVENT_TYPE": {"type": "TEXT", "index": 7, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "EVENT_DATA": {"type": "OBJECT", "index": 8, "name": "EVENT_DATA", "comment": "The data passed to the event, in the form of key-value pairs."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::date)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 85294839.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 4269594112.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__events"}, "model.flow_models.bronze__blocks": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "BLOCKS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__blocks"}, "model.flow_models.gold__blocks": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": "The blockchain network the block or transaction occurred on."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": "The number of transactions in the block."}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": "The block hash."}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": "The block hash for the parent block."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 2644078.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 226560512.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__blocks"}, "model.flow_models.silver__contract_labels": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "CONTRACT_LABELS", "database": "FLOW_DEV", "comment": "This table extracts all contract labels referenced in the events item of a Flow transaction.", "owner": "INTERNAL_DEV"}, "columns": {"EVENT_CONTRACT": {"type": "TEXT", "index": 1, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "CONTRACT_NAME": {"type": "TEXT", "index": 2, "name": "CONTRACT_NAME", "comment": "The primary name of the contract, derived from the full contract address."}, "ACCOUNT_ADDRESS": {"type": "TEXT", "index": 3, "name": "ACCOUNT_ADDRESS", "comment": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 22:35UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(event_contract)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 334.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 357888.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__contract_labels"}, "model.flow_models.silver__event_attributes": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENT_ATTRIBUTES", "database": "FLOW_DEV", "comment": "This table cleans and transform attributes from each event in the events table.", "owner": "INTERNAL_DEV"}, "columns": {"ATTRIBUTE_ID": {"type": "TEXT", "index": 1, "name": "ATTRIBUTE_ID", "comment": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "EVENT_ID": {"type": "TEXT", "index": 2, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 3, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "ATTRIBUTE_INDEX": {"type": "NUMBER", "index": 6, "name": "ATTRIBUTE_INDEX", "comment": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "ATTRIBUTE_KEY": {"type": "TEXT", "index": 9, "name": "ATTRIBUTE_KEY", "comment": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "DECODED_ADDRESS": {"type": "TEXT", "index": 10, "name": "DECODED_ADDRESS", "comment": "The decoded address, if applicable, for the attribute_value."}, "ATTRIBUTE_VALUE": {"type": "VARIANT", "index": 11, "name": "ATTRIBUTE_VALUE", "comment": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "ATTRIBUTE_VALUE_ADJ": {"type": "TEXT", "index": 12, "name": "ATTRIBUTE_VALUE_ADJ", "comment": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 13, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 10:15UTC", "include": true, "description": "The timestamp for last update/change"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 190918648.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 19837419520.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__event_attributes"}}, "sources": {"source.flow_models.prod.flow_blocks": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_BLOCKS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "INGESTED_AT", "comment": null}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 22:35UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 23996182.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 1436166144.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_blocks"}, "source.flow_models.prod.flow_txs": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_TXS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "INGESTED_AT", "comment": null}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-18 22:35UTC", "include": true, "description": "The timestamp for last update/change"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 140477414.0, "include": true, "description": "An approximate count of rows in this table"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 80991107072.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_txs"}, "source.flow_models.crosschain.address_labels": {"metadata": {"type": "VIEW", "schema": "CROSSCHAIN", "name": "ADDRESS_LABELS", "database": "FLIPSIDE_PROD_DB", "comment": null, "owner": "ACCOUNTADMIN"}, "columns": {"SYSTEM_CREATED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "SYSTEM_CREATED_AT", "comment": null}, "INSERT_DATE": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "INSERT_DATE", "comment": "The date the label was inserted in the table"}, "BLOCKCHAIN": {"type": "TEXT", "index": 3, "name": "BLOCKCHAIN", "comment": "The name of the blockchain"}, "ADDRESS": {"type": "TEXT", "index": 4, "name": "ADDRESS", "comment": "Address that the label is for. This is the field that should be used to join other tables with labels."}, "CREATOR": {"type": "TEXT", "index": 5, "name": "CREATOR", "comment": "The name of the creator of the label"}, "LABEL_TYPE": {"type": "TEXT", "index": 6, "name": "LABEL_TYPE", "comment": "A high-level category describing the addresses main function or ownership"}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 7, "name": "LABEL_SUBTYPE", "comment": "A sub-category nested within label type providing further detail"}, "ADDRESS_NAME": {"type": "TEXT", "index": 8, "name": "ADDRESS_NAME", "comment": null}, "PROJECT_NAME": {"type": "TEXT", "index": 9, "name": "PROJECT_NAME", "comment": "Name of the controlling entity of the address"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.crosschain.address_labels"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.4", "generated_at": "2022-05-19T23:23:58.208814Z", "invocation_id": "7b45de74-0efd-4e9c-97ce-d034039efa9b", "env": {}}, "nodes": {"model.flow_models.bronze__transactions": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__transactions"}, "model.flow_models.core__fact_events": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": null}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 4, "name": "TX_SUCCEEDED", "comment": null}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": null}, "EVENT_CONTRACT": {"type": "TEXT", "index": 6, "name": "EVENT_CONTRACT", "comment": null}, "EVENT_TYPE": {"type": "TEXT", "index": 7, "name": "EVENT_TYPE", "comment": null}, "EVENT_DATA": {"type": "OBJECT", "index": 8, "name": "EVENT_DATA", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_events"}, "model.flow_models.silver__blocks": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": "The blockchain network the block or transaction occurred on."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": "The number of transactions in the block."}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": "The block hash."}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": "The block hash for the parent block."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 8, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:13UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 252096000.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 3107638.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__blocks"}, "model.flow_models.silver__contract_labels": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "CONTRACT_LABELS", "database": "FLOW_DEV", "comment": "This table extracts all contract labels referenced in the events item of a Flow transaction.", "owner": "INTERNAL_DEV"}, "columns": {"EVENT_CONTRACT": {"type": "TEXT", "index": 1, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "CONTRACT_NAME": {"type": "TEXT", "index": 2, "name": "CONTRACT_NAME", "comment": "The primary name of the contract, derived from the full contract address."}, "ACCOUNT_ADDRESS": {"type": "TEXT", "index": 3, "name": "ACCOUNT_ADDRESS", "comment": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:17UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 15360.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(event_contract)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 352.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__contract_labels"}, "model.flow_models.silver__events": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"EVENT_ID": {"type": "TEXT", "index": 1, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 3, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 4, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 5, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "EVENT_INDEX": {"type": "NUMBER", "index": 6, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "EVENT_DATA": {"type": "VARIANT", "index": 9, "name": "EVENT_DATA", "comment": "The raw event data from the event."}, "_EVENT_DATA_TYPE": {"type": "VARIANT", "index": 10, "name": "_EVENT_DATA_TYPE", "comment": "The type object from event_data."}, "_EVENT_DATA_FIELDS": {"type": "VARIANT", "index": 11, "name": "_EVENT_DATA_FIELDS", "comment": "The fields object from the event_data."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 12, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:16UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 8452269056.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 100417735.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__events"}, "model.flow_models.silver__labels": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "LABELS", "database": "FLOW_DEV", "comment": "This table provides labels for addresses on the Flow blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}, "BLOCKCHAIN": {"type": "TEXT", "index": 2, "name": "BLOCKCHAIN", "comment": "The name of the blockchain for this address."}, "ADDRESS": {"type": "TEXT", "index": 3, "name": "ADDRESS", "comment": "The on-chain address."}, "CREATOR": {"type": "TEXT", "index": 4, "name": "CREATOR", "comment": "The source of the labeling information for the address."}, "LABEL_TYPE": {"type": "TEXT", "index": 5, "name": "LABEL_TYPE", "comment": "Predominant label categorization, such as CEX, Operator, NFT, etc."}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 6, "name": "LABEL_SUBTYPE", "comment": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc."}, "ADDRESS_NAME": {"type": "TEXT", "index": 7, "name": "ADDRESS_NAME", "comment": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator."}, "PROJECT_NAME": {"type": "TEXT", "index": 8, "name": "PROJECT_NAME", "comment": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names)."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:13UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 162816.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(address)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 6255.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__labels"}, "model.flow_models.bronze__blocks": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "BLOCKS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "_INGESTED_AT", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__blocks"}, "model.flow_models.bronze__labels": {"metadata": {"type": "VIEW", "schema": "BRONZE", "name": "LABELS", "database": "FLOW_DEV", "comment": null, "owner": "INTERNAL_DEV"}, "columns": {"_SYSTEM_CREATED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "_SYSTEM_CREATED_AT", "comment": null}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "_INGESTED_AT", "comment": null}, "BLOCKCHAIN": {"type": "TEXT", "index": 3, "name": "BLOCKCHAIN", "comment": null}, "ADDRESS": {"type": "TEXT", "index": 4, "name": "ADDRESS", "comment": null}, "CREATOR": {"type": "TEXT", "index": 5, "name": "CREATOR", "comment": null}, "LABEL_TYPE": {"type": "TEXT", "index": 6, "name": "LABEL_TYPE", "comment": null}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 7, "name": "LABEL_SUBTYPE", "comment": null}, "ADDRESS_NAME": {"type": "TEXT", "index": 8, "name": "ADDRESS_NAME", "comment": null}, "PROJECT_NAME": {"type": "TEXT", "index": 9, "name": "PROJECT_NAME", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.bronze__labels"}, "model.flow_models.silver__event_attributes": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "EVENT_ATTRIBUTES", "database": "FLOW_DEV", "comment": "This table cleans and transform attributes from each event in the events table.", "owner": "INTERNAL_DEV"}, "columns": {"ATTRIBUTE_ID": {"type": "TEXT", "index": 1, "name": "ATTRIBUTE_ID", "comment": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "EVENT_ID": {"type": "TEXT", "index": 2, "name": "EVENT_ID", "comment": "The id for the event, which is a concatenation of tx_id-event_index."}, "TX_ID": {"type": "TEXT", "index": 3, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "ATTRIBUTE_INDEX": {"type": "NUMBER", "index": 6, "name": "ATTRIBUTE_INDEX", "comment": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 7, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "EVENT_TYPE": {"type": "TEXT", "index": 8, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "ATTRIBUTE_KEY": {"type": "TEXT", "index": 9, "name": "ATTRIBUTE_KEY", "comment": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "DECODED_ADDRESS": {"type": "TEXT", "index": 10, "name": "DECODED_ADDRESS", "comment": "The decoded address, if applicable, for the attribute_value."}, "ATTRIBUTE_VALUE": {"type": "VARIANT", "index": 11, "name": "ATTRIBUTE_VALUE", "comment": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "ATTRIBUTE_VALUE_ADJ": {"type": "TEXT", "index": 12, "name": "ATTRIBUTE_VALUE_ADJ", "comment": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 13, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:17UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 24334010880.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 224108055.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__event_attributes"}, "model.flow_models.silver__transactions": {"metadata": {"type": "BASE TABLE", "schema": "SILVER", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": "tbd"}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": "Address of the transaction proposer."}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": "Address of the wallet paying for the transaction."}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": "Address(es) authorizing the transaction."}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": "Number of authorizers"}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": "Upper gas limit attached to the transaction."}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": "Outcome of the transaction, including events that were called."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": "tbd"}, "_INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 14, "name": "_INGESTED_AT", "comment": "When the record was ingested by the chainwalker."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:15UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 9199849984.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(_ingested_at::DATE, block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 15679831.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.silver__transactions"}, "model.flow_models.core__fact_blocks": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": null}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": null}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_blocks"}, "model.flow_models.core__fact_transactions": {"metadata": {"type": "VIEW", "schema": "CORE", "name": "FACT_TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": null}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": null}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": null}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": null}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": null}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": null}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": null}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": null}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": null}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": null}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.core__fact_transactions"}, "model.flow_models.gold__blocks": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "BLOCKS", "database": "FLOW_DEV", "comment": "Information about blocks on the FLOW network and corresponding metadata.", "owner": "INTERNAL_DEV"}, "columns": {"BLOCK_HEIGHT": {"type": "NUMBER", "index": 1, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "NETWORK": {"type": "TEXT", "index": 3, "name": "NETWORK", "comment": "The blockchain network the block or transaction occurred on."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_COUNT": {"type": "NUMBER", "index": 5, "name": "TX_COUNT", "comment": "The number of transactions in the block."}, "ID": {"type": "TEXT", "index": 6, "name": "ID", "comment": "The block hash."}, "PARENT_ID": {"type": "TEXT", "index": 7, "name": "PARENT_ID", "comment": "The block hash for the parent block."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:13UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 49530368.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 678334.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__blocks"}, "model.flow_models.gold__events": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "EVENTS", "database": "FLOW_DEV", "comment": "This table records events from each transaction on the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 4, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "EVENT_INDEX": {"type": "NUMBER", "index": 5, "name": "EVENT_INDEX", "comment": "The index of the event within the transaction, i.e. in what order the events occurred."}, "EVENT_CONTRACT": {"type": "TEXT", "index": 6, "name": "EVENT_CONTRACT", "comment": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "EVENT_TYPE": {"type": "TEXT", "index": 7, "name": "EVENT_TYPE", "comment": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "EVENT_DATA": {"type": "OBJECT", "index": 8, "name": "EVENT_DATA", "comment": "The data passed to the event, in the form of key-value pairs."}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:18UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 1634486784.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::date)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 25421062.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__events"}, "model.flow_models.gold__transactions": {"metadata": {"type": "BASE TABLE", "schema": "GOLD", "name": "TRANSACTIONS", "database": "FLOW_DEV", "comment": "This table records all the transactions of the FLOW blockchain.", "owner": "INTERNAL_DEV"}, "columns": {"TX_ID": {"type": "TEXT", "index": 1, "name": "TX_ID", "comment": "ID for the transaction."}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "BLOCK_TIMESTAMP", "comment": "The date and time for when the block was written."}, "BLOCK_HEIGHT": {"type": "NUMBER", "index": 3, "name": "BLOCK_HEIGHT", "comment": "The block height the block was recorded at."}, "CHAIN_ID": {"type": "TEXT", "index": 4, "name": "CHAIN_ID", "comment": "The id for the chain of the network on which this block occurred."}, "TX_INDEX": {"type": "NUMBER", "index": 5, "name": "TX_INDEX", "comment": "tbd"}, "PROPOSER": {"type": "TEXT", "index": 6, "name": "PROPOSER", "comment": "Address of the transaction proposer."}, "PAYER": {"type": "TEXT", "index": 7, "name": "PAYER", "comment": "Address of the wallet paying for the transaction."}, "AUTHORIZERS": {"type": "ARRAY", "index": 8, "name": "AUTHORIZERS", "comment": "Address(es) authorizing the transaction."}, "COUNT_AUTHORIZERS": {"type": "NUMBER", "index": 9, "name": "COUNT_AUTHORIZERS", "comment": "Number of authorizers"}, "GAS_LIMIT": {"type": "NUMBER", "index": 10, "name": "GAS_LIMIT", "comment": "Upper gas limit attached to the transaction."}, "TRANSACTION_RESULT": {"type": "VARIANT", "index": 11, "name": "TRANSACTION_RESULT", "comment": "Outcome of the transaction, including events that were called."}, "TX_SUCCEEDED": {"type": "BOOLEAN", "index": 12, "name": "TX_SUCCEEDED", "comment": "Transaction status, if it succeeded or failed."}, "ERROR_MSG": {"type": "TEXT", "index": 13, "name": "ERROR_MSG", "comment": "tbd"}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:16UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 3035925504.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "clustering_key": {"id": "clustering_key", "label": "Clustering Key", "value": "LINEAR(block_timestamp::DATE)", "include": true, "description": "The key used to cluster this table"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 4543803.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.flow_models.gold__transactions"}}, "sources": {"source.flow_models.prod.flow_blocks": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_BLOCKS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 2, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 3, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 4, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 5, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 6, "name": "CHAIN_ID", "comment": null}, "TX_COUNT": {"type": "NUMBER", "index": 7, "name": "TX_COUNT", "comment": null}, "HEADER": {"type": "VARIANT", "index": 8, "name": "HEADER", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 9, "name": "INGESTED_AT", "comment": null}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:23UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 1556911616.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 25278346.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_blocks"}, "source.flow_models.prod.flow_txs": {"metadata": {"type": "BASE TABLE", "schema": "PROD", "name": "FLOW_TXS", "database": "CHAINWALKERS", "comment": null, "owner": "SYSADMIN"}, "columns": {"RECORD_ID": {"type": "TEXT", "index": 1, "name": "RECORD_ID", "comment": null}, "TX_ID": {"type": "TEXT", "index": 2, "name": "TX_ID", "comment": null}, "TX_BLOCK_INDEX": {"type": "NUMBER", "index": 3, "name": "TX_BLOCK_INDEX", "comment": null}, "OFFSET_ID": {"type": "NUMBER", "index": 4, "name": "OFFSET_ID", "comment": null}, "BLOCK_ID": {"type": "NUMBER", "index": 5, "name": "BLOCK_ID", "comment": null}, "BLOCK_TIMESTAMP": {"type": "TIMESTAMP_NTZ", "index": 6, "name": "BLOCK_TIMESTAMP", "comment": null}, "NETWORK": {"type": "TEXT", "index": 7, "name": "NETWORK", "comment": null}, "CHAIN_ID": {"type": "TEXT", "index": 8, "name": "CHAIN_ID", "comment": null}, "TX": {"type": "VARIANT", "index": 9, "name": "TX", "comment": null}, "INGESTED_AT": {"type": "TIMESTAMP_NTZ", "index": 10, "name": "INGESTED_AT", "comment": null}}, "stats": {"last_modified": {"id": "last_modified", "label": "Last Modified", "value": "2022-05-19 23:23UTC", "include": true, "description": "The timestamp for last update/change"}, "bytes": {"id": "bytes", "label": "Approximate Size", "value": 85743579136.0, "include": true, "description": "Approximate size of the table as reported by Snowflake"}, "row_count": {"id": "row_count", "label": "Row Count", "value": 144057613.0, "include": true, "description": "An approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.prod.flow_txs"}, "source.flow_models.crosschain.address_labels": {"metadata": {"type": "VIEW", "schema": "CROSSCHAIN", "name": "ADDRESS_LABELS", "database": "FLIPSIDE_PROD_DB", "comment": null, "owner": "ACCOUNTADMIN"}, "columns": {"SYSTEM_CREATED_AT": {"type": "TIMESTAMP_NTZ", "index": 1, "name": "SYSTEM_CREATED_AT", "comment": null}, "INSERT_DATE": {"type": "TIMESTAMP_NTZ", "index": 2, "name": "INSERT_DATE", "comment": "The date the label was inserted in the table"}, "BLOCKCHAIN": {"type": "TEXT", "index": 3, "name": "BLOCKCHAIN", "comment": "The name of the blockchain"}, "ADDRESS": {"type": "TEXT", "index": 4, "name": "ADDRESS", "comment": "Address that the label is for. This is the field that should be used to join other tables with labels."}, "CREATOR": {"type": "TEXT", "index": 5, "name": "CREATOR", "comment": "The name of the creator of the label"}, "LABEL_TYPE": {"type": "TEXT", "index": 6, "name": "LABEL_TYPE", "comment": "A high-level category describing the addresses main function or ownership"}, "LABEL_SUBTYPE": {"type": "TEXT", "index": 7, "name": "LABEL_SUBTYPE", "comment": "A sub-category nested within label type providing further detail"}, "ADDRESS_NAME": {"type": "TEXT", "index": 8, "name": "ADDRESS_NAME", "comment": null}, "PROJECT_NAME": {"type": "TEXT", "index": 9, "name": "PROJECT_NAME", "comment": "Name of the controlling entity of the address"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.flow_models.crosschain.address_labels"}}, "errors": null} \ No newline at end of file diff --git a/target/manifest.json b/target/manifest.json index d1edd5e..00c5f6e 100644 --- a/target/manifest.json +++ b/target/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.4", "generated_at": "2022-05-18T22:35:45.251232Z", "invocation_id": "9b0b8ce6-16de-4ecd-a7a6-c90d0b506fc7", "env": {}, "project_id": "208886b48445c6c994c154eb26fa0660", "user_id": "ae8c306c-329d-4e70-837c-2ce0da7e4f48", "send_anonymous_usage_stats": true, "adapter_type": "snowflake"}, "nodes": {"model.flow_models.bronze__blocks": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n {{ source(\n 'prod',\n 'flow_blocks'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__blocks"], "unique_id": "model.flow_models.bronze__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__blocks.sql", "original_file_path": "models/bronze/bronze__blocks.sql", "name": "bronze__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "ee1b07ff3943e8c3050c73e465d67a27dea8fef911a949c333d12d3792f82cb5"}, "tags": [], "refs": [], "sources": [["prod", "flow_blocks"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652815140.427495, "compiled_sql": "\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n chainwalkers.prod.flow_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.blocks"}, "model.flow_models.bronze__transactions": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n {{ source(\n 'prod',\n 'flow_txs'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_txs"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__transactions"], "unique_id": "model.flow_models.bronze__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__transactions.sql", "original_file_path": "models/bronze/bronze__transactions.sql", "name": "bronze__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "7df148fbc131022c3bb1ec5d7a28adbf721b689c32d8f16168e7275301d79e46"}, "tags": [], "refs": [], "sources": [["prod", "flow_txs"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652815140.428548, "compiled_sql": "\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n chainwalkers.prod.flow_txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.transactions"}, "model.flow_models.silver__transactions": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'tx_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__transactions"], "unique_id": "model.flow_models.silver__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__transactions.sql", "original_file_path": "models/silver/silver__transactions.sql", "name": "silver__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "83624dbe1e5e65d466c20b980977a85cb2eda3821b3cb031464b41771d0b9ebe"}, "tags": [], "refs": [["bronze__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__transactions.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert"}, "created_at": 1652815140.603797, "compiled_sql": "\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.transactions"}, "operation.flow_models.flow_models-on-run-start-0": {"raw_sql": "{{create_sps()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_sps"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-0", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-0"], "unique_id": "operation.flow_models.flow_models-on-run-start-0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-0.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-0", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-0.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1652815140.449651, "compiled_sql": "\n \n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 0}, "operation.flow_models.flow_models-on-run-start-1": {"raw_sql": "{{create_tasks()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_tasks"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-1", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-1"], "unique_id": "operation.flow_models.flow_models-on-run-start-1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-1.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-1", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-1.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1652815140.452147, "compiled_sql": "\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 1}, "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_id"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.604173, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__transactions_tx_id"], "unique_id": "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "unique_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/unique_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.60494, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_timestamp.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_timestamp", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.605676, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757"}, "created_at": 1652815140.606519, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0"}, "created_at": 1652815140.609101, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_height.52f8623258": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_height"], "unique_id": "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_height.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_height", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.611085, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db"}, "created_at": 1652815140.611833, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_chain_id"], "unique_id": "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_chain_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_chain_id", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.614232, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82"}, "created_at": 1652815140.614985, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_index"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_index.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_index", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.6171021, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563"}, "created_at": 1652815140.617853, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_proposer"], "unique_id": "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_proposer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_proposer", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.619832, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71"}, "created_at": 1652815140.620586, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_payer"], "unique_id": "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_payer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_payer", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.6227012, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df"}, "created_at": 1652815140.623455, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_authorizers", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.625566, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f"}, "created_at": 1652815140.6263192, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_count_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_count_authorizers", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.6283011, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0"}, "created_at": 1652815140.6290612, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_gas_limit"], "unique_id": "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_gas_limit.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_gas_limit", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.631051, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb"}, "created_at": 1652815140.631796, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_transaction_result"], "unique_id": "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_transaction_result.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_transaction_result", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.6337862, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49"}, "created_at": 1652815140.634534, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_succeeded.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_succeeded", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.63652, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500"}, "created_at": 1652815140.637271, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_error_msg"], "unique_id": "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_error_msg.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_error_msg", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.639256, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890"}, "created_at": 1652815140.640005, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions__ingested_at"], "unique_id": "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions__ingested_at.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions__ingested_at", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815140.642127, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78"}, "created_at": 1652815140.642882, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076"}, "created_at": 1652815140.644875, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.silver.transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__transactions"}, "model.flow_models.bronze__labels": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nWITH labels AS (\n\n SELECT\n system_created_at AS _system_created_at,\n insert_date AS _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n {{ source(\n 'crosschain',\n 'address_labels'\n ) }}\n WHERE\n blockchain = 'flow'\n)\nSELECT\n *\nFROM\n labels", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.crosschain.address_labels"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__labels"], "unique_id": "model.flow_models.bronze__labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__labels.sql", "original_file_path": "models/bronze/bronze__labels.sql", "name": "bronze__labels", "alias": "labels", "checksum": {"name": "sha256", "checksum": "192c5bf38039359e902b9d228347974b749826c81a300740397ab303f0dbfe68"}, "tags": [], "refs": [], "sources": [["crosschain", "address_labels"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652815322.6607559, "compiled_sql": "\n\nWITH labels AS (\n\n SELECT\n system_created_at AS _system_created_at,\n insert_date AS _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n flipside_prod_db.crosschain.address_labels\n WHERE\n blockchain = 'flow'\n)\nSELECT\n *\nFROM\n labels", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.labels"}, "model.flow_models.gold__blocks": {"raw_sql": "{{ config(\n materialized = 'incremental',\n incremental_strategy = 'delete+insert',\n cluster_by = ['block_timestamp::DATE'],\n unique_key = 'block_height'\n) }}\n\nWITH silver_blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__blocks') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\ngold_blocks AS (\n SELECT\n block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n id,\n parent_id\n FROM\n silver_blocks\n)\nSELECT\n *\nFROM\n gold_blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::DATE"], "incremental_strategy": "delete+insert", "unique_key": "block_height", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__blocks"], "unique_id": "model.flow_models.gold__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__blocks.sql", "original_file_path": "models/gold/gold__blocks.sql", "name": "gold__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "9cd8a6a012ab812898aed500e1f0a3f29c301b2ee4b3eda348199cfd3c5f70a8"}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__blocks.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "incremental_strategy": "delete+insert", "cluster_by": ["block_timestamp::DATE"], "unique_key": "block_height"}, "created_at": 1652815322.685622, "compiled_sql": "\n\nWITH silver_blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.blocks\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\ngold_blocks AS (\n SELECT\n block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n id,\n parent_id\n FROM\n silver_blocks\n)\nSELECT\n *\nFROM\n gold_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.blocks"}, "model.flow_models.core__fact_blocks": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__blocks') }}\n)\nSELECT\n *\nFROM\n blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_blocks"], "unique_id": "model.flow_models.core__fact_blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_blocks.sql", "original_file_path": "models/core/core__fact_blocks.sql", "name": "core__fact_blocks", "alias": "fact_blocks", "checksum": {"name": "sha256", "checksum": "0e8e2a67213be7faf95e877b27080f4e60fc70ac61dfd43365fd734b08a24c76"}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_blocks.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652815322.7254121, "compiled_sql": "\n\nWITH blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.blocks\n)\nSELECT\n *\nFROM\n blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_blocks"}, "model.flow_models.silver__labels": {"raw_sql": "{{ config(\n materialized = 'table',\n cluster_by = ['address'],\n unique_key = 'event_id',\n) }}\n\nWITH labels AS (\n\n SELECT\n _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n {{ ref('bronze__labels') }}\n)\nSELECT\n *\nFROM\n labels", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.bronze__labels"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["address"], "unique_key": "event_id", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__labels"], "unique_id": "model.flow_models.silver__labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__labels.sql", "original_file_path": "models/silver/silver__labels.sql", "name": "silver__labels", "alias": "labels", "checksum": {"name": "sha256", "checksum": "87e2216956fbf38e7e29352b340eabc8bc7c89a627082ccb646ce8349464d757"}, "tags": [], "refs": [["bronze__labels"]], "sources": [], "description": "This table provides labels for addresses on the Flow blockchain.", "columns": {"_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "blockchain": {"name": "blockchain", "description": "The name of the blockchain for this address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address": {"name": "address", "description": "The on-chain address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "creator": {"name": "creator", "description": "The source of the labeling information for the address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "label_type": {"name": "label_type", "description": "Predominant label categorization, such as CEX, Operator, NFT, etc.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "label_subtype": {"name": "label_subtype", "description": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_name": {"name": "address_name", "description": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names).", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__labels.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "table", "cluster_by": ["address"], "unique_key": "event_id"}, "created_at": 1652815322.750557, "compiled_sql": "\n\nWITH labels AS (\n\n SELECT\n _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n FLOW_DEV.bronze.labels\n)\nSELECT\n *\nFROM\n labels", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.labels"}, "model.flow_models.silver__blocks": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'block_height',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__blocks') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__blocks"], "unique_id": "model.flow_models.silver__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__blocks.sql", "original_file_path": "models/silver/silver__blocks.sql", "name": "silver__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "630c91697fb92facb17e9594045f28b0ffab240bab62d524bd810a94296e2c88"}, "tags": [], "refs": [["bronze__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__blocks.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert"}, "created_at": 1652815322.773699, "compiled_sql": "\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.blocks\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.blocks"}, "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_block_height"], "unique_id": "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_block_height.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.689274, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "unique_gold", "fqn": ["flow_models", "gold", "unique_gold__blocks_block_height"], "unique_id": "test.flow_models.unique_gold__blocks_block_height.7c3e159f31", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_gold__blocks_block_height.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "unique_gold__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/unique_gold__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.69011, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.gold.blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040"}, "created_at": 1652815322.690961, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_block_timestamp.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_block_timestamp", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.696696, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43"}, "created_at": 1652815322.697459, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_52d9893434163129a875c39c124985f7\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_52d9893434163129a875c39c124985f7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7"}, "created_at": 1652815322.707686, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_network.1290e522fb": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_network"], "unique_id": "test.flow_models.not_null_gold__blocks_network.1290e522fb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_network.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_network", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.709688, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67"}, "created_at": 1652815322.710444, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_chain_id"], "unique_id": "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_chain_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_chain_id", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.712588, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71"}, "created_at": 1652815322.713359, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_tx_count"], "unique_id": "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_tx_count.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_tx_count", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.715483, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_007c33b23027bf75603a43c718320163\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_007c33b23027bf75603a43c718320163.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163"}, "created_at": 1652815322.716275, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_id.6c4c044819": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_id"], "unique_id": "test.flow_models.not_null_gold__blocks_id.6c4c044819", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_id", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.718616, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316"}, "created_at": 1652815322.7193751, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_parent_id"], "unique_id": "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_parent_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_parent_id", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.721487, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1"}, "created_at": 1652815322.722242, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_block_height"], "unique_id": "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_block_height.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_block_height", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7259, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "unique_core", "fqn": ["flow_models", "core", "unique_core__fact_blocks_block_height"], "unique_id": "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_core__fact_blocks_block_height.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "unique_core__fact_blocks_block_height", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/unique_core__fact_blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.726669, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.core.fact_blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686"}, "created_at": 1652815322.7274098, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_block_timestamp.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_block_timestamp", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.729541, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7"}, "created_at": 1652815322.7302961, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d"}, "created_at": 1652815322.7328808, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_network"], "unique_id": "test.flow_models.not_null_core__fact_blocks_network.2708505a8a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_network.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_network", "alias": "fact_blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7348669, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR", "alias": "fact_blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46"}, "created_at": 1652815322.735623, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_chain_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_chain_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_chain_id", "alias": "fact_blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.737738, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR", "alias": "fact_blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446"}, "created_at": 1652815322.7384908, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_tx_count"], "unique_id": "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_tx_count.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_tx_count", "alias": "fact_blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.740609, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER", "alias": "fact_blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251"}, "created_at": 1652815322.741363, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_id.88f5737541": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_id.88f5737541", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_id", "alias": "fact_blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.743327, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR", "alias": "fact_blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd"}, "created_at": 1652815322.744079, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_parent_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_parent_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_parent_id", "alias": "fact_blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.746181, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR", "alias": "fact_blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec"}, "created_at": 1652815322.746936, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__labels__ingested_at"], "unique_id": "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__labels__ingested_at.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "not_null_silver__labels__ingested_at", "alias": "labels", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/not_null_silver__labels__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7509289, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.labels\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ", "alias": "labels", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8"}, "created_at": 1652815322.751688, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "blockchain", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR", "alias": "labels_blockchain", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854"}, "created_at": 1652815322.753655, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCKCHAIN'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "blockchain", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "address", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR", "alias": "labels_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4"}, "created_at": 1652815322.7557461, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ADDRESS'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "address", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "creator", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR", "alias": "labels_creator", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99"}, "created_at": 1652815322.7578702, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CREATOR'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "creator", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "label_type", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR", "alias": "labels_label_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f"}, "created_at": 1652815322.759862, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'LABEL_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "label_type", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "label_subtype", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR", "alias": "labels_label_subtype", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7"}, "created_at": 1652815322.7619462, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'LABEL_SUBTYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "label_subtype", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "address_name", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR", "alias": "labels_address_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218"}, "created_at": 1652815322.76405, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ADDRESS_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "address_name", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_000c788288126638456ecd5973b99726\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "project_name", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR", "alias": "labels_project_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_000c788288126638456ecd5973b99726.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726"}, "created_at": 1652815322.766131, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROJECT_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_name", "file_key_name": "models.silver__labels"}, "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_height"], "unique_id": "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.774077, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.unique_silver__blocks_block_height.478ce02832": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__blocks_block_height"], "unique_id": "test.flow_models.unique_silver__blocks_block_height.478ce02832", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "unique_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/unique_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7748532, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480"}, "created_at": 1652815322.775598, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_timestamp.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_timestamp", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.777706, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739"}, "created_at": 1652815322.778455, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893"}, "created_at": 1652815322.7813709, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_network.2020ad46b9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_network"], "unique_id": "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_network.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_network", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.783239, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1"}, "created_at": 1652815322.784109, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_chain_id"], "unique_id": "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_chain_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_chain_id", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7861109, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e"}, "created_at": 1652815322.7869701, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_tx_count"], "unique_id": "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_tx_count.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_tx_count", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.788961, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2"}, "created_at": 1652815322.7898262, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_id.b40d544128": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_id"], "unique_id": "test.flow_models.not_null_silver__blocks_id.b40d544128", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_id", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.7916842, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101"}, "created_at": 1652815322.7925959, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_parent_id"], "unique_id": "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_parent_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_parent_id", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.794726, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c"}, "created_at": 1652815322.795607, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks__ingested_at"], "unique_id": "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks__ingested_at.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks__ingested_at", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652815322.797642, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81"}, "created_at": 1652815322.7985191, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["block_height"], "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__blocks_block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_utils_unique_combination_of_columns_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6"}, "created_at": 1652815322.800392, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n block_height\n from FLOW_DEV.silver.blocks\n group by block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__blocks"}, "model.flow_models.core__fact_transactions": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH txs AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__transactions') }}\n)\nSELECT\n *\nFROM\n txs", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_transactions"], "unique_id": "model.flow_models.core__fact_transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_transactions.sql", "original_file_path": "models/core/core__fact_transactions.sql", "name": "core__fact_transactions", "alias": "fact_transactions", "checksum": {"name": "sha256", "checksum": "20aae6feefac086e63605a4498361c839e7573d193f71eb45af54dc824212be5"}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_transactions.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652821850.069283, "compiled_sql": "\n\nWITH txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.transactions\n)\nSELECT\n *\nFROM\n txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_transactions"}, "model.flow_models.gold__transactions": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['block_timestamp::DATE'],\n unique_key = 'tx_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH silver_txs AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE > CURRENT_DATE - 2\n{% endif %}\n),\ngold_txs AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n chain_id,\n tx_index,\n proposer,\n payer,\n authorizers,\n count_authorizers,\n gas_limit,\n transaction_result,\n tx_succeeded,\n error_msg\n FROM\n silver_txs\n)\nSELECT\n *\nFROM\n gold_txs", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__transactions"], "unique_id": "model.flow_models.gold__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__transactions.sql", "original_file_path": "models/gold/gold__transactions.sql", "name": "gold__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "f468b5c4689f135bb689789e745048b402268c33d76df6258889295e57c5abd1"}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__transactions.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert"}, "created_at": 1652821850.112415, "compiled_sql": "\n\nWITH silver_txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.transactions\n\n\nWHERE\n _ingested_at :: DATE > CURRENT_DATE - 2\n\n),\ngold_txs AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n chain_id,\n tx_index,\n proposer,\n payer,\n authorizers,\n count_authorizers,\n gas_limit,\n transaction_result,\n tx_succeeded,\n error_msg\n FROM\n silver_txs\n)\nSELECT\n *\nFROM\n gold_txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.transactions"}, "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_id"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_id", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.069668, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "unique_core", "fqn": ["flow_models", "core", "unique_core__fact_transactions_tx_id"], "unique_id": "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_core__fact_transactions_tx_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "unique_core__fact_transactions_tx_id", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/unique_core__fact_transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.070443, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_block_timestamp.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_block_timestamp", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.0711849, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075"}, "created_at": 1652821850.072042, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da"}, "created_at": 1652821850.074657, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_block_height"], "unique_id": "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_block_height.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_block_height", "alias": "fact_transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.076659, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT", "alias": "fact_transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a"}, "created_at": 1652821850.0774322, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_chain_id"], "unique_id": "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_chain_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_chain_id", "alias": "fact_transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.0796108, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR", "alias": "fact_transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d"}, "created_at": 1652821850.0803661, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_index"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_index.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_index", "alias": "fact_transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.0827808, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER", "alias": "fact_transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4"}, "created_at": 1652821850.0835378, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_proposer"], "unique_id": "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_proposer.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_proposer", "alias": "fact_transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.085529, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR", "alias": "fact_transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9"}, "created_at": 1652821850.086283, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_payer"], "unique_id": "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_payer.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_payer", "alias": "fact_transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.088429, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR", "alias": "fact_transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1"}, "created_at": 1652821850.089189, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_authorizers"], "unique_id": "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_authorizers.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_authorizers", "alias": "fact_transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.091368, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY", "alias": "fact_transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139"}, "created_at": 1652821850.092164, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_count_authorizers.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_count_authorizers", "alias": "fact_transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.094228, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER", "alias": "fact_transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6"}, "created_at": 1652821850.094987, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_gas_limit"], "unique_id": "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_gas_limit.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_gas_limit", "alias": "fact_transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.096989, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER", "alias": "fact_transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb"}, "created_at": 1652821850.097749, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_transaction_result"], "unique_id": "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_transaction_result.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_transaction_result", "alias": "fact_transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.0997388, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT", "alias": "fact_transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b"}, "created_at": 1652821850.100502, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_succeeded.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_succeeded", "alias": "fact_transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.102509, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN", "alias": "fact_transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357"}, "created_at": 1652821850.103273, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_error_msg"], "unique_id": "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_error_msg.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_error_msg", "alias": "fact_transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.1052759, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR", "alias": "fact_transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de"}, "created_at": 1652821850.106038, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_core", "fqn": ["flow_models", "core", "dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927"}, "created_at": 1652821850.108198, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.core.fact_transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_id"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.112802, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "unique_gold", "fqn": ["flow_models", "gold", "unique_gold__transactions_tx_id"], "unique_id": "test.flow_models.unique_gold__transactions_tx_id.c038e1f494", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_gold__transactions_tx_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "unique_gold__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/unique_gold__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.113583, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.gold.transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_block_timestamp.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_block_timestamp", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.114333, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1"}, "created_at": 1652821850.115464, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974"}, "created_at": 1652821850.118047, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_block_height"], "unique_id": "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_block_height.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_block_height", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.120022, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029"}, "created_at": 1652821850.120787, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_chain_id"], "unique_id": "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_chain_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_chain_id", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.122911, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e"}, "created_at": 1652821850.123678, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_index"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_index.78407db79c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_index.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_index", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.1258082, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8"}, "created_at": 1652821850.12658, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_proposer"], "unique_id": "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_proposer.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_proposer", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.1285849, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25"}, "created_at": 1652821850.129347, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_payer.efa8662752": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_payer"], "unique_id": "test.flow_models.not_null_gold__transactions_payer.efa8662752", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_payer.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_payer", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.131476, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5"}, "created_at": 1652821850.132239, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_authorizers"], "unique_id": "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_authorizers.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_authorizers", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.134367, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6"}, "created_at": 1652821850.135129, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_count_authorizers.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_count_authorizers", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.137134, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649"}, "created_at": 1652821850.137898, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_gas_limit"], "unique_id": "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_gas_limit.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_gas_limit", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.1398988, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8"}, "created_at": 1652821850.140658, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_transaction_result"], "unique_id": "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_transaction_result.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_transaction_result", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.142655, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207"}, "created_at": 1652821850.143413, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_succeeded.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_succeeded", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.145417, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c"}, "created_at": 1652821850.146178, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_error_msg"], "unique_id": "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_error_msg.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_error_msg", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652821850.1484601, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb"}, "created_at": 1652821850.149214, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_gold", "fqn": ["flow_models", "gold", "dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0"}, "created_at": 1652821850.1513212, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.gold.transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.gold__transactions"}, "model.flow_models.core__fact_events": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH events AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__events') }}\n)\nSELECT\n *\nFROM\n events", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_events"], "unique_id": "model.flow_models.core__fact_events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_events.sql", "original_file_path": "models/core/core__fact_events.sql", "name": "core__fact_events", "alias": "fact_events", "checksum": {"name": "sha256", "checksum": "da012bfc41bac21ed8a298965ebad78d38d2463a95d0e8539b81988d74580078"}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The data passed to the event, in the form of key-value pairs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_events.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1652905399.083338, "compiled_sql": "\n\nWITH events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.events\n)\nSELECT\n *\nFROM\n events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_events"}, "model.flow_models.gold__events": {"raw_sql": "{{ config(\n materialized = 'incremental',\n incremental_strategy = 'delete+insert',\n cluster_by = ['block_timestamp::date'],\n unique_key = \"CONCAT_WS('-', tx_id, event_index)\"\n) }}\n\nWITH silver_events AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__events') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n{% endif %}\n),\nsilver_event_attributes AS (\n SELECT\n *\n FROM\n {{ ref('silver__event_attributes') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n{% endif %}\n),\nobjs AS (\n SELECT\n event_id,\n OBJECT_AGG(\n attribute_key,\n attribute_value_adj :: variant\n ) AS event_data\n FROM\n silver_event_attributes\n GROUP BY\n 1\n),\nlocation_object AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n _event_data_type :location,\n _event_data_type :Location\n ) AS event_data\n FROM\n silver_events\n WHERE\n _event_data_fields = '[]'\n),\ngold_events AS (\n SELECT\n e.event_id,\n e.tx_id,\n e.block_timestamp,\n e.block_height,\n e.tx_succeeded,\n e.event_index,\n e.event_contract,\n e.event_type,\n A.event_data\n FROM\n objs A\n LEFT JOIN silver_events e USING (event_id)\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n gold_events\n UNION\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n location_object\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__events", "model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::date"], "incremental_strategy": "delete+insert", "unique_key": "CONCAT_WS('-', tx_id, event_index)", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__events"], "unique_id": "model.flow_models.gold__events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__events.sql", "original_file_path": "models/gold/gold__events.sql", "name": "gold__events", "alias": "events", "checksum": {"name": "sha256", "checksum": "819113dd02ea0596f775624951c9016fe84bb728a5652be76034f9f535b17f54"}, "tags": [], "refs": [["silver__events"], ["silver__event_attributes"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The data passed to the event, in the form of key-value pairs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__events.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "incremental_strategy": "delete+insert", "cluster_by": ["block_timestamp::date"], "unique_key": "CONCAT_WS('-', tx_id, event_index)"}, "created_at": 1652905399.0561779, "compiled_sql": "\n\nWITH silver_events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.events\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n\n),\nsilver_event_attributes AS (\n SELECT\n *\n FROM\n FLOW_DEV.silver.event_attributes\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n\n),\nobjs AS (\n SELECT\n event_id,\n OBJECT_AGG(\n attribute_key,\n attribute_value_adj :: variant\n ) AS event_data\n FROM\n silver_event_attributes\n GROUP BY\n 1\n),\nlocation_object AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n _event_data_type :location,\n _event_data_type :Location\n ) AS event_data\n FROM\n silver_events\n WHERE\n _event_data_fields = '[]'\n),\ngold_events AS (\n SELECT\n e.event_id,\n e.tx_id,\n e.block_timestamp,\n e.block_height,\n e.tx_succeeded,\n e.event_index,\n e.event_contract,\n e.event_type,\n A.event_data\n FROM\n objs A\n LEFT JOIN silver_events e USING (event_id)\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n gold_events\n UNION\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n location_object\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.events"}, "model.flow_models.silver__event_attributes": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'attribute_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH events AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__events') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__event_attributes"], "unique_id": "model.flow_models.silver__event_attributes", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__event_attributes.sql", "original_file_path": "models/silver/silver__event_attributes.sql", "name": "silver__event_attributes", "alias": "event_attributes", "checksum": {"name": "sha256", "checksum": "65df59847b36268e4582cfc1dfff08e82477c59982eff2ff42c56d94453608b4"}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "This table cleans and transform attributes from each event in the events table.", "columns": {"attribute_id": {"name": "attribute_id", "description": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_index": {"name": "attribute_index", "description": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_key": {"name": "attribute_key", "description": "The key of the attribute key-value pair. This is the label while attribute_value is the data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "decoded_address": {"name": "decoded_address", "description": "The decoded address, if applicable, for the attribute_value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value": {"name": "attribute_value", "description": "The value of the attribute key-value pair. This is the data that attribute_key labels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value_adj": {"name": "attribute_value_adj", "description": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__event_attributes.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert"}, "created_at": 1652905399.1113799, "compiled_sql": "\n\nWITH events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.events\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.event_attributes"}, "model.flow_models.silver__events": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'event_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__events"], "unique_id": "model.flow_models.silver__events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__events.sql", "original_file_path": "models/silver/silver__events.sql", "name": "silver__events", "alias": "events", "checksum": {"name": "sha256", "checksum": "04893b154d5c479d4cf721799022500d7e1961a7c081563c9023bf71296aa294"}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The raw event data from the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_type": {"name": "_event_data_type", "description": "The type object from event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_fields": {"name": "_event_data_fields", "description": "The fields object from the event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__events.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert"}, "created_at": 1652905399.011515, "compiled_sql": "\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.events"}, "test.flow_models.not_null_silver__events_event_id.c5f00655c1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_id"], "unique_id": "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.011897, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.unique_silver__events_event_id.c34161972a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__events_event_id"], "unique_id": "test.flow_models.unique_silver__events_event_id.c34161972a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "unique_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/unique_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.012675, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.events\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_id.2724c3889b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_id"], "unique_id": "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_id", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.013418, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_timestamp.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_timestamp", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.014251, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0"}, "created_at": 1652905399.014994, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91"}, "created_at": 1652905399.0252259, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_height.7977589637": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_height"], "unique_id": "test.flow_models.not_null_silver__events_block_height.7977589637", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_height.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_height", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.02756, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_692b835c226209a476c88646f66b5283\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283"}, "created_at": 1652905399.028309, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_succeeded.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_succeeded", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.03047, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5"}, "created_at": 1652905399.0312269, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_index.4e05dcc574": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_index"], "unique_id": "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_index.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_index", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.033225, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44"}, "created_at": 1652905399.033979, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_contract.d88483871a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_contract"], "unique_id": "test.flow_models.not_null_silver__events_event_contract.d88483871a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_contract.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_contract", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.035978, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d"}, "created_at": 1652905399.036729, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_type"], "unique_id": "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_type", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.038878, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0"}, "created_at": 1652905399.039629, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_data"], "unique_id": "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_data.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_data", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.04177, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea"}, "created_at": 1652905399.042528, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_type.db25419673": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_type"], "unique_id": "test.flow_models.not_null_silver__events__event_data_type.db25419673", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_type", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.04452, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b"}, "created_at": 1652905399.045269, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_TYPE'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_fields"], "unique_id": "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_fields.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_fields", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_fields.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.0472598, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_fields is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51"}, "created_at": 1652905399.048026, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_FIELDS'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__ingested_at"], "unique_id": "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__ingested_at.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__ingested_at", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.0500212, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159"}, "created_at": 1652905399.050784, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad"}, "created_at": 1652905399.052813, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.silver.events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__events"}, "test.flow_models.not_null_gold__events_tx_id.95926804a2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_tx_id"], "unique_id": "test.flow_models.not_null_gold__events_tx_id.95926804a2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_tx_id.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_tx_id", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.056551, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_block_timestamp.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_block_timestamp", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.057411, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227"}, "created_at": 1652905399.058159, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617"}, "created_at": 1652905399.061024, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_block_height"], "unique_id": "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_block_height.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_block_height", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.062987, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2"}, "created_at": 1652905399.06373, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_tx_succeeded"], "unique_id": "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_tx_succeeded.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_tx_succeeded", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.065831, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b"}, "created_at": 1652905399.066568, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_index.b152284f0b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_index"], "unique_id": "test.flow_models.not_null_gold__events_event_index.b152284f0b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_index.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_index", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.068555, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d"}, "created_at": 1652905399.069309, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_contract.7794754732": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_contract"], "unique_id": "test.flow_models.not_null_gold__events_event_contract.7794754732", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_contract.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_contract", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.0713081, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315"}, "created_at": 1652905399.072063, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_type"], "unique_id": "test.flow_models.not_null_gold__events_event_type.f7e447ca7d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_type.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_type", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.074205, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e"}, "created_at": 1652905399.074954, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_data"], "unique_id": "test.flow_models.not_null_gold__events_event_data.c5e8d4c967", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_data.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_data", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.0770922, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["OBJECT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1"}, "created_at": 1652905399.077857, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('OBJECT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_gold", "fqn": ["flow_models", "gold", "dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9"}, "created_at": 1652905399.079882, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.gold.events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.gold__events"}, "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_tx_id"], "unique_id": "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_tx_id.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_tx_id", "alias": "fact_events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.083741, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_block_timestamp.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_block_timestamp", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.084654, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94"}, "created_at": 1652905399.085406, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9"}, "created_at": 1652905399.08805, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_block_height"], "unique_id": "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_block_height.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_block_height", "alias": "fact_events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.090049, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT", "alias": "fact_events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f"}, "created_at": 1652905399.090815, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_tx_succeeded"], "unique_id": "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_tx_succeeded.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_tx_succeeded", "alias": "fact_events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.0932639, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN", "alias": "fact_events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4"}, "created_at": 1652905399.094002, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_index"], "unique_id": "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_index.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_index", "alias": "fact_events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.09599, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER", "alias": "fact_events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8"}, "created_at": 1652905399.096739, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_contract"], "unique_id": "test.flow_models.not_null_core__fact_events_event_contract.10b5644238", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_contract.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_contract", "alias": "fact_events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.098716, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR", "alias": "fact_events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca"}, "created_at": 1652905399.099463, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_type"], "unique_id": "test.flow_models.not_null_core__fact_events_event_type.d865a2b006", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_type.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_type", "alias": "fact_events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.101578, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR", "alias": "fact_events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490"}, "created_at": 1652905399.102328, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_data"], "unique_id": "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_data.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_data", "alias": "fact_events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.104453, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["OBJECT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT", "alias": "fact_events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c"}, "created_at": 1652905399.1052, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('OBJECT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_core", "fqn": ["flow_models", "core", "dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index", "alias": "fact_events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6"}, "created_at": 1652905399.107199, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.core.fact_events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.111755, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "unique_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/unique_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.11252, "compiled_sql": "\n \n \n\nselect\n attribute_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is not null\ngroup by attribute_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04"}, "created_at": 1652905399.1132631, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_id", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.11539, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112"}, "created_at": 1652905399.1161401, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_tx_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_tx_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_tx_id", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.118268, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_block_timestamp.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_block_timestamp", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.119015, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0"}, "created_at": 1652905399.119851, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.event_attributes\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f"}, "created_at": 1652905399.122406, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_index", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.1246982, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1"}, "created_at": 1652905399.1254332, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_index", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.127415, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6"}, "created_at": 1652905399.128161, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_contract"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_contract.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_contract", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.130154, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9"}, "created_at": 1652905399.1309052, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_type"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_type.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_type", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.133038, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee"}, "created_at": 1652905399.13378, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_key"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_key.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_key", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.135913, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108"}, "created_at": 1652905399.1366668, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_KEY'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes__ingested_at"], "unique_id": "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes__ingested_at.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes__ingested_at", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652905399.138795, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6"}, "created_at": 1652905399.1395462, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index", "attribute_index"], "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618"}, "created_at": 1652905399.1415439, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index, attribute_index\n from FLOW_DEV.silver.event_attributes\n group by tx_id, event_index, attribute_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__event_attributes"}, "model.flow_models.silver__contract_labels": {"raw_sql": "{{ config(\n materialized = 'table',\n cluster_by = ['event_contract'],\n unique_key = 'event_contract'\n) }}\n\nWITH splt AS (\n\n SELECT\n event_contract,\n SPLIT(\n event_contract,\n '.'\n ) AS ec_s\n FROM\n {{ ref('silver__events') }}\n)\nSELECT\n DISTINCT event_contract,\n ec_s [array_size(ec_s)-1] :: STRING AS contract_name,\n CONCAT(\n '0x',\n ec_s [array_size(ec_s)-2] :: STRING\n ) AS account_address\nFROM\n splt\nWHERE\n ec_s [0] != 'flow'", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["event_contract"], "unique_key": "event_contract", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__contract_labels"], "unique_id": "model.flow_models.silver__contract_labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__contract_labels.sql", "original_file_path": "models/silver/silver__contract_labels.sql", "name": "silver__contract_labels", "alias": "contract_labels", "checksum": {"name": "sha256", "checksum": "7ec3528bf6a646c1183862c537d038f19b52f5913b870eca7d3fd3e262819721"}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "This table extracts all contract labels referenced in the events item of a Flow transaction.", "columns": {"event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "contract_name": {"name": "contract_name", "description": "The primary name of the contract, derived from the full contract address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_address": {"name": "account_address", "description": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__contract_labels.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "table", "cluster_by": ["event_contract"], "unique_key": "event_contract"}, "created_at": 1652913319.227821, "compiled_sql": "\n\nWITH splt AS (\n\n SELECT\n event_contract,\n SPLIT(\n event_contract,\n '.'\n ) AS ec_s\n FROM\n FLOW_DEV.silver.events\n)\nSELECT\n DISTINCT event_contract,\n ec_s [array_size(ec_s)-1] :: STRING AS contract_name,\n CONCAT(\n '0x',\n ec_s [array_size(ec_s)-2] :: STRING\n ) AS account_address\nFROM\n splt\nWHERE\n ec_s [0] != 'flow'", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.contract_labels"}, "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_event_contract"], "unique_id": "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_event_contract.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_event_contract", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652913319.2315059, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4"}, "created_at": 1652913319.232379, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contract_name", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_contract_name"], "unique_id": "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_contract_name.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_contract_name", "alias": "contract_labels_contract_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_contract_name.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652913319.2381592, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere contract_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "contract_name", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "contract_name", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR", "alias": "contract_labels_contract_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671"}, "created_at": 1652913319.239033, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CONTRACT_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "contract_name", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_address", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_account_address"], "unique_id": "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_account_address.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_account_address", "alias": "contract_labels_account_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_account_address.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1652913319.2410922, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere account_address is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "account_address", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "account_address", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR", "alias": "contract_labels_account_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970"}, "created_at": 1652913319.241971, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ACCOUNT_ADDRESS'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "account_address", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_contract", "contract_name"], "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c"}, "created_at": 1652913319.244129, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_contract, contract_name\n from FLOW_DEV.silver.contract_labels\n group by event_contract, contract_name\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__contract_labels"}}, "sources": {"source.flow_models.prod.flow_blocks": {"fqn": ["flow_models", "prod", "flow_blocks"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_blocks", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_blocks", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_blocks", "created_at": 1652815140.750973}, "source.flow_models.prod.flow_txs": {"fqn": ["flow_models", "prod", "flow_txs"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_txs", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_txs", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_txs", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_txs", "created_at": 1652815140.751041}, "source.flow_models.crosschain.address_labels": {"fqn": ["flow_models", "crosschain", "address_labels"], "database": "flipside_prod_db", "schema": "crosschain", "unique_id": "source.flow_models.crosschain.address_labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "address_labels", "source_name": "crosschain", "source_description": "", "loader": "", "identifier": "address_labels", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "flipside_prod_db.crosschain.address_labels", "created_at": 1652815322.804513}}, "macros": {"macro.flow_models.create_tasks": {"unique_id": "macro.flow_models.create_tasks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_tasks.sql", "original_file_path": "macros/create_tasks.sql", "name": "create_tasks", "macro_sql": "{% macro create_tasks() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ task_run_sp_create_prod_clone('_internal') }};\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.task_run_sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8390982}, "macro.flow_models.create_sps": {"unique_id": "macro.flow_models.create_sps", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_sps.sql", "original_file_path": "macros/create_sps.sql", "name": "create_sps", "macro_sql": "{% macro create_sps() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ sp_create_prod_clone('_internal') }};\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.839464}, "macro.flow_models.generate_schema_name": {"unique_id": "macro.flow_models.generate_schema_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(\n custom_schema_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [0] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.839969}, "macro.flow_models.generate_alias_name": {"unique_id": "macro.flow_models.generate_alias_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(\n custom_alias_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [1] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.840252}, "macro.flow_models.task_run_sp_create_prod_clone": {"unique_id": "macro.flow_models.task_run_sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/task_run_sp_create_prod_clone.sql", "original_file_path": "macros/task_run_sp_create_prod_clone.sql", "name": "task_run_sp_create_prod_clone", "macro_sql": "{% macro task_run_sp_create_prod_clone(target_schema) -%}\n create or replace task {{target_schema}}.run_sp_create_prod_clone\n warehouse = dbt_cloud\n schedule = 'USING CRON 15 10 * * * UTC'\n as\n call {{ target_schema }}.create_prod_clone('flow', 'flow_dev', 'internal_dev');\n\n alter task {{ target_schema }}.run_sp_create_prod_clone resume\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.840554}, "macro.flow_models.sp_create_prod_clone": {"unique_id": "macro.flow_models.sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/sp_create_prod_clone.sql", "original_file_path": "macros/sp_create_prod_clone.sql", "name": "sp_create_prod_clone", "macro_sql": "{% macro sp_create_prod_clone(target_schema) -%}\n\ncreate or replace procedure {{ target_schema }}.create_prod_clone(source_db_name string, destination_db_name string, role_name string)\nreturns boolean \nlanguage javascript\nexecute as caller\nas\n$$\n snowflake.execute({sqlText: `BEGIN TRANSACTION;`});\n try {\n snowflake.execute({sqlText: `DROP DATABASE IF EXISTS ${DESTINATION_DB_NAME}`});\n snowflake.execute({sqlText: `CREATE DATABASE ${DESTINATION_DB_NAME} CLONE ${SOURCE_DB_NAME}`});\n snowflake.execute({sqlText: `DROP SCHEMA ${DESTINATION_DB_NAME}._INTERNAL`}); /* this only needs to be in prod */\n\n var existing_schemas = snowflake.execute({sqlText: `SELECT table_schema\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1;`});\n\n while (existing_schemas.next()) {\n var schema = existing_schemas.getColumnValue(1)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON SCHEMA ${DESTINATION_DB_NAME}.${schema} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n var existing_tables = snowflake.execute({sqlText: `SELECT table_schema, table_name\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1,2;`});\n\n while (existing_tables.next()) {\n var schema = existing_tables.getColumnValue(1)\n var table_name = existing_tables.getColumnValue(2)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON TABLE ${DESTINATION_DB_NAME}.${schema}.${table_name} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON DATABASE ${DESTINATION_DB_NAME} TO ROLE ${ROLE_NAME};`})\n snowflake.execute({sqlText: `COMMIT;`});\n } catch (err) {\n snowflake.execute({sqlText: `ROLLBACK;`});\n throw(err);\n }\n \n return true\n$$\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8410602}, "macro.dbt_snowflake.snowflake__get_catalog": {"unique_id": "macro.dbt_snowflake.snowflake__get_catalog", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "snowflake__get_catalog", "macro_sql": "{% macro snowflake__get_catalog(information_schema, schemas) -%}\n {% set query %}\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 comment as \"table_comment\",\n\n -- note: this is the _role_ that owns the table\n table_owner as \"table_owner\",\n\n 'Clustering Key' as \"stats:clustering_key:label\",\n clustering_key as \"stats:clustering_key:value\",\n 'The key used to cluster this table' as \"stats:clustering_key:description\",\n (clustering_key is not null) as \"stats:clustering_key:include\",\n\n 'Row Count' as \"stats:row_count:label\",\n row_count as \"stats:row_count:value\",\n 'An approximate count of rows in this table' as \"stats:row_count:description\",\n (row_count is not null) as \"stats:row_count:include\",\n\n 'Approximate Size' as \"stats:bytes:label\",\n bytes as \"stats:bytes:value\",\n 'Approximate size of the table as reported by Snowflake' as \"stats:bytes:description\",\n (bytes is not null) as \"stats:bytes:include\",\n\n 'Last Modified' as \"stats:last_modified:label\",\n to_varchar(convert_timezone('UTC', last_altered), 'yyyy-mm-dd HH24:MI'||'UTC') as \"stats:last_modified:value\",\n 'The timestamp for last update/change' as \"stats:last_modified:description\",\n (last_altered is not null and table_type='BASE TABLE') as \"stats:last_modified:include\"\n\n from {{ information_schema }}.tables\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 )\n\n select *\n from tables\n join columns using (\"table_database\", \"table_schema\", \"table_name\")\n where (\n {%- for schema in schemas -%}\n upper(\"table_schema\") = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n order by \"column_index\"\n {%- endset -%}\n\n {{ return(run_query(query)) }}\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": 1652815139.841973}, "macro.dbt_snowflake.snowflake__create_table_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_table_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_table_as", "macro_sql": "{% macro snowflake__create_table_as(temporary, relation, sql) -%}\n {%- set transient = config.get('transient', default=true) -%}\n {%- set cluster_by_keys = config.get('cluster_by', default=none) -%}\n {%- set enable_automatic_clustering = config.get('automatic_clustering', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n\n {%- if cluster_by_keys is not none and cluster_by_keys is string -%}\n {%- set cluster_by_keys = [cluster_by_keys] -%}\n {%- endif -%}\n {%- if cluster_by_keys is not none -%}\n {%- set cluster_by_string = cluster_by_keys|join(\", \")-%}\n {% else %}\n {%- set cluster_by_string = none -%}\n {%- endif -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace {% if temporary -%}\n temporary\n {%- elif transient -%}\n transient\n {%- endif %} table {{ relation }} {% if copy_grants and not temporary -%} copy grants {%- endif %} as\n (\n {%- if cluster_by_string is not none -%}\n select * from(\n {{ sql }}\n ) order by ({{ cluster_by_string }})\n {%- else -%}\n {{ sql }}\n {%- endif %}\n );\n {% if cluster_by_string is not none and not temporary -%}\n alter table {{relation}} cluster by ({{cluster_by_string}});\n {%- endif -%}\n {% if enable_automatic_clustering and cluster_by_string is not none and not temporary -%}\n alter table {{relation}} resume recluster;\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.853177}, "macro.dbt_snowflake.get_column_comment_sql": {"unique_id": "macro.dbt_snowflake.get_column_comment_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_column_comment_sql", "macro_sql": "{% macro get_column_comment_sql(column_name, column_dict) %}\n {{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} COMMENT $${{ column_dict[column_name]['description'] | replace('$', '[$]') }}$$\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.853525}, "macro.dbt_snowflake.get_persist_docs_column_list": {"unique_id": "macro.dbt_snowflake.get_persist_docs_column_list", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_persist_docs_column_list", "macro_sql": "{% macro get_persist_docs_column_list(model_columns, query_columns) %}\n(\n {% for column_name in query_columns %}\n {% if (column_name|upper in model_columns) or (column_name in model_columns) %}\n {{ get_column_comment_sql(column_name, model_columns) }}\n {% else %}\n {{column_name}}\n {% endif %}\n {{ \", \" if not loop.last else \"\" }}\n {% endfor %}\n)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.853966}, "macro.dbt_snowflake.snowflake__create_view_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_view_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_view_as", "macro_sql": "{% macro snowflake__create_view_as(relation, sql) -%}\n {%- set secure = config.get('secure', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create or replace {% if secure -%}\n secure\n {%- endif %} view {{ relation }} \n {% if config.persist_column_docs() -%}\n {% set model_columns = model.columns %}\n {% set query_columns = get_columns_in_query(sql) %}\n {{ get_persist_docs_column_list(model_columns, query_columns) }}\n \n {%- endif %}\n {% if copy_grants -%} copy grants {%- endif %} as (\n {{ sql }}\n );\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt_snowflake.get_persist_docs_column_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.854731}, "macro.dbt_snowflake.snowflake__get_columns_in_relation": {"unique_id": "macro.dbt_snowflake.snowflake__get_columns_in_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__get_columns_in_relation", "macro_sql": "{% macro snowflake__get_columns_in_relation(relation) -%}\n {%- set sql -%}\n describe table {{ 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['name'], row['type'])) %}\n {% endfor %}\n {% do return(columns) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.855495}, "macro.dbt_snowflake.snowflake__list_schemas": {"unique_id": "macro.dbt_snowflake.snowflake__list_schemas", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_schemas", "macro_sql": "{% macro snowflake__list_schemas(database) -%}\n {# 10k limit from here: https://docs.snowflake.net/manuals/sql-reference/sql/show-schemas.html#usage-notes #}\n {% set maximum = 10000 %}\n {% set sql -%}\n show terse schemas in database {{ database }}\n limit {{ maximum }}\n {%- endset %}\n {% set result = run_query(sql) %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in database {{ database }}! dbt can only get\n information about databases with fewer than {{ maximum }} schemas.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {{ return(result) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8560278}, "macro.dbt_snowflake.snowflake__list_relations_without_caching": {"unique_id": "macro.dbt_snowflake.snowflake__list_relations_without_caching", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_relations_without_caching", "macro_sql": "{% macro snowflake__list_relations_without_caching(schema_relation) %}\n {%- set sql -%}\n show terse objects in {{ schema_relation }}\n {%- endset -%}\n\n {%- set result = run_query(sql) -%}\n {% set maximum = 10000 %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in schema {{ schema_relation }}! dbt can only get\n information about schemas with fewer than {{ maximum }} objects.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {%- do return(result) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.85652}, "macro.dbt_snowflake.snowflake__check_schema_exists": {"unique_id": "macro.dbt_snowflake.snowflake__check_schema_exists", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__check_schema_exists", "macro_sql": "{% macro snowflake__check_schema_exists(information_schema, schema) -%}\n {% call statement('check_schema_exists', fetch_result=True) -%}\n select count(*)\n from {{ information_schema }}.schemata\n where upper(schema_name) = upper('{{ schema }}')\n and upper(catalog_name) = upper('{{ information_schema.database }}')\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": 1652815139.856833}, "macro.dbt_snowflake.snowflake__current_timestamp": {"unique_id": "macro.dbt_snowflake.snowflake__current_timestamp", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__current_timestamp", "macro_sql": "{% macro snowflake__current_timestamp() -%}\n convert_timezone('UTC', current_timestamp())\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.856907}, "macro.dbt_snowflake.snowflake__snapshot_string_as_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_string_as_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_string_as_time", "macro_sql": "{% macro snowflake__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"to_timestamp_ntz('\" ~ timestamp ~ \"')\" -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.857077}, "macro.dbt_snowflake.snowflake__snapshot_get_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_get_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_get_time", "macro_sql": "{% macro snowflake__snapshot_get_time() -%}\n to_timestamp_ntz({{ current_timestamp() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8571782}, "macro.dbt_snowflake.snowflake__rename_relation": {"unique_id": "macro.dbt_snowflake.snowflake__rename_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__rename_relation", "macro_sql": "{% macro snowflake__rename_relation(from_relation, to_relation) -%}\n {% call statement('rename_relation') -%}\n alter table {{ 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": 1652815139.857362}, "macro.dbt_snowflake.snowflake__alter_column_type": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_type", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_type", "macro_sql": "{% macro snowflake__alter_column_type(relation, column_name, new_column_type) -%}\n {% call statement('alter_column_type') %}\n alter table {{ relation }} alter {{ adapter.quote(column_name) }} set data type {{ new_column_type }};\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": 1652815139.857607}, "macro.dbt_snowflake.snowflake__alter_relation_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_comment", "macro_sql": "{% macro snowflake__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": 1652815139.857805}, "macro.dbt_snowflake.snowflake__alter_column_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_comment", "macro_sql": "{% macro snowflake__alter_column_comment(relation, column_dict) -%}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n alter {{ relation.type }} {{ relation }} alter\n {% for column_name in column_dict if (column_name in existing_columns) or (column_name|upper in existing_columns) %}\n {{ get_column_comment_sql(column_name, column_dict) }} {{ ',' if not loop.last else ';' }}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.858308}, "macro.dbt_snowflake.get_current_query_tag": {"unique_id": "macro.dbt_snowflake.get_current_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_current_query_tag", "macro_sql": "{% macro get_current_query_tag() -%}\n {{ return(run_query(\"show parameters like 'query_tag' in session\").rows[0]['value']) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.858491}, "macro.dbt_snowflake.set_query_tag": {"unique_id": "macro.dbt_snowflake.set_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "set_query_tag", "macro_sql": "{% macro set_query_tag() -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% set original_query_tag = get_current_query_tag() %}\n {{ log(\"Setting query_tag to '\" ~ new_query_tag ~ \"'. Will reset to '\" ~ original_query_tag ~ \"' after materialization.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(new_query_tag)) %}\n {{ return(original_query_tag)}}\n {% endif %}\n {{ return(none)}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_current_query_tag", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.858963}, "macro.dbt_snowflake.unset_query_tag": {"unique_id": "macro.dbt_snowflake.unset_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "unset_query_tag", "macro_sql": "{% macro unset_query_tag(original_query_tag) -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% if original_query_tag %}\n {{ log(\"Resetting query_tag to '\" ~ original_query_tag ~ \"'.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(original_query_tag)) %}\n {% else %}\n {{ log(\"No original query_tag, unsetting parameter.\") }}\n {% do run_query(\"alter session unset query_tag\") %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.859497}, "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_add_remove_columns", "macro_sql": "{% macro snowflake__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column\n {% for column in add_columns %}\n {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n {% endif %}\n\n {% if remove_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column\n {% for column in remove_columns %}\n {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n \n {% do run_query(sql) %}\n \n {% endif %}\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": 1652815139.860242}, "macro.dbt_snowflake.snowflake_dml_explicit_transaction": {"unique_id": "macro.dbt_snowflake.snowflake_dml_explicit_transaction", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake_dml_explicit_transaction", "macro_sql": "{% macro snowflake_dml_explicit_transaction(dml) %}\n {#\n Use this macro to wrap all INSERT, MERGE, UPDATE, DELETE, and TRUNCATE \n statements before passing them into run_query(), or calling in the 'main' statement\n of a materialization\n #}\n {% set dml_transaction -%}\n begin;\n {{ dml }};\n commit;\n {%- endset %}\n \n {% do return(dml_transaction) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.86045}, "macro.dbt_snowflake.snowflake__truncate_relation": {"unique_id": "macro.dbt_snowflake.snowflake__truncate_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__truncate_relation", "macro_sql": "{% macro snowflake__truncate_relation(relation) -%}\n {% set truncate_dml %}\n truncate table {{ relation }}\n {% endset %}\n {% call statement('truncate_relation') -%}\n {{ snowflake_dml_explicit_transaction(truncate_dml) }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.860679}, "macro.dbt_snowflake.snowflake__get_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_merge_sql", "macro_sql": "{% macro snowflake__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) -%}\n\n {#\n Workaround for Snowflake not being happy with a merge on a constant-false predicate.\n When no unique_key is provided, this macro will do a regular insert. If a unique_key\n is provided, then this macro will do a proper merge instead.\n #}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute='name')) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set dml -%}\n {%- if unique_key is none -%}\n\n {{ sql_header if sql_header is not none }}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source_sql }}\n )\n\n {%- else -%}\n\n {{ default__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) }}\n\n {%- endif -%}\n {%- endset -%}\n \n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.default__get_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.861897}, "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_delete_insert_merge_sql", "macro_sql": "{% macro snowflake__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% set dml = default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8621728}, "macro.dbt_snowflake.snowflake__snapshot_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__snapshot_merge_sql", "macro_sql": "{% macro snowflake__snapshot_merge_sql(target, source, insert_cols) %}\n {% set dml = default__snapshot_merge_sql(target, source, insert_cols) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.862432}, "macro.dbt_snowflake.snowflake__load_csv_rows": {"unique_id": "macro.dbt_snowflake.snowflake__load_csv_rows", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "snowflake__load_csv_rows", "macro_sql": "{% macro snowflake__load_csv_rows(model, agate_table) %}\n {% set batch_size = get_batch_size() %}\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 %s\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query('BEGIN', auto_begin=False) %}\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n {% do adapter.add_query('COMMIT', auto_begin=False) %}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8645399}, "macro.dbt_snowflake.materialization_seed_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_seed_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "materialization_seed_snowflake", "macro_sql": "{% materialization seed, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_seed_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_seed_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.864831}, "macro.dbt_snowflake.materialization_view_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_view_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_snowflake", "macro_sql": "{% materialization view, adapter='snowflake' -%}\n\n {% set original_query_tag = set_query_tag() %}\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n {% do persist_docs(target_relation, model, for_columns=false) %}\n\n {% do return(to_return) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.create_or_replace_view", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.865411}, "macro.dbt_snowflake.materialization_table_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_table_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_snowflake", "macro_sql": "{% materialization table, adapter='snowflake' %}\n\n {% set original_query_tag = set_query_tag() %}\n\n {%- set identifier = model['alias'] -%}\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, type='table') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#-- Drop the relation if it was a view to \"convert\" it in a table. This may lead to\n -- downtime, but it should be a relatively infrequent occurrence #}\n {% if old_relation is not none and not old_relation.is_table %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ drop_relation_if_exists(old_relation) }}\n {% endif %}\n\n --build model\n {% call statement('main') -%}\n {{ create_table_as(false, target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.866789}, "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_snowflake_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'delete+insert'\n {%- endset %}\n {% if strategy not in ['merge', 'delete+insert'] %}\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": 1652815139.868122}, "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_get_incremental_sql", "macro_sql": "{% macro dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n {% if strategy == 'merge' %}\n {% do return(get_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% elif strategy == 'delete+insert' %}\n {% do return(get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% else %}\n {% do exceptions.raise_compiler_error('invalid strategy: ' ~ strategy) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql", "macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.868651}, "macro.dbt_snowflake.materialization_incremental_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_incremental_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_snowflake", "macro_sql": "{% materialization incremental, adapter='snowflake' -%}\n \n {% set original_query_tag = set_query_tag() %}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set target_relation = this %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_snowflake_validate_get_incremental_strategy(config) -%}\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif existing_relation.is_view %}\n {#-- 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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif full_refresh_mode %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = target_relation.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8706691}, "macro.dbt_snowflake.materialization_snapshot_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_snapshot_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "materialization_snapshot_snowflake", "macro_sql": "{% materialization snapshot, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_snapshot_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_snapshot_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.871079}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8721511}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8723462}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8724842}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.87262}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.872756}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.87316}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8734488}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8737411}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.874204}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.87446}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8776278}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.877793}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.878007}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.878145}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.878239}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.879}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.879157}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8793228}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\n {%- set ns = namespace() -%} {# handle for-loop scoping with a namespace #}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.880278}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.882088}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8851478}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8854232}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.885587}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8856692}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.885865}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select \n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n \n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n \n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8867068}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.88689}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.887136}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.887556}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.8933718}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n \n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n \n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n \n {% do relations.append(target_relation) %}\n \n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n \n {{ adapter.commit() }}\n \n {% else %}\n\n {% set main_sql = sql %}\n \n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n \n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.89538}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.895862}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.896163}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.896569}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.896936}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n \n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.897745}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n \n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n \n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.89828}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n \n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }} \n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.898881}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.901529}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ predicates | join(' and ') }}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.902661}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.902889}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9032981}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.903559}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.904175}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.90484}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {% set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %} \n {% do adapter.rename_relation(target_relation, backup_relation) %} \n {% do adapter.rename_relation(intermediate_relation, target_relation) %} \n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.909552}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n \n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n \n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n \n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.914092}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n \n {% set schema_changed = False %}\n \n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n \n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n \n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.915284}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n \n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n \n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %} \n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n \n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n \n {% do log(schema_change_message) %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.916447}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n \n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n \n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n \n {% if schema_changes_dict['schema_changed'] %}\n \n {% if on_schema_change == 'fail' %}\n \n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways: \n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n {% endset %}\n \n {% do exceptions.raise_compiler_error(fail_msg) %}\n \n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n \n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {% endif %}\n \n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.917151}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9207308}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9211981}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9213812}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.921576}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n \n {{ sql_header if sql_header is not none }}\n \n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.921976}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"old_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9254122}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.92576}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9259782}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.927176}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.927573}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.927734}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.927907}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.928156}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set agate_table = load_agate_table() -%}\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9308832}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.934696}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.935574}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.935801}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9362612}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.936405}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9365141}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.936664}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9367712}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.93723}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.937472}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9386601}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.939091}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.939313}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.939857}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9401112}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9403882}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.94082}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.941064}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.941453}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.941683}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.941975}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.942566}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.943668}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9442291}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9445171}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9462001}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9474208}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9481542}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.948381}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.948797}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.948977}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9491358}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.949311}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.94979}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.949922}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.950082}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9504662}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.952003}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.952306}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.952488}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.952694}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.952883}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.953038}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.953233}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9535081}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9537458}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9543521}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9545758}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.954759}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.955244}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter '+adapter.type()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.955383}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.955602}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.956022}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9566898}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.956854}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.957053}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.957212}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.957472}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.957952}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.959326}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.959575}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9597561}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.959902}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.960073}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.960317}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.960515}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9608698}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.96105}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.961205}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9628491}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9630022}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9633012}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9634812}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.963808}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.964032}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.964617}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.964867}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n \n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n \n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.965632}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.966172}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.966398}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.96668}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.966947}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.967255}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.967329}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.967399}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.967786}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n \n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.96795}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.968257}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.968449}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.969141}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9692109}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9692822}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.969352}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.969422}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.969577}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9696472}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9697149}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.969779}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9699352}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970003}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970067}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970228}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9702961}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9703622}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9705129}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970582}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970647}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9708512}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970921}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.970986}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.97147}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.97181}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9719129}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.97201}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9725828}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9727411}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.972896}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9730492}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.973237}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.97353}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9736}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9736729}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9740438}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.974184}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.974318}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9744482}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.975008}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.97514}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.975297}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.975508}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.977643}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.978038}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9783099}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n \n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.978691}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %} \n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.979605}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.982029}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.982191}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.982343}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9840372}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.984235}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.984637}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.98477}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9848902}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.985012}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9853451}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9854798}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.985604}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.985953}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.986086}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.986203}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.986698}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.986795}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.986895}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9872231}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.987324}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.987424}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.987825}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.987954}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.988085}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9884381}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.988539}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.989106}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9892108}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.989279}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.989346}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9894972}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9896069}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.989749}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.989855}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.98998}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9913468}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.991798}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.992248}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.99243}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.9927979}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.992896}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.99299}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.993085}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.993657}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.994087}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.99423}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.994612}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.994785}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.99524}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.995401}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.995568}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.995938}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.996067}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.996191}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815139.997031}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0024588}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.002956}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.003263}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0037389}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0086982}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.00913}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.009599}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.010116}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.010748}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.011106}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0114229}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.011981}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.012201}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.012627}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'coalesce(diff_count, 0)') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.012912}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.013579}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.013912}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.014347}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.014665}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0150259}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.015192}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.015811}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.016326}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.016931}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0173}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.017786}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0179808}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.018352}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0185332}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0191948}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.019819}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.02041}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0207438}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0212438}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.021525}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.021987}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\nwith validation as (\n select\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n),\nvalidation_errors as (\n select\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.022496}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.023201}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.023883}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.024339}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0245}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.025259}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0261161}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.029048}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions nore cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.030472}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0307908}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.030957}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.031281}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0314748}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.031779}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.031944}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.032452}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.033152}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{dbt_utils.datediff(start_date, end_date, datepart)}}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.033731}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0339599}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt_utils.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0343099}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0346692}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0350668}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.035755}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0365922}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0374122}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.037823}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.038008}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0385122}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0392032}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.040042}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.040491}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.040765}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.041389}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('*') }}\n {% endif %}\n\n {%- for col in dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.042203}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.043872}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.04589}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.048075}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation') -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0507789}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0511281}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.051371}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, group_by, order_by=order_by, relation_alias=relation_alias)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.052073}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n _inner.*,\n row_number() over (\n partition by {{ group_by }}\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n ) as rn\n from {{ relation if relation_alias is none else relation_alias }} as _inner\n ) as deduped\n where deduped.rn = 1\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.05246}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}\n\n select\n {{ dbt_utils.star(relation, relation_alias='deduped') | indent }}\n from (\n select\n array_agg (\n original\n {% if order_by is not none -%}\n order by {{ order_by }}\n {%- endif %}\n limit 1\n )[offset(0)] as deduped\n from {{ relation if relation_alias is none else relation_alias }} as original\n group by {{ group_by }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0528378}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.053442}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.054341}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.054764}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0550349}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.055414}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.055767}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.057236}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.057504}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0582001}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.058746}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.059724}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.061099}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.06215}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.062973}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.063466}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.06419}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.064627}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0652}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.06569}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.065773}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0658538}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.065932}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.066945}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.067216}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.068815}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0697012}, "macro.dbt_date.get_date_dimension": {"unique_id": "macro.dbt_date.get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "get_date_dimension", "macro_sql": "{% macro get_date_dimension(start_date, end_date) %}\n {{ adapter.dispatch('get_date_dimension', 'dbt_date') (start_date, end_date) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_date_dimension"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.077549}, "macro.dbt_date.default__get_date_dimension": {"unique_id": "macro.dbt_date.default__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "default__get_date_dimension", "macro_sql": "{% macro default__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=false) }} as day_of_week,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week_iso,\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'quarter') }} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.07982}, "macro.dbt_date.postgres__get_date_dimension": {"unique_id": "macro.dbt_date.postgres__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "postgres__get_date_dimension", "macro_sql": "{% macro postgres__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week,\n\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n {# dbt_utils.last_day does not support quarter because postgresql does not support quarter interval. #}\n cast({{dbt_utils.dateadd('day', '-1', dbt_utils.dateadd('month', '3', dbt_utils.date_trunc('quarter', 'd.date_day')))}} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.082133}, "macro.dbt_date.get_base_dates": {"unique_id": "macro.dbt_date.get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "get_base_dates", "macro_sql": "{% macro get_base_dates(start_date=None, end_date=None, n_dateparts=None, datepart=\"day\") %}\n {{ adapter.dispatch('get_base_dates', 'dbt_date') (start_date, end_date, n_dateparts, datepart) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_base_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.083134}, "macro.dbt_date.default__get_base_dates": {"unique_id": "macro.dbt_date.default__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "default__get_base_dates", "macro_sql": "{% macro default__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.083864}, "macro.dbt_date.bigquery__get_base_dates": {"unique_id": "macro.dbt_date.bigquery__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "bigquery__get_base_dates", "macro_sql": "{% macro bigquery__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as date )\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as date )\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.084524}, "macro.dbt_date.get_fiscal_year_dates": {"unique_id": "macro.dbt_date.get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "get_fiscal_year_dates", "macro_sql": "{% macro get_fiscal_year_dates(dates, year_end_month=12, week_start_day=1, shift_year=1) %}\n{{ adapter.dispatch('get_fiscal_year_dates', 'dbt_date') (dates, year_end_month, week_start_day, shift_year) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_fiscal_year_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.086157}, "macro.dbt_date.default__get_fiscal_year_dates": {"unique_id": "macro.dbt_date.default__get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "default__get_fiscal_year_dates", "macro_sql": "{% macro default__get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) %}\n-- this gets all the dates within a fiscal year\n-- determined by the given year-end-month\n-- ending on the saturday closest to that month's end date\nwith date_dimension as (\n select * from {{ dates }}\n),\nyear_month_end as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.month_end_date\n from\n date_dimension d\n where\n d.month_of_year = {{ year_end_month }}\n group by 1,2\n\n),\nweeks as (\n\n select\n d.year_number,\n d.month_of_year,\n d.date_day as week_start_date,\n cast({{ dbt_utils.dateadd('day', 6, 'd.date_day') }} as date) as week_end_date\n from\n date_dimension d\n where\n d.day_of_week = {{ week_start_day }}\n\n),\n-- get all the weeks that start in the month the year ends\nyear_week_ends as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.week_end_date\n from\n weeks d\n where\n d.month_of_year = {{ year_end_month }}\n group by\n 1,2\n\n),\n-- then calculate which Saturday is closest to month end\nweeks_at_month_end as (\n\n select\n d.fiscal_year_number,\n d.week_end_date,\n m.month_end_date,\n rank() over\n (partition by d.fiscal_year_number\n order by\n abs({{ dbt_utils.datediff('d.week_end_date', 'm.month_end_date', 'day') }})\n\n ) as closest_to_month_end\n from\n year_week_ends d\n join\n year_month_end m on d.fiscal_year_number = m.fiscal_year_number\n),\nfiscal_year_range as (\n\n select\n w.fiscal_year_number,\n cast(\n {{ dbt_utils.dateadd('day', 1,\n 'lag(w.week_end_date) over(order by w.week_end_date)') }}\n as date) as fiscal_year_start_date,\n w.week_end_date as fiscal_year_end_date\n from\n weeks_at_month_end w\n where\n w.closest_to_month_end = 1\n\n),\nfiscal_year_dates as (\n\n select\n d.date_day,\n m.fiscal_year_number,\n m.fiscal_year_start_date,\n m.fiscal_year_end_date,\n w.week_start_date,\n w.week_end_date,\n -- we reset the weeks of the year starting with the merch year start date\n dense_rank()\n over(\n partition by m.fiscal_year_number\n order by w.week_start_date\n ) as fiscal_week_of_year\n from\n date_dimension d\n join\n fiscal_year_range m on d.date_day between m.fiscal_year_start_date and m.fiscal_year_end_date\n join\n weeks w on d.date_day between w.week_start_date and w.week_end_date\n\n)\nselect * from fiscal_year_dates order by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0867279}, "macro.dbt_date.get_fiscal_periods": {"unique_id": "macro.dbt_date.get_fiscal_periods", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_periods.sql", "original_file_path": "macros/fiscal_date/get_fiscal_periods.sql", "name": "get_fiscal_periods", "macro_sql": "{% macro get_fiscal_periods(dates, year_end_month, week_start_day, shift_year=1) %}\n{# \nThis macro requires you to pass in a ref to a date dimension, created via\ndbt_date.get_date_dimension()s\n#}\nwith fscl_year_dates_for_periods as (\n {{ dbt_date.get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) }}\n),\nfscl_year_w13 as (\n\n select\n f.*,\n -- We count the weeks in a 13 week period\n -- and separate the 4-5-4 week sequences\n mod(cast(\n (f.fiscal_week_of_year-1) as {{ dbt_utils.type_int() }}\n ), 13) as w13_number,\n -- Chop weeks into 13 week merch quarters\n cast(\n least(\n floor((f.fiscal_week_of_year-1)/13.0)\n , 3)\n as {{ dbt_utils.type_int() }}) as quarter_number\n from\n fscl_year_dates_for_periods f\n\n),\nfscl_periods as (\n\n select\n f.date_day,\n f.fiscal_year_number,\n f.week_start_date,\n f.week_end_date,\n f.fiscal_week_of_year,\n case \n -- we move week 53 into the 3rd period of the quarter\n when f.fiscal_week_of_year = 53 then 3\n when f.w13_number between 0 and 3 then 1\n when f.w13_number between 4 and 8 then 2\n when f.w13_number between 9 and 12 then 3\n end as period_of_quarter,\n f.quarter_number\n from\n fscl_year_w13 f\n\n),\nfscl_periods_quarters as (\n\n select\n f.*,\n cast((\n (f.quarter_number * 3) + f.period_of_quarter\n ) as {{ dbt_utils.type_int() }}) as fiscal_period_number\n from\n fscl_periods f\n\n)\nselect\n date_day,\n fiscal_year_number,\n week_start_date,\n week_end_date,\n fiscal_week_of_year, \n dense_rank() over(partition by fiscal_period_number order by fiscal_week_of_year) as fiscal_week_of_period,\n fiscal_period_number,\n quarter_number+1 as fiscal_quarter_number,\n period_of_quarter as fiscal_period_of_quarter\nfrom \n fscl_periods_quarters \norder by 1,2\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_fiscal_year_dates", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.08765}, "macro.dbt_date.tomorrow": {"unique_id": "macro.dbt_date.tomorrow", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/tomorrow.sql", "original_file_path": "macros/calendar_date/tomorrow.sql", "name": "tomorrow", "macro_sql": "{%- macro tomorrow(date=None, tz=None) -%}\n{{ dbt_date.n_days_away(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.087928}, "macro.dbt_date.next_week": {"unique_id": "macro.dbt_date.next_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_week.sql", "original_file_path": "macros/calendar_date/next_week.sql", "name": "next_week", "macro_sql": "{%- macro next_week(tz=None) -%}\n{{ dbt_date.n_weeks_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.088166}, "macro.dbt_date.next_month_name": {"unique_id": "macro.dbt_date.next_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_name.sql", "original_file_path": "macros/calendar_date/next_month_name.sql", "name": "next_month_name", "macro_sql": "{%- macro next_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.next_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.08848}, "macro.dbt_date.next_month": {"unique_id": "macro.dbt_date.next_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month.sql", "original_file_path": "macros/calendar_date/next_month.sql", "name": "next_month", "macro_sql": "{%- macro next_month(tz=None) -%}\n{{ dbt_date.n_months_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.088715}, "macro.dbt_date.day_name": {"unique_id": "macro.dbt_date.day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "day_name", "macro_sql": "{%- macro day_name(date, short=True) -%}\n {{ adapter.dispatch('day_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.089344}, "macro.dbt_date.default__day_name": {"unique_id": "macro.dbt_date.default__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "default__day_name", "macro_sql": "\n\n{%- macro default__day_name(date, short) -%}\n{%- set f = 'Dy' if short else 'Day' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.089542}, "macro.dbt_date.snowflake__day_name": {"unique_id": "macro.dbt_date.snowflake__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "snowflake__day_name", "macro_sql": "\n\n{%- macro snowflake__day_name(date, short) -%}\n {%- if short -%}\n dayname({{ date }})\n {%- else -%}\n -- long version not implemented on Snowflake so we're doing it manually :/\n case dayname({{ date }})\n when 'Mon' then 'Monday'\n when 'Tue' then 'Tuesday'\n when 'Wed' then 'Wednesday'\n when 'Thu' then 'Thursday'\n when 'Fri' then 'Friday'\n when 'Sat' then 'Saturday'\n when 'Sun' then 'Sunday'\n end\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0897431}, "macro.dbt_date.bigquery__day_name": {"unique_id": "macro.dbt_date.bigquery__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "bigquery__day_name", "macro_sql": "\n\n{%- macro bigquery__day_name(date, short) -%}\n{%- set f = '%a' if short else '%A' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0899332}, "macro.dbt_date.postgres__day_name": {"unique_id": "macro.dbt_date.postgres__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "postgres__day_name", "macro_sql": "\n\n{%- macro postgres__day_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMDy' if short else 'FMDay' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.090137}, "macro.dbt_date.to_unixtimestamp": {"unique_id": "macro.dbt_date.to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "to_unixtimestamp", "macro_sql": "{%- macro to_unixtimestamp(timestamp) -%}\n {{ adapter.dispatch('to_unixtimestamp', 'dbt_date') (timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__to_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.090488}, "macro.dbt_date.default__to_unixtimestamp": {"unique_id": "macro.dbt_date.default__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "default__to_unixtimestamp", "macro_sql": "\n\n{%- macro default__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0906198}, "macro.dbt_date.snowflake__to_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "snowflake__to_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch_seconds', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.090752}, "macro.dbt_date.bigquery__to_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "bigquery__to_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__to_unixtimestamp(timestamp) -%}\n unix_seconds({{ timestamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.09085}, "macro.dbt_date.n_days_away": {"unique_id": "macro.dbt_date.n_days_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_away.sql", "original_file_path": "macros/calendar_date/n_days_away.sql", "name": "n_days_away", "macro_sql": "{%- macro n_days_away(n, date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(-1 * n, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0912051}, "macro.dbt_date.week_start": {"unique_id": "macro.dbt_date.week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "week_start", "macro_sql": "{%- macro week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.091716}, "macro.dbt_date.default__week_start": {"unique_id": "macro.dbt_date.default__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "default__week_start", "macro_sql": "{%- macro default__week_start(date) -%}\ncast({{ dbt_utils.date_trunc('week', date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.091862}, "macro.dbt_date.snowflake__week_start": {"unique_id": "macro.dbt_date.snowflake__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "snowflake__week_start", "macro_sql": "\n\n{%- macro snowflake__week_start(date) -%}\n {#\n Get the day of week offset: e.g. if the date is a Sunday,\n dbt_date.day_of_week returns 1, so we subtract 1 to get a 0 offset\n #}\n {% set off_set = dbt_date.day_of_week(date, isoweek=False) ~ \" - 1\" %}\n cast({{ dbt_utils.dateadd(\"day\", \"-1 * (\" ~ off_set ~ \")\", date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.day_of_week", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.092149}, "macro.dbt_date.postgres__week_start": {"unique_id": "macro.dbt_date.postgres__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "postgres__week_start", "macro_sql": "\n\n{%- macro postgres__week_start(date) -%}\n-- Sunday as week start date\ncast({{ dbt_utils.dateadd('day', -1, dbt_utils.date_trunc('week', dbt_utils.dateadd('day', 1, date))) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.092405}, "macro.dbt_date.iso_week_start": {"unique_id": "macro.dbt_date.iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "iso_week_start", "macro_sql": "{%- macro iso_week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.092926}, "macro.dbt_date._iso_week_start": {"unique_id": "macro.dbt_date._iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "_iso_week_start", "macro_sql": "{%- macro _iso_week_start(date, week_type) -%}\ncast({{ dbt_utils.date_trunc(week_type, date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.093076}, "macro.dbt_date.default__iso_week_start": {"unique_id": "macro.dbt_date.default__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "default__iso_week_start", "macro_sql": "\n\n{%- macro default__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.093208}, "macro.dbt_date.snowflake__iso_week_start": {"unique_id": "macro.dbt_date.snowflake__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "snowflake__iso_week_start", "macro_sql": "\n\n{%- macro snowflake__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.09334}, "macro.dbt_date.postgres__iso_week_start": {"unique_id": "macro.dbt_date.postgres__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "postgres__iso_week_start", "macro_sql": "\n\n{%- macro postgres__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.093472}, "macro.dbt_date.n_days_ago": {"unique_id": "macro.dbt_date.n_days_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_ago.sql", "original_file_path": "macros/calendar_date/n_days_ago.sql", "name": "n_days_ago", "macro_sql": "{%- macro n_days_ago(n, date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{%- set n = n|int -%}\ncast({{ dbt_utils.dateadd('day', -1 * n, dt) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.09393}, "macro.dbt_date.last_week": {"unique_id": "macro.dbt_date.last_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_week.sql", "original_file_path": "macros/calendar_date/last_week.sql", "name": "last_week", "macro_sql": "{%- macro last_week(tz=None) -%}\n{{ dbt_date.n_weeks_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.094166}, "macro.dbt_date.now": {"unique_id": "macro.dbt_date.now", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/now.sql", "original_file_path": "macros/calendar_date/now.sql", "name": "now", "macro_sql": "{%- macro now(tz=None) -%}\n{{ dbt_date.convert_timezone(dbt_utils.current_timestamp(), tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.convert_timezone", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.094413}, "macro.dbt_date.periods_since": {"unique_id": "macro.dbt_date.periods_since", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/periods_since.sql", "original_file_path": "macros/calendar_date/periods_since.sql", "name": "periods_since", "macro_sql": "{%- macro periods_since(date_col, period_name='day', tz=None) -%}\n{{ dbt_utils.datediff(date_col, dbt_date.now(tz), period_name) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.09472}, "macro.dbt_date.today": {"unique_id": "macro.dbt_date.today", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/today.sql", "original_file_path": "macros/calendar_date/today.sql", "name": "today", "macro_sql": "{%- macro today(tz=None) -%}\ncast({{ dbt_date.now(tz) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.094945}, "macro.dbt_date.last_month": {"unique_id": "macro.dbt_date.last_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month.sql", "original_file_path": "macros/calendar_date/last_month.sql", "name": "last_month", "macro_sql": "{%- macro last_month(tz=None) -%}\n{{ dbt_date.n_months_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.095171}, "macro.dbt_date.day_of_year": {"unique_id": "macro.dbt_date.day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "day_of_year", "macro_sql": "{%- macro day_of_year(date) -%}\n{{ adapter.dispatch('day_of_year', 'dbt_date') (date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__day_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.095525}, "macro.dbt_date.default__day_of_year": {"unique_id": "macro.dbt_date.default__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "default__day_of_year", "macro_sql": "\n\n{%- macro default__day_of_year(date) -%}\n {{ dbt_date.date_part('dayofyear', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.095658}, "macro.dbt_date.postgres__day_of_year": {"unique_id": "macro.dbt_date.postgres__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "postgres__day_of_year", "macro_sql": "\n\n{%- macro postgres__day_of_year(date) -%}\n {{ dbt_date.date_part('doy', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.095789}, "macro.dbt_date.redshift__day_of_year": {"unique_id": "macro.dbt_date.redshift__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "redshift__day_of_year", "macro_sql": "\n\n{%- macro redshift__day_of_year(date) -%}\n cast({{ dbt_date.date_part('dayofyear', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.095962}, "macro.dbt_date.from_unixtimestamp": {"unique_id": "macro.dbt_date.from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "from_unixtimestamp", "macro_sql": "{%- macro from_unixtimestamp(epochs, format=\"seconds\") -%}\n {{ adapter.dispatch('from_unixtimestamp', 'dbt_date') (epochs, format) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__from_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.097253}, "macro.dbt_date.default__from_unixtimestamp": {"unique_id": "macro.dbt_date.default__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "default__from_unixtimestamp", "macro_sql": "\n\n{%- macro default__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp({{ epochs }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.097505}, "macro.dbt_date.postgres__from_unixtimestamp": {"unique_id": "macro.dbt_date.postgres__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "postgres__from_unixtimestamp", "macro_sql": "\n\n{%- macro postgres__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n cast(to_timestamp({{ epochs }}) at time zone 'UTC' as timestamp)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.097758}, "macro.dbt_date.snowflake__from_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "snowflake__from_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n {%- set scale = 0 -%}\n {%- elif format == \"milliseconds\" -%}\n {%- set scale = 3 -%}\n {%- elif format == \"microseconds\" -%}\n {%- set scale = 6 -%}\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp_ntz({{ epochs }}, {{ scale }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0982022}, "macro.dbt_date.bigquery__from_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "bigquery__from_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n timestamp_seconds({{ epochs }})\n {%- elif format == \"milliseconds\" -%}\n timestamp_millis({{ epochs }})\n {%- elif format == \"microseconds\" -%}\n timestamp_micros({{ epochs }})\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.098582}, "macro.dbt_date.n_months_ago": {"unique_id": "macro.dbt_date.n_months_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_ago.sql", "original_file_path": "macros/calendar_date/n_months_ago.sql", "name": "n_months_ago", "macro_sql": "{%- macro n_months_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.0990012}, "macro.dbt_date.date_part": {"unique_id": "macro.dbt_date.date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "date_part", "macro_sql": "{% macro date_part(datepart, date) -%}\n {{ adapter.dispatch('date_part', 'dbt_date') (datepart, date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.099339}, "macro.dbt_date.default__date_part": {"unique_id": "macro.dbt_date.default__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "default__date_part", "macro_sql": "{% macro default__date_part(datepart, date) -%}\n date_part('{{ datepart }}', {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.099468}, "macro.dbt_date.bigquery__date_part": {"unique_id": "macro.dbt_date.bigquery__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "bigquery__date_part", "macro_sql": "{% macro bigquery__date_part(datepart, date) -%}\n extract({{ datepart }} from {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.099595}, "macro.dbt_date.n_weeks_away": {"unique_id": "macro.dbt_date.n_weeks_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_away.sql", "original_file_path": "macros/calendar_date/n_weeks_away.sql", "name": "n_weeks_away", "macro_sql": "{%- macro n_weeks_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.099987}, "macro.dbt_date.day_of_month": {"unique_id": "macro.dbt_date.day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "day_of_month", "macro_sql": "{%- macro day_of_month(date) -%}\n{{ dbt_date.date_part('day', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.100248}, "macro.dbt_date.redshift__day_of_month": {"unique_id": "macro.dbt_date.redshift__day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "redshift__day_of_month", "macro_sql": "\n\n{%- macro redshift__day_of_month(date) -%}\ncast({{ dbt_date.date_part('day', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.100422}, "macro.dbt_date.yesterday": {"unique_id": "macro.dbt_date.yesterday", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/yesterday.sql", "original_file_path": "macros/calendar_date/yesterday.sql", "name": "yesterday", "macro_sql": "{%- macro yesterday(date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.100689}, "macro.dbt_date.day_of_week": {"unique_id": "macro.dbt_date.day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "day_of_week", "macro_sql": "{%- macro day_of_week(date, isoweek=true) -%}\n{{ adapter.dispatch('day_of_week', 'dbt_date') (date, isoweek) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_of_week"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1023061}, "macro.dbt_date.default__day_of_week": {"unique_id": "macro.dbt_date.default__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "default__day_of_week", "macro_sql": "\n\n{%- macro default__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else {{ dow }}\n end\n {%- else -%}\n {{ dow }} + 1\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.102583}, "macro.dbt_date.snowflake__day_of_week": {"unique_id": "macro.dbt_date.snowflake__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "snowflake__day_of_week", "macro_sql": "\n\n{%- macro snowflake__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'dayofweekiso' -%}\n {{ dbt_date.date_part(dow_part, date) }}\n {%- else -%}\n {%- set dow_part = 'dayofweek' -%}\n case\n when {{ dbt_date.date_part(dow_part, date) }} = 7 then 1\n else {{ dbt_date.date_part(dow_part, date) }} + 1\n end\n {%- endif -%}\n\n\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.102974}, "macro.dbt_date.bigquery__day_of_week": {"unique_id": "macro.dbt_date.bigquery__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "bigquery__day_of_week", "macro_sql": "\n\n{%- macro bigquery__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (1) to Monday (2)\n when {{ dow }} = 1 then 7\n else {{ dow }} - 1\n end\n {%- else -%}\n {{ dow }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.10325}, "macro.dbt_date.postgres__day_of_week": {"unique_id": "macro.dbt_date.postgres__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "postgres__day_of_week", "macro_sql": "\n\n\n{%- macro postgres__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'isodow' -%}\n -- Monday(1) to Sunday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} as {{ dbt_utils.type_int() }})\n {%- else -%}\n {%- set dow_part = 'dow' -%}\n -- Sunday(1) to Saturday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} + 1 as {{ dbt_utils.type_int() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.103661}, "macro.dbt_date.redshift__day_of_week": {"unique_id": "macro.dbt_date.redshift__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "redshift__day_of_week", "macro_sql": "\n\n\n{%- macro redshift__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else cast({{ dow }} as {{ dbt_utils.type_bigint() }})\n end\n {%- else -%}\n cast({{ dow }} + 1 as {{ dbt_utils.type_bigint() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.104079}, "macro.dbt_date.iso_week_end": {"unique_id": "macro.dbt_date.iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "iso_week_end", "macro_sql": "{%- macro iso_week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.104573}, "macro.dbt_date._iso_week_end": {"unique_id": "macro.dbt_date._iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "_iso_week_end", "macro_sql": "{%- macro _iso_week_end(date, week_type) -%}\n{%- set dt = dbt_date.iso_week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.iso_week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.104778}, "macro.dbt_date.default__iso_week_end": {"unique_id": "macro.dbt_date.default__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "default__iso_week_end", "macro_sql": "\n\n{%- macro default__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.104909}, "macro.dbt_date.snowflake__iso_week_end": {"unique_id": "macro.dbt_date.snowflake__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "snowflake__iso_week_end", "macro_sql": "\n\n{%- macro snowflake__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1050408}, "macro.dbt_date.n_weeks_ago": {"unique_id": "macro.dbt_date.n_weeks_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_ago.sql", "original_file_path": "macros/calendar_date/n_weeks_ago.sql", "name": "n_weeks_ago", "macro_sql": "{%- macro n_weeks_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1054552}, "macro.dbt_date.month_name": {"unique_id": "macro.dbt_date.month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "month_name", "macro_sql": "{%- macro month_name(date, short=True) -%}\n {{ adapter.dispatch('month_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__month_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.105953}, "macro.dbt_date.default__month_name": {"unique_id": "macro.dbt_date.default__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "default__month_name", "macro_sql": "\n\n{%- macro default__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MONTH' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.106147}, "macro.dbt_date.bigquery__month_name": {"unique_id": "macro.dbt_date.bigquery__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "bigquery__month_name", "macro_sql": "\n\n{%- macro bigquery__month_name(date, short) -%}\n{%- set f = '%b' if short else '%B' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.106338}, "macro.dbt_date.snowflake__month_name": {"unique_id": "macro.dbt_date.snowflake__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "snowflake__month_name", "macro_sql": "\n\n{%- macro snowflake__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MMMM' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1065311}, "macro.dbt_date.postgres__month_name": {"unique_id": "macro.dbt_date.postgres__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "postgres__month_name", "macro_sql": "\n\n{%- macro postgres__month_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMMon' if short else 'FMMonth' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1067252}, "macro.dbt_date.last_month_name": {"unique_id": "macro.dbt_date.last_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_name.sql", "original_file_path": "macros/calendar_date/last_month_name.sql", "name": "last_month_name", "macro_sql": "{%- macro last_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.last_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.107035}, "macro.dbt_date.week_of_year": {"unique_id": "macro.dbt_date.week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "week_of_year", "macro_sql": "{%- macro week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.default__week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.10749}, "macro.dbt_date.default__week_of_year": {"unique_id": "macro.dbt_date.default__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "default__week_of_year", "macro_sql": "{%- macro default__week_of_year(date) -%}\ncast({{ dbt_date.date_part('week', date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.107666}, "macro.dbt_date.postgres__week_of_year": {"unique_id": "macro.dbt_date.postgres__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "postgres__week_of_year", "macro_sql": "\n\n{%- macro postgres__week_of_year(date) -%}\n{# postgresql 'week' returns isoweek. Use to_char instead.\n WW = the first week starts on the first day of the year #}\ncast(to_char({{ date }}, 'WW') as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.107807}, "macro.dbt_date.convert_timezone": {"unique_id": "macro.dbt_date.convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "convert_timezone", "macro_sql": "{%- macro convert_timezone(column, target_tz=None, source_tz=None) -%}\n{%- set source_tz = \"UTC\" if not source_tz else source_tz -%}\n{%- set target_tz = var(\"dbt_date:time_zone\") if not target_tz else target_tz -%}\n{{ adapter.dispatch('convert_timezone', 'dbt_date') (column, target_tz, source_tz) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.108947}, "macro.dbt_date.default__convert_timezone": {"unique_id": "macro.dbt_date.default__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "default__convert_timezone", "macro_sql": "{% macro default__convert_timezone(column, target_tz, source_tz) -%}\n{%- if not source_tz -%}\ncast(convert_timezone('{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast(convert_timezone('{{ source_tz }}', '{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.10928}, "macro.dbt_date.bigquery__convert_timezone": {"unique_id": "macro.dbt_date.bigquery__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "bigquery__convert_timezone", "macro_sql": "{%- macro bigquery__convert_timezone(column, target_tz, source_tz=None) -%}\ntimestamp(datetime({{ column }}, '{{ target_tz}}'))\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.109426}, "macro.dbt_date.spark__convert_timezone": {"unique_id": "macro.dbt_date.spark__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "spark__convert_timezone", "macro_sql": "{%- macro spark__convert_timezone(column, target_tz, source_tz) -%}\nfrom_utc_timestamp(\n to_utc_timestamp({{ column }}, '{{ source_tz }}'),\n '{{ target_tz }}'\n )\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1095822}, "macro.dbt_date.postgres__convert_timezone": {"unique_id": "macro.dbt_date.postgres__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "postgres__convert_timezone", "macro_sql": "{% macro postgres__convert_timezone(column, target_tz, source_tz) -%}\n{%- if source_tz -%}\ncast({{ column }} at time zone '{{ source_tz }}' at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast({{ column }} at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.109954}, "macro.dbt_date.redshift__convert_timezone": {"unique_id": "macro.dbt_date.redshift__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "redshift__convert_timezone", "macro_sql": "{%- macro redshift__convert_timezone(column, target_tz, source_tz) -%}\n{{ return(dbt_date.default__convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1101398}, "macro.dbt_date.n_months_away": {"unique_id": "macro.dbt_date.n_months_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_away.sql", "original_file_path": "macros/calendar_date/n_months_away.sql", "name": "n_months_away", "macro_sql": "{%- macro n_months_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.110539}, "macro.dbt_date.iso_week_of_year": {"unique_id": "macro.dbt_date.iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "iso_week_of_year", "macro_sql": "{%- macro iso_week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1110961}, "macro.dbt_date._iso_week_of_year": {"unique_id": "macro.dbt_date._iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "_iso_week_of_year", "macro_sql": "{%- macro _iso_week_of_year(date, week_type) -%}\ncast({{ dbt_date.date_part(week_type, date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.111285}, "macro.dbt_date.default__iso_week_of_year": {"unique_id": "macro.dbt_date.default__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "default__iso_week_of_year", "macro_sql": "\n\n{%- macro default__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1114209}, "macro.dbt_date.snowflake__iso_week_of_year": {"unique_id": "macro.dbt_date.snowflake__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "snowflake__iso_week_of_year", "macro_sql": "\n\n{%- macro snowflake__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.111552}, "macro.dbt_date.postgres__iso_week_of_year": {"unique_id": "macro.dbt_date.postgres__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "postgres__iso_week_of_year", "macro_sql": "\n\n{%- macro postgres__iso_week_of_year(date) -%}\n-- postgresql week is isoweek, the first week of a year containing January 4 of that year.\n{{ dbt_date._iso_week_of_year(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1116889}, "macro.dbt_date.week_end": {"unique_id": "macro.dbt_date.week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "week_end", "macro_sql": "{%- macro week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.112184}, "macro.dbt_date.default__week_end": {"unique_id": "macro.dbt_date.default__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "default__week_end", "macro_sql": "{%- macro default__week_end(date) -%}\n{{ dbt_utils.last_day(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.112326}, "macro.dbt_date.snowflake__week_end": {"unique_id": "macro.dbt_date.snowflake__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "snowflake__week_end", "macro_sql": "\n\n{%- macro snowflake__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1125178}, "macro.dbt_date.postgres__week_end": {"unique_id": "macro.dbt_date.postgres__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "postgres__week_end", "macro_sql": "\n\n{%- macro postgres__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.112715}, "macro.dbt_date.next_month_number": {"unique_id": "macro.dbt_date.next_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_number.sql", "original_file_path": "macros/calendar_date/next_month_number.sql", "name": "next_month_number", "macro_sql": "{%- macro next_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.next_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1129978}, "macro.dbt_date.last_month_number": {"unique_id": "macro.dbt_date.last_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_number.sql", "original_file_path": "macros/calendar_date/last_month_number.sql", "name": "last_month_number", "macro_sql": "{%- macro last_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.last_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.113276}, "macro.dbt_expectations.type_timestamp": {"unique_id": "macro.dbt_expectations.type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_expectations')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.113688}, "macro.dbt_expectations.default__type_timestamp": {"unique_id": "macro.dbt_expectations.default__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() -%}\n timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1137578}, "macro.dbt_expectations.snowflake__type_timestamp": {"unique_id": "macro.dbt_expectations.snowflake__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1138282}, "macro.dbt_expectations.postgres__type_timestamp": {"unique_id": "macro.dbt_expectations.postgres__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.113894}, "macro.dbt_expectations.type_datetime": {"unique_id": "macro.dbt_expectations.type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_datetime", "macro_sql": "{% macro type_datetime() -%}\n {{ return(adapter.dispatch('type_datetime', 'dbt_expectations')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.114043}, "macro.dbt_expectations.default__type_datetime": {"unique_id": "macro.dbt_expectations.default__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_datetime", "macro_sql": "{% macro default__type_datetime() -%}\n datetime\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.114114}, "macro.dbt_expectations.snowflake__type_datetime": {"unique_id": "macro.dbt_expectations.snowflake__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_datetime", "macro_sql": "{% macro snowflake__type_datetime() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.11418}, "macro.dbt_expectations.postgres__type_datetime": {"unique_id": "macro.dbt_expectations.postgres__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_datetime", "macro_sql": "{% macro postgres__type_datetime() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.114305}, "macro.dbt_expectations.regexp_instr": {"unique_id": "macro.dbt_expectations.regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "regexp_instr", "macro_sql": "{% macro regexp_instr(source_value, regexp, position=1, occurrence=1) %}\n\n {{ adapter.dispatch('regexp_instr', 'dbt_expectations')(\n source_value, regexp, position, occurrence\n ) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__regexp_instr"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.114911}, "macro.dbt_expectations.default__regexp_instr": {"unique_id": "macro.dbt_expectations.default__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "default__regexp_instr", "macro_sql": "{% macro default__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.115098}, "macro.dbt_expectations.redshift__regexp_instr": {"unique_id": "macro.dbt_expectations.redshift__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "redshift__regexp_instr", "macro_sql": "{% macro redshift__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.115276}, "macro.dbt_expectations.postgres__regexp_instr": {"unique_id": "macro.dbt_expectations.postgres__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "postgres__regexp_instr", "macro_sql": "{% macro postgres__regexp_instr(source_value, regexp, position, occurrence) %}\narray_length((select regexp_matches({{ source_value }}, '{{ regexp }}')), 1)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1154199}, "macro.dbt_expectations.spark__regexp_instr": {"unique_id": "macro.dbt_expectations.spark__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "spark__regexp_instr", "macro_sql": "{% macro spark__regexp_instr(source_value, regexp, position, occurrence) %}\ncase when {{ source_value }} rlike '{{ regexp }}' then 1 else 0 end\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.115564}, "macro.dbt_expectations.log_natural": {"unique_id": "macro.dbt_expectations.log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "log_natural", "macro_sql": "{% macro log_natural(x) -%}\n {{ adapter.dispatch('log_natural', 'dbt_expectations') (x) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.115892}, "macro.dbt_expectations.default__log_natural": {"unique_id": "macro.dbt_expectations.default__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "default__log_natural", "macro_sql": "{% macro default__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.115989}, "macro.dbt_expectations.bigquery__log_natural": {"unique_id": "macro.dbt_expectations.bigquery__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "bigquery__log_natural", "macro_sql": "{% macro bigquery__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1160882}, "macro.dbt_expectations.snowflake__log_natural": {"unique_id": "macro.dbt_expectations.snowflake__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "snowflake__log_natural", "macro_sql": "{% macro snowflake__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.116181}, "macro.dbt_expectations.rand": {"unique_id": "macro.dbt_expectations.rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "rand", "macro_sql": "{% macro rand() -%}\n {{ adapter.dispatch('rand', 'dbt_expectations') () }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__rand"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.116522}, "macro.dbt_expectations.default__rand": {"unique_id": "macro.dbt_expectations.default__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "default__rand", "macro_sql": "{% macro default__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.116593}, "macro.dbt_expectations.bigquery__rand": {"unique_id": "macro.dbt_expectations.bigquery__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "bigquery__rand", "macro_sql": "{% macro bigquery__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1166642}, "macro.dbt_expectations.snowflake__rand": {"unique_id": "macro.dbt_expectations.snowflake__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "snowflake__rand", "macro_sql": "{% macro snowflake__rand(seed) %}\n\n uniform(0::float, 1::float, random())\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.11674}, "macro.dbt_expectations.postgres__rand": {"unique_id": "macro.dbt_expectations.postgres__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "postgres__rand", "macro_sql": "{% macro postgres__rand() %}\n\n random()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.116807}, "macro.dbt_expectations.redshift__rand": {"unique_id": "macro.dbt_expectations.redshift__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "redshift__rand", "macro_sql": "{% macro redshift__rand() %}\n\n random()\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1168718}, "macro.dbt_expectations.median": {"unique_id": "macro.dbt_expectations.median", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/median.sql", "original_file_path": "macros/math/median.sql", "name": "median", "macro_sql": "{% macro median(field) %}\n{{ dbt_expectations.percentile_cont(field, 0.5) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.117111}, "macro.dbt_expectations.percentile_cont": {"unique_id": "macro.dbt_expectations.percentile_cont", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "percentile_cont", "macro_sql": "{% macro percentile_cont(field, quantile, partition=None) %}\n {{ adapter.dispatch('quantile', 'dbt_expectations') (field, quantile, partition) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__quantile"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.117568}, "macro.dbt_expectations.default__quantile": {"unique_id": "macro.dbt_expectations.default__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "default__quantile", "macro_sql": "{% macro default__quantile(field, quantile, partition) -%}\n percentile_cont({{ quantile }}) within group (order by {{ field }})\n {%- if partition %}over(partition by {{ partition }}){% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.117773}, "macro.dbt_expectations.bigquery__quantile": {"unique_id": "macro.dbt_expectations.bigquery__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "bigquery__quantile", "macro_sql": "{% macro bigquery__quantile(field, quantile, partition) %}\n percentile_cont({{ field }}, {{ quantile }})\n over({%- if partition %}partition by {{ partition }}{% endif -%})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.118028}, "macro.dbt_expectations.test_expression_between": {"unique_id": "macro.dbt_expectations.test_expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "test_expression_between", "macro_sql": "{% test expression_between(model,\n expression,\n min_value=None,\n max_value=None,\n group_by_columns=None,\n row_condition=None,\n strictly=False\n ) %}\n\n {{ dbt_expectations.expression_between(model, expression, min_value, max_value, group_by_columns, row_condition, strictly) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.119162}, "macro.dbt_expectations.expression_between": {"unique_id": "macro.dbt_expectations.expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "expression_between", "macro_sql": "{% macro expression_between(model,\n expression,\n min_value,\n max_value,\n group_by_columns,\n row_condition,\n strictly\n ) %}\n\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n\n{%- set strict_operator = \"\" if strictly else \"=\" -%}\n\n{% set expression_min_max %}\n( 1=1\n{%- if min_value is not none %} and {{ expression | trim }} >{{ strict_operator }} {{ min_value }}{% endif %}\n{%- if max_value is not none %} and {{ expression | trim }} <{{ strict_operator }} {{ max_value }}{% endif %}\n)\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression_min_max,\n group_by_columns=group_by_columns,\n row_condition=row_condition)\n }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.119883}, "macro.dbt_expectations.test_expression_is_true": {"unique_id": "macro.dbt_expectations.test_expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n\n {{ dbt_expectations.expression_is_true(model, expression, test_condition, group_by_columns, row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.120803}, "macro.dbt_expectations.expression_is_true": {"unique_id": "macro.dbt_expectations.expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "expression_is_true", "macro_sql": "{% macro expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n {{ adapter.dispatch('expression_is_true', 'dbt_expectations') (model, expression, test_condition, group_by_columns, row_condition) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.121092}, "macro.dbt_expectations.default__expression_is_true": {"unique_id": "macro.dbt_expectations.default__expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "default__expression_is_true", "macro_sql": "{% macro default__expression_is_true(model, expression, test_condition, group_by_columns, row_condition) -%}\nwith grouped_expression as (\n select\n {% if group_by_columns %}\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ dbt_expectations.truth_expression(expression) }}\n from {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by_columns %}\n group by\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }}{% if not loop.last %},{% endif %}\n {% endfor %}\n {% endif %}\n\n),\nvalidation_errors as (\n\n select\n *\n from\n grouped_expression\n where\n not(expression {{ test_condition }})\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.121685}, "macro.dbt_expectations.get_select": {"unique_id": "macro.dbt_expectations.get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "get_select", "macro_sql": "{% macro get_select(model, expression, row_condition, group_by) -%}\n {{ adapter.dispatch('get_select', 'dbt_expectations') (model, expression, row_condition, group_by) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1264498}, "macro.dbt_expectations.default__get_select": {"unique_id": "macro.dbt_expectations.default__get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__get_select", "macro_sql": "\n\n{%- macro default__get_select(model, expression, row_condition, group_by) %}\n select\n {% if group_by %}\n {% for g in group_by -%}\n {{ g }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ expression }} as expression\n from\n {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by %}\n group by\n {% for g in group_by -%}\n {{ loop.index }}{% if not loop.last %},{% endif %}\n {% endfor %}\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": 1652815140.126988}, "macro.dbt_expectations.test_equal_expression": {"unique_id": "macro.dbt_expectations.test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "test_equal_expression", "macro_sql": "{% test equal_expression(model, expression,\n compare_model=None,\n compare_expression=None,\n group_by=None,\n compare_group_by=None,\n row_condition=None,\n compare_row_condition=None,\n tolerance=0.0,\n tolerance_percent=None\n ) -%}\n\n {{ adapter.dispatch('test_equal_expression', 'dbt_expectations') (\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.127448}, "macro.dbt_expectations.default__test_equal_expression": {"unique_id": "macro.dbt_expectations.default__test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__test_equal_expression", "macro_sql": "\n\n{%- macro default__test_equal_expression(\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) -%}\n\n {%- set compare_model = model if not compare_model else compare_model -%}\n {%- set compare_expression = expression if not compare_expression else compare_expression -%}\n {%- set compare_row_condition = row_condition if not compare_row_condition else compare_row_condition -%}\n {%- set compare_group_by = group_by if not compare_group_by else compare_group_by -%}\n\n {%- set n_cols = (group_by|length) if group_by else 0 %}\n with a as (\n {{ dbt_expectations.get_select(model, expression, row_condition, group_by) }}\n ),\n b as (\n {{ dbt_expectations.get_select(compare_model, compare_expression, compare_row_condition, compare_group_by) }}\n ),\n final as (\n\n select\n {% for i in range(1, n_cols + 1) -%}\n coalesce(a.col_{{ i }}, b.col_{{ i }}) as col_{{ i }},\n {% endfor %}\n a.expression,\n b.expression as compare_expression,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0)) as expression_difference,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0))/\n nullif(a.expression * 1.0, 0) as expression_difference_percent\n from\n {% if n_cols > 0 %}\n a\n full outer join\n b on\n {% for i in range(1, n_cols + 1) -%}\n a.col_{{ i }} = b.col_{{ i }} {% if not loop.last %}and{% endif %}\n {% endfor -%}\n {% else %}\n a cross join b\n {% endif %}\n )\n -- DEBUG:\n -- select * from final\n select\n *\n from final\n where\n {% if tolerance_percent %}\n expression_difference_percent > {{ tolerance_percent }}\n {% else %}\n expression_difference > {{ tolerance }}\n {% endif %}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.128685}, "macro.dbt_expectations.truth_expression": {"unique_id": "macro.dbt_expectations.truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "truth_expression", "macro_sql": "{% macro truth_expression(expression) %}\n {{ adapter.dispatch('truth_expression', 'dbt_expectations') (expression) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1289852}, "macro.dbt_expectations.default__truth_expression": {"unique_id": "macro.dbt_expectations.default__truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "default__truth_expression", "macro_sql": "{% macro default__truth_expression(expression) %}\n {{ expression }} as expression\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1290822}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "name": "test_expect_column_values_to_match_like_pattern", "macro_sql": "{% test expect_column_values_to_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.129645}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "name": "test_expect_column_values_to_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.130661}, "macro.dbt_expectations.test_expect_column_values_to_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "name": "test_expect_column_values_to_match_regex", "macro_sql": "{% test expect_column_values_to_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.131288}, "macro.dbt_expectations.test_expect_column_value_lengths_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "name": "test_expect_column_value_lengths_to_equal", "macro_sql": "{% test expect_column_value_lengths_to_equal(model, column_name,\n value,\n row_condition=None\n ) %}\n\n{% set expression = dbt_utils.length(column_name) ~ \" = \" ~ value %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1318378}, "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "name": "test_expect_column_value_lengths_to_be_between", "macro_sql": "{% test expect_column_value_lengths_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\n{{ dbt_utils.length(column_name) }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1326349}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "name": "test_expect_column_values_to_not_match_regex", "macro_sql": "{% test expect_column_values_to_not_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.133253}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "name": "test_expect_column_values_to_not_match_regex_list", "macro_sql": "{% test expect_column_values_to_not_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for regex in regex_list %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{%- if not loop.last %}\n{{ \" and \" if match_on == \"all\" else \" or \"}}\n{% endif -%}\n{% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.134294}, "macro.dbt_expectations.test_expect_column_values_to_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "name": "test_expect_column_values_to_match_regex_list", "macro_sql": "{% test expect_column_values_to_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for regex in regex_list %}\n {{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.135286}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "name": "test_expect_column_values_to_not_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.136294}, "macro.dbt_expectations._get_like_pattern_expression": {"unique_id": "macro.dbt_expectations._get_like_pattern_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "original_file_path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "name": "_get_like_pattern_expression", "macro_sql": "{% macro _get_like_pattern_expression(column_name, like_pattern, positive) %}\n{{ column_name }} {{ \"not\" if not positive else \"\" }} like '{{ like_pattern }}'\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1365938}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "name": "test_expect_column_values_to_not_match_like_pattern", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1371572}, "macro.dbt_expectations.test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "test_expect_row_values_to_have_recent_data", "macro_sql": "{% test expect_row_values_to_have_recent_data(model,\n column_name,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_row_values_to_have_recent_data', 'dbt_expectations') (model,\n column_name,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.138245}, "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "default__test_expect_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_row_values_to_have_recent_data(model, column_name, datepart, interval, row_condition) %}\n{%- set default_start_date = '1970-01-01' -%}\nwith max_recency as (\n\n select max(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})) as max_timestamp\n from\n {{ model }}\n where\n cast({{ column_name }} as {{ dbt_utils.type_timestamp() }}) <= {{ dbt_date.now() }}\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('{{ default_start_date }}' as {{ dbt_utils.type_timestamp() }}))\n <\n cast({{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }} as {{ dbt_utils.type_timestamp() }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_date.now", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.138855}, "macro.dbt_expectations.test_expect_table_columns_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "name": "test_expect_table_columns_to_contain_set", "macro_sql": "{%- test expect_table_columns_to_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n input_columns i\n left join\n relation_columns r on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n r.relation_column is null\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.140012}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "name": "test_expect_table_row_count_to_equal_other_table", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table(model, compare_model, factor=1, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_equal_expression(model, \"count(*)\",\n compare_model=compare_model,\n compare_expression=\"count(*) * \" + factor|string,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.140448}, "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "name": "test_expect_table_columns_to_not_contain_set", "macro_sql": "{%- test expect_table_columns_to_not_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n -- catch any column in input list that is in the list of table columns\n select *\n from\n input_columns i\n inner join\n relation_columns r on r.relation_column = i.input_column\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.141572}, "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% test expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_grouped_row_values_to_have_recent_data', 'dbt_expectations') (model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1432478}, "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "default__test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) %}\nwith latest_grouped_timestamps as (\n\n select\n {%- for g in group_by %}\n {{ g }},\n {%- endfor %}\n max(1) as join_key,\n max({{ timestamp_column }}) as latest_timestamp_column\n from\n {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {{ dbt_utils.group_by(group_by | length )}}\n\n),\ntotal_row_counts as (\n\n select\n max(1) as join_key,\n count(*) as row_count\n from\n latest_grouped_timestamps\n\n),\noutdated_grouped_timestamps as (\n\n select *\n from\n latest_grouped_timestamps\n where\n latest_timestamp_column < {{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }}\n\n),\nvalidation_errors as (\n\n select\n r.row_count,\n t.*\n from\n total_row_counts r\n left join\n outdated_grouped_timestamps t\n on r.join_key = t.join_key\n where\n -- fail if either no rows were returned due to row_condition,\n -- or the recency test returned failed rows\n r.row_count = 0\n or\n t.join_key is not null\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.group_by", "macro.dbt_utils.dateadd", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.143767}, "macro.dbt_expectations.test_expect_column_to_exist": {"unique_id": "macro.dbt_expectations.test_expect_column_to_exist", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "original_file_path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "name": "test_expect_column_to_exist", "macro_sql": "{%- test expect_column_to_exist(model, column_name, column_index=None, transform=\"upper\") -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | map(transform) | join -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n\n {%- set matching_column_index = relation_column_names.index(column_name) if column_name in relation_column_names else -1 %}\n\n {%- if column_index -%}\n\n {%- set column_index_0 = column_index - 1 if column_index > 0 else 0 -%}\n\n {%- set column_index_matches = true if matching_column_index == column_index_0 else false %}\n\n {%- else -%}\n\n {%- set column_index_matches = true -%}\n\n {%- endif %}\n\n with test_data as (\n\n select\n cast('{{ column_name }}' as {{ dbt_utils.type_string() }}) as column_name,\n {{ matching_column_index }} as matching_column_index,\n {{ column_index_matches }} as column_index_matches\n\n )\n select *\n from test_data\n where\n not(matching_column_index >= 0 and column_index_matches)\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.144934}, "macro.dbt_expectations.test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "test_expect_table_row_count_to_equal", "macro_sql": "{%- test expect_table_row_count_to_equal(model,\n value,\n group_by=None,\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_table_row_count_to_equal',\n 'dbt_expectations') (model,\n value,\n group_by,\n row_condition\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_table_row_count_to_equal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1459048}, "macro.dbt_expectations.default__test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.default__test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "default__test_expect_table_row_count_to_equal", "macro_sql": "\n\n\n\n{%- macro default__test_expect_table_row_count_to_equal(model,\n value,\n group_by,\n row_condition\n ) -%}\n{% set expression %}\ncount(*) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.146181}, "macro.dbt_expectations.test_expect_table_row_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "name": "test_expect_table_row_count_to_be_between", "macro_sql": "{%- test expect_table_row_count_to_be_between(model,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n{% set expression %}\ncount(*)\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.146903}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "name": "test_expect_table_row_count_to_equal_other_table_times_factor", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table_times_factor(model, compare_model, factor, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_expect_table_row_count_to_equal_other_table(model, compare_model,\n factor=factor,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.147264}, "macro.dbt_expectations.test_expect_table_columns_to_match_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "name": "test_expect_table_columns_to_match_set", "macro_sql": "{%- test expect_table_columns_to_match_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n -- or any table column that is not in the input list\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.148511}, "macro.dbt_expectations._get_column_list": {"unique_id": "macro.dbt_expectations._get_column_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_get_column_list.sql", "original_file_path": "macros/schema_tests/table_shape/_get_column_list.sql", "name": "_get_column_list", "macro_sql": "{%- macro _get_column_list(model, transform=\"upper\") -%}\n{%- set relation_columns = adapter.get_columns_in_relation(model) -%}\n{%- set relation_column_names = relation_columns | map(attribute=\"name\") | map(transform) | list -%}\n{%- do return(relation_column_names) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1489348}, "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "name": "test_expect_table_columns_to_match_ordered_list", "macro_sql": "{%- test expect_table_columns_to_match_ordered_list(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select\n {{ loop.index }} as relation_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select\n {{ loop.index }} as input_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column and r.relation_column_idx = i.input_column_idx\n where\n -- catch any column in input list that is not in the sequence of table columns\n -- or any table column that is not in the input sequence\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1502929}, "macro.dbt_expectations._list_intersect": {"unique_id": "macro.dbt_expectations._list_intersect", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_list_intersect.sql", "original_file_path": "macros/schema_tests/table_shape/_list_intersect.sql", "name": "_list_intersect", "macro_sql": "{%- macro _list_intersect(list1, list2) -%}\n{%- set matching_items = [] -%}\n{%- for itm in list1 -%}\n {%- if itm in list2 -%}\n {%- do matching_items.append(itm) -%}\n {%- endif -%}\n{%- endfor -%}\n{%- do return(matching_items) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1507452}, "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "name": "test_expect_table_column_count_to_equal_other_table", "macro_sql": "{%- test expect_table_column_count_to_equal_other_table(model, compare_model) -%}\n{%- if execute -%}\n{%- set number_columns = (adapter.get_columns_in_relation(model) | length) -%}\n{%- set compare_number_columns = (adapter.get_columns_in_relation(compare_model) | length) -%}\nwith test_data as (\n\n select\n {{ number_columns }} as number_columns,\n {{ compare_number_columns }} as compare_number_columns\n\n)\nselect *\nfrom test_data\nwhere\n number_columns != compare_number_columns\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.151256}, "macro.dbt_expectations.test_expect_table_column_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "name": "test_expect_table_column_count_to_equal", "macro_sql": "{%- test expect_table_column_count_to_equal(model, value) -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ value }} as value\n\n)\nselect *\nfrom test_data\nwhere\n number_actual_columns != value\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.15166}, "macro.dbt_expectations.test_expect_table_column_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "name": "test_expect_table_column_count_to_be_between", "macro_sql": "{%- test expect_table_column_count_to_be_between(model,\n min_value=None,\n max_value=None\n ) -%}\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\n\n{%- set expression %}\n( 1=1\n{%- if min_value %} and number_actual_columns >= min_value{% endif %}\n{%- if max_value %} and number_actual_columns <= max_value{% endif %}\n)\n{% endset -%}\n\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ min_value if min_value else 0 }} as min_value,\n {{ max_value if max_value else 0 }} as max_value\n\n)\nselect *\nfrom test_data\nwhere\n not {{ expression }}\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.152632}, "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "name": "test_expect_column_values_to_not_be_in_set", "macro_sql": "{% test expect_column_values_to_not_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that match the set\n select\n v.value_field\n from\n all_values v\n join\n set_values s on v.value_field = s.value_field\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.153517}, "macro.dbt_expectations.test_expect_column_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "name": "test_expect_column_values_to_be_in_set", "macro_sql": "{% test expect_column_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.15441}, "macro.dbt_expectations.test_expect_column_values_to_be_increasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_increasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "name": "test_expect_column_values_to_be_increasing", "macro_sql": "{% test expect_column_values_to_be_increasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \">\" if strictly else \">=\" -%}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.155734}, "macro.dbt_expectations.test_expect_column_values_to_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "name": "test_expect_column_values_to_be_null", "macro_sql": "{% test expect_column_values_to_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.15622}, "macro.dbt_expectations.test_expect_column_values_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "name": "test_expect_column_values_to_be_unique", "macro_sql": "{% test expect_column_values_to_be_unique(model, column_name, row_condition=None) %}\n{{ dbt_expectations.test_expect_compound_columns_to_be_unique(model, [column_name], row_condition=row_condition) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_compound_columns_to_be_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.156522}, "macro.dbt_expectations.test_expect_column_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "name": "test_expect_column_values_to_be_between", "macro_sql": "{% test expect_column_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ column_name }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1572921}, "macro.dbt_expectations.test_expect_column_values_to_be_decreasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_decreasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "name": "test_expect_column_values_to_be_decreasing", "macro_sql": "{% test expect_column_values_to_be_decreasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \"<\" if strictly else \"<=\" %}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.158452}, "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "name": "test_expect_column_values_to_be_in_type_list", "macro_sql": "{%- test expect_column_values_to_be_in_type_list(model, column_name, column_type_list) -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | upper -%}\n {%- set columns_in_relation = adapter.get_columns_in_relation(model) -%}\n {%- set column_type_list = column_type_list| map(\"upper\") | list -%}\n with relation_columns as (\n\n {% for column in columns_in_relation %}\n select\n cast('{{ column.name | upper }}' as {{ dbt_utils.type_string() }}) as relation_column,\n cast('{{ column.dtype | upper }}' as {{ dbt_utils.type_string() }}) as relation_column_type\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '{{ column_name }}'\n and\n relation_column_type not in ('{{ column_type_list | join(\"', '\") }}')\n\n )\n select *\n from test_data\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.159504}, "macro.dbt_expectations.test_expect_column_values_to_be_of_type": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_of_type", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "name": "test_expect_column_values_to_be_of_type", "macro_sql": "{%- test expect_column_values_to_be_of_type(model, column_name, column_type) -%}\n{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(model, column_name, [column_type]) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.159782}, "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "name": "test_expect_column_values_to_have_consistent_casing", "macro_sql": "{% test expect_column_values_to_have_consistent_casing(model, column_name, display_inconsistent_columns=False) %}\n\nwith test_data as (\n\n select\n distinct {{ column_name }} as distinct_values\n from\n {{ model }}\n\n ),\n {% if display_inconsistent_columns %}\n validation_errors as (\n\n select\n lower(distinct_values) as inconsistent_columns,\n count(distinct_values) as set_count_case_insensitive\n from\n test_data\n group by 1\n having\n count(distinct_values) > 1\n\n )\n select * from validation_errors\n {% else %}\n validation_errors as (\n\n select\n count(1) as set_count,\n count(distinct lower(distinct_values)) as set_count_case_insensitive\n from\n test_data\n\n )\n select *\n from\n validation_errors\n where\n set_count != set_count_case_insensitive\n {% endif %}\n {%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.160222}, "macro.dbt_expectations.test_expect_column_values_to_not_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "name": "test_expect_column_values_to_not_be_null", "macro_sql": "{% test expect_column_values_to_not_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is not null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.160701}, "macro.dbt_expectations.test_expect_column_min_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_min_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "name": "test_expect_column_min_to_be_between", "macro_sql": "{% test expect_column_min_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmin({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.16155}, "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "name": "test_expect_column_unique_value_count_to_be_between", "macro_sql": "{% test expect_column_unique_value_count_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.162355}, "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "name": "test_expect_column_quantile_values_to_be_between", "macro_sql": "{% test expect_column_quantile_values_to_be_between(model, column_name,\n quantile,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.percentile_cont(column_name, quantile) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.163218}, "macro.dbt_expectations.test_expect_column_median_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_median_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "name": "test_expect_column_median_to_be_between", "macro_sql": "{% test expect_column_median_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.median(column_name) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.median", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1640372}, "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "name": "test_expect_column_proportion_of_unique_values_to_be_between", "macro_sql": "{% test expect_column_proportion_of_unique_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})/count({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.164899}, "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "name": "test_expect_column_distinct_values_to_equal_set", "macro_sql": "{% test expect_column_distinct_values_to_equal_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as column_value\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n all_values v\n full outer join\n unique_set_values s on v.column_value = s.value_field\n where\n v.column_value is null or\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.165774}, "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% test expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values=False,\n data_type=\"decimal\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_column_most_common_value_to_be_in_set', 'dbt_expectations') (model, column_name, value_set, top_n, quote_values, data_type, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.16733}, "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "default__test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% macro default__test_expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values,\n data_type,\n row_condition\n ) %}\n\nwith value_counts as (\n\n select\n {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %} as value_field,\n count(*) as value_count\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n group by {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %}\n\n),\nvalue_counts_ranked as (\n\n select\n *,\n row_number() over(order by value_count desc) as value_count_rank\n from\n value_counts\n\n),\nvalue_count_top_n as (\n\n select\n value_field\n from\n value_counts_ranked\n where\n value_count_rank = {{ top_n }}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n cast({{ value }} as {{ data_type }})\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n value_field\n from\n value_count_top_n\n where\n value_field not in (select value_field from unique_set_values)\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.168063}, "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "name": "test_expect_column_distinct_values_to_contain_set", "macro_sql": "{% test expect_column_distinct_values_to_contain_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values in set that are not in the list of values from the model\n select\n s.value_field\n from\n unique_set_values s\n left join\n all_values v on s.value_field = v.value_field\n where\n v.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.168962}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "name": "test_expect_column_distinct_count_to_equal", "macro_sql": "{% test expect_column_distinct_count_to_equal(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.169618}, "macro.dbt_expectations.test_expect_column_sum_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_sum_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "name": "test_expect_column_sum_to_be_between", "macro_sql": "{% test expect_column_sum_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nsum({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1704059}, "macro.dbt_expectations.test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "test_expect_column_stdev_to_be_between", "macro_sql": "{% test expect_column_stdev_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n {{ adapter.dispatch('test_expect_column_stdev_to_be_between', 'dbt_expectations') (\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_stdev_to_be_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.171711}, "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "default__test_expect_column_stdev_to_be_between", "macro_sql": "{% macro default__test_expect_column_stdev_to_be_between(\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) %}\n\n{% set expression %}\nstddev({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.172082}, "macro.dbt_expectations.test_expect_column_mean_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_mean_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "name": "test_expect_column_mean_to_be_between", "macro_sql": "{% test expect_column_mean_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\navg({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.172878}, "macro.dbt_expectations.test_expect_column_max_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_max_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "name": "test_expect_column_max_to_be_between", "macro_sql": "{% test expect_column_max_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmax({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.173663}, "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "name": "test_expect_column_distinct_count_to_be_greater_than", "macro_sql": "{% test expect_column_distinct_count_to_be_greater_than(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) > {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.174335}, "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "name": "test_expect_column_distinct_values_to_be_in_set", "macro_sql": "{% test expect_column_distinct_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=False,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n unique_set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1752121}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "name": "test_expect_column_distinct_count_to_equal_other_table", "macro_sql": "{% test expect_column_distinct_count_to_equal_other_table(model,\n compare_model,\n column_name,\n compare_column_name,\n row_condition=None,\n compare_row_condition=None\n ) %}\n{%- set expression -%}\ncount(distinct {{ column_name }})\n{%- endset -%}\n{%- set compare_expression -%}\n{%- if compare_column_name -%}\ncount(distinct {{ compare_column_name }})\n{%- else -%}\n{{ expression }}\n{%- endif -%}\n{%- endset -%}\n{{ dbt_expectations.test_equal_expression(\n model,\n expression=expression,\n compare_model=compare_model,\n compare_expression=compare_expression,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.17597}, "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "original_file_path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "name": "test_expect_row_values_to_have_data_for_every_n_datepart", "macro_sql": "{%- test expect_row_values_to_have_data_for_every_n_datepart(model,\n date_col,\n date_part=\"day\",\n interval=None,\n row_condition=None,\n exclusion_condition=None,\n test_start_date=None,\n test_end_date=None) -%}\n{% if not execute %}\n {{ return('') }}\n{% endif %}\n\n{% if not test_start_date or not test_end_date %}\n {% set sql %}\n\n select\n min({{ date_col }}) as start_{{ date_part }},\n max({{ date_col }}) as end_{{ date_part }}\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {% endset %}\n\n {%- set dr = run_query(sql) -%}\n {%- set db_start_date = dr.columns[0].values()[0].strftime('%Y-%m-%d') -%}\n {%- set db_end_date = dr.columns[1].values()[0].strftime('%Y-%m-%d') -%}\n\n{% endif %}\n\n{% if not test_start_date %}\n{% set start_date = db_start_date %}\n{% else %}\n{% set start_date = test_start_date %}\n{% endif %}\n\n\n{% if not test_end_date %}\n{% set end_date = db_end_date %}\n{% else %}\n{% set end_date = test_end_date %}\n{% endif %}\nwith base_dates as (\n\n {{ dbt_date.get_base_dates(start_date=start_date, end_date=end_date, datepart=date_part) }}\n {% if interval %}\n {# \n Filter the date spine created above down to the interval granularity using a modulo operation.\n The number of date_parts after the start_date divided by the integer interval will produce no remainder for the desired intervals, \n e.g. for 2-day interval from a starting Jan 1, 2020:\n params: start_date = '2020-01-01', date_part = 'day', interval = 2\n date spine created above: [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-04, 2020-01-05, ...]\n The first parameter to the `mod` function would be the number of days between the start_date and the spine date, i.e. [0, 1, 2, 3, 4 ...]\n The second parameter to the `mod` function would be the integer interval, i.e. 2\n This modulo operation produces the following remainders: [0, 1, 0, 1, 0, ...]\n Filtering the spine only where this remainder == 0 will return a spine with every other day as desired, i.e. [2020-01-01, 2020-01-03, 2020-01-05, ...]\n #}\n where mod(\n cast({{ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", 'date_' ~ date_part, date_part) }} as {{ dbt_utils.type_int() }}),\n cast({{interval}} as {{ dbt_utils.type_int() }})\n ) = 0\n {% endif %}\n\n),\nmodel_data as (\n\n select\n {% if not interval %}\n\n cast({{ dbt_utils.date_trunc(date_part, date_col) }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n\n {% else %}\n {# \n Use a modulo operator to determine the number of intervals that a date_col is away from the interval-date spine \n and subtracts that amount to effectively slice each date_col record into its corresponding spine bucket,\n e.g. given a date_col of with records [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-11, 2020-01-12]\n if we want to slice these dates into their 2-day buckets starting Jan 1, 2020 (start_date = '2020-01-01', date_part='day', interval=2),\n the modulo operation described above will produce these remainders: [0, 1, 0, 0, 1]\n subtracting that number of days from the observations will produce records [2020-01-01, 2020-01-01, 2020-01-03, 2020-01-11, 2020-01-11],\n all of which align with records from the interval-date spine\n #}\n {{dbt_utils.dateadd(\n date_part, \n \"mod(\n cast(\" ~ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", date_col, date_part) ~ \" as \" ~ dbt_utils.type_int() ~ \" ),\n cast(\" ~ interval ~ \" as \" ~ dbt_utils.type_int() ~ \" )\n ) * (-1)\", \n \"cast( \" ~ dbt_utils.date_trunc(date_part, date_col) ~ \" as \" ~ dbt_expectations.type_datetime() ~ \")\"\n )}} as date_{{ date_part }},\n \n {% endif %}\n \n count(*) as row_cnt\n from\n {{ model }} f\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n group by\n date_{{date_part}}\n\n),\n\nfinal as (\n\n select\n cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n case when f.date_{{ date_part }} is null then true else false end as is_missing,\n coalesce(f.row_cnt, 0) as row_cnt\n from\n base_dates d\n left join\n model_data f on cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) = f.date_{{ date_part }}\n)\nselect\n *\nfrom final\nwhere row_cnt = 0\n{% if exclusion_condition %}\n and {{ exclusion_condition }}\n{% endif %}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt_date.get_base_dates", "macro.dbt_utils.datediff", "macro.dbt_utils.type_int", "macro.dbt_utils.date_trunc", "macro.dbt_expectations.type_datetime", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.179779}, "macro.dbt_expectations._get_metric_expression": {"unique_id": "macro.dbt_expectations._get_metric_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "_get_metric_expression", "macro_sql": "{%- macro _get_metric_expression(metric_column, take_logs) -%}\n\n{%- if take_logs %}\n{%- set expr = \"nullif(\" ~ metric_column ~ \", 0)\" -%}\ncoalesce({{ dbt_expectations.log_natural(expr) }}, 0)\n{%- else -%}\ncoalesce({{ metric_column }}, 0)\n{%- endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.183008}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period='day',\n lookback_periods=1,\n trend_periods=7,\n test_periods=14,\n sigma_threshold=3,\n sigma_threshold_upper=None,\n sigma_threshold_lower=None,\n take_diffs=true,\n take_logs=true\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_moving_stdevs', 'dbt_expectations') (model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1835158}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) %}\n\n{%- set sigma_threshold_upper = sigma_threshold_upper if sigma_threshold_upper else sigma_threshold -%}\n{%- set sigma_threshold_lower = sigma_threshold_lower if sigma_threshold_lower else -1 * sigma_threshold -%}\n\nwith metric_values as (\n\n with grouped_metric_values as (\n\n select\n {{ dbt_utils.date_trunc(period, date_column_name) }} as metric_period,\n sum({{ column_name }}) as agg_metric_value\n from\n {{ model }}\n group by\n 1\n\n ),\n {%- if take_diffs %}\n grouped_metric_values_with_priors as (\n\n select\n *,\n lag(agg_metric_value, {{ lookback_periods }}) over(order by metric_period) as prior_agg_metric_value\n from\n grouped_metric_values d\n\n )\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n -\n {{ dbt_expectations._get_metric_expression(\"prior_agg_metric_value\", take_logs) }}\n as metric_test_value\n from\n grouped_metric_values_with_priors d\n\n {%- else %}\n\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n from\n grouped_metric_values\n\n {%- endif %}\n\n),\nmetric_moving_calcs as (\n\n select\n *,\n avg(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_average,\n stddev(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_stddev\n from\n metric_values\n\n),\nmetric_sigma as (\n\n select\n *,\n (metric_test_value - metric_test_rolling_average) as metric_test_delta,\n (metric_test_value - metric_test_rolling_average)/nullif(metric_test_rolling_stddev, 0) as metric_test_sigma\n from\n metric_moving_calcs\n\n)\nselect\n *\nfrom\n metric_sigma\nwhere\n\n metric_period >= cast(\n {{ dbt_utils.dateadd(period, -test_periods, dbt_utils.date_trunc(period, dbt_date.now())) }}\n as {{ dbt_utils.type_timestamp() }})\n and\n metric_period < {{ dbt_utils.date_trunc(period, dbt_date.now()) }}\n and\n\n not (\n metric_test_sigma >= {{ sigma_threshold_lower }} and\n metric_test_sigma <= {{ sigma_threshold_upper }}\n )\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_expectations._get_metric_expression", "macro.dbt_utils.dateadd", "macro.dbt_date.now", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.184599}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by=None,\n sigma_threshold=3\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_stdevs', 'dbt_expectations') (model, column_name, group_by, sigma_threshold) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.185523}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by,\n sigma_threshold\n ) %}\nwith metric_values as (\n\n {% if group_by -%}\n select\n {{ group_by }} as metric_date,\n sum({{ column_name }}) as {{ column_name }}\n from\n {{ model }}\n group by\n 1\n {%- else -%}\n select\n {{ column_name }} as {{ column_name }}\n from\n {{ model }}\n {%- endif %}\n\n),\nmetric_values_with_statistics as (\n\n select\n *,\n avg({{ column_name }}) over() as {{ column_name }}_average,\n stddev({{ column_name }}) over() as {{ column_name }}_stddev\n from\n metric_values\n\n),\nmetric_values_z_scores as (\n\n select\n *,\n ({{ column_name }} - {{ column_name }}_average)/{{ column_name }}_stddev as {{ column_name }}_sigma\n from\n metric_values_with_statistics\n\n)\nselect\n *\nfrom\n metric_values_z_scores\nwhere\n abs({{ column_name }}_sigma) > {{ sigma_threshold }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.186029}, "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% test expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_select_column_values_to_be_unique_within_record', 'dbt_expectations') (model, column_list, quote_columns, ignore_row_if, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1877382}, "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "default__test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% macro default__test_expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns,\n ignore_row_if,\n row_condition\n ) %}\n\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\nwith column_values as (\n\n select\n row_number() over(order by 1) as row_index,\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where 1=1\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n {% if ignore_row_if == \"all_values_are_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {%- endfor %}\n )\n {% elif ignore_row_if == \"any_value_is_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {%- endfor %}\n )\n {% endif %}\n\n),\nunpivot_columns as (\n\n {% for column in columns %}\n select row_index, '{{ column }}' as column_name, {{ column }} as column_value from column_values\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n\n select\n row_index,\n count(distinct column_value) as column_values\n from unpivot_columns\n group by 1\n having count(distinct column_value) < {{ columns | length }}\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.189006}, "macro.dbt_expectations.test_expect_compound_columns_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_compound_columns_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "original_file_path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "name": "test_expect_compound_columns_to_be_unique", "macro_sql": "{% test expect_compound_columns_to_be_unique(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) %}\n{% if not column_list %}\n {{ exceptions.raise_compiler_error(\n \"`column_list` must be specified as a list of columns. Got: '\" ~ column_list ~\"'.'\"\n ) }}\n{% endif %}\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for expect_compound_columns_to_be_unique test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set row_condition_ext -%}\n\n{%- if row_condition %}\n {{ row_condition }} and\n{% endif -%}\n\n{%- if ignore_row_if == \"all_values_are_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {% endfor %}\n )\n{%- elif ignore_row_if == \"any_value_is_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {% endfor %}\n )\n{%- endif -%}\n{%- endset -%}\n\nwith validation_errors as (\n\n select\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where\n 1=1\n {%- if row_condition_ext %}\n and {{ row_condition_ext }}\n {% endif %}\n group by\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n having count(*) > 1\n\n)\nselect * from validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.191637}, "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "name": "test_expect_multicolumn_sum_to_equal", "macro_sql": "{% test expect_multicolumn_sum_to_equal(model,\n column_list,\n sum_total,\n group_by=None,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for column in column_list %}\nsum({{ column }}){% if not loop.last %} + {% endif %}\n{% endfor %} = {{ sum_total }}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.19254}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "name": "test_expect_column_pair_values_to_be_equal", "macro_sql": "{% test expect_column_pair_values_to_be_equal(model,\n column_A,\n column_B,\n row_condition=None\n ) %}\n\n{% set operator = \"=\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.1931698}, "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "name": "test_expect_column_pair_values_A_to_be_greater_than_B", "macro_sql": "{% test expect_column_pair_values_A_to_be_greater_than_B(model,\n column_A,\n column_B,\n or_equal=False,\n row_condition=None\n ) %}\n\n{% set operator = \">=\" if or_equal else \">\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.193867}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "name": "test_expect_column_pair_values_to_be_in_set", "macro_sql": "{% test expect_column_pair_values_to_be_in_set(model,\n column_A,\n column_B,\n value_pairs_set,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for pair in value_pairs_set %}\n{%- if (pair | length) == 2 %}\n({{ column_A }} = {{ pair[0] }} and {{ column_B }} = {{ pair[1] }}){% if not loop.last %} or {% endif %}\n{% else %}\n{{ exceptions.raise_compiler_error(\n \"`value_pairs_set` argument for expect_column_pair_values_to_be_in_set test cannot have more than 2 item per element.\n Got: '\" ~ pair ~ \"'.'\"\n ) }}\n{% endif %}\n{% endfor %}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1652815140.195217}}, "docs": {"flow_models.tx_count": {"unique_id": "flow_models.tx_count", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_count.md", "original_file_path": "models/descriptions/tx_count.md", "name": "tx_count", "block_contents": "The number of transactions in the block."}, "flow_models.count_authorizers": {"unique_id": "flow_models.count_authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/count_authorizers.md", "original_file_path": "models/descriptions/count_authorizers.md", "name": "count_authorizers", "block_contents": "Number of authorizers"}, "flow_models.tx_id": {"unique_id": "flow_models.tx_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_id.md", "original_file_path": "models/descriptions/tx_id.md", "name": "tx_id", "block_contents": "ID for the transaction."}, "flow_models.event_index": {"unique_id": "flow_models.event_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_index.md", "original_file_path": "models/descriptions/event_index.md", "name": "event_index", "block_contents": "The index of the event within the transaction, i.e. in what order the events occurred."}, "flow_models.network": {"unique_id": "flow_models.network", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/network.md", "original_file_path": "models/descriptions/network.md", "name": "network", "block_contents": "The blockchain network the block or transaction occurred on."}, "flow_models.proposer": {"unique_id": "flow_models.proposer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/proposer.md", "original_file_path": "models/descriptions/proposer.md", "name": "proposer", "block_contents": "Address of the transaction proposer."}, "flow_models.tx_succeeded": {"unique_id": "flow_models.tx_succeeded", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_succeeded.md", "original_file_path": "models/descriptions/tx_succeeded.md", "name": "tx_succeeded", "block_contents": "Transaction status, if it succeeded or failed."}, "flow_models.gas_limit": {"unique_id": "flow_models.gas_limit", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/gas_limit.md", "original_file_path": "models/descriptions/gas_limit.md", "name": "gas_limit", "block_contents": "Upper gas limit attached to the transaction."}, "flow_models.attribute_key": {"unique_id": "flow_models.attribute_key", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_key.md", "original_file_path": "models/descriptions/attribute_key.md", "name": "attribute_key", "block_contents": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "flow_models.attribute_value": {"unique_id": "flow_models.attribute_value", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value.md", "original_file_path": "models/descriptions/attribute_value.md", "name": "attribute_value", "block_contents": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "flow_models._ingested_at": {"unique_id": "flow_models._ingested_at", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_ingested_at.md", "original_file_path": "models/descriptions/_ingested_at.md", "name": "_ingested_at", "block_contents": "When the record was ingested by the chainwalker."}, "flow_models.event_data": {"unique_id": "flow_models.event_data", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_data.md", "original_file_path": "models/descriptions/event_data.md", "name": "event_data", "block_contents": "The raw event data from the event."}, "flow_models.payer": {"unique_id": "flow_models.payer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/payer.md", "original_file_path": "models/descriptions/payer.md", "name": "payer", "block_contents": "Address of the wallet paying for the transaction."}, "flow_models.decoded_address": {"unique_id": "flow_models.decoded_address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/decoded_address.md", "original_file_path": "models/descriptions/decoded_address.md", "name": "decoded_address", "block_contents": "The decoded address, if applicable, for the attribute_value."}, "flow_models.attribute_id": {"unique_id": "flow_models.attribute_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_id.md", "original_file_path": "models/descriptions/attribute_id.md", "name": "attribute_id", "block_contents": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "flow_models.id": {"unique_id": "flow_models.id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/id.md", "original_file_path": "models/descriptions/id.md", "name": "id", "block_contents": "The block hash."}, "flow_models._event_data_type": {"unique_id": "flow_models._event_data_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_type.md", "original_file_path": "models/descriptions/_event_data_type.md", "name": "_event_data_type", "block_contents": "The type object from event_data."}, "flow_models.attribute_index": {"unique_id": "flow_models.attribute_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_index.md", "original_file_path": "models/descriptions/attribute_index.md", "name": "attribute_index", "block_contents": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "flow_models._event_data_fields": {"unique_id": "flow_models._event_data_fields", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_fields.md", "original_file_path": "models/descriptions/_event_data_fields.md", "name": "_event_data_fields", "block_contents": "The fields object from the event_data."}, "flow_models.attribute_value_adj": {"unique_id": "flow_models.attribute_value_adj", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value_adj.md", "original_file_path": "models/descriptions/attribute_value_adj.md", "name": "attribute_value_adj", "block_contents": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "flow_models.block_height": {"unique_id": "flow_models.block_height", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_height.md", "original_file_path": "models/descriptions/block_height.md", "name": "block_height", "block_contents": "The block height the block was recorded at."}, "flow_models.event_id": {"unique_id": "flow_models.event_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_id.md", "original_file_path": "models/descriptions/event_id.md", "name": "event_id", "block_contents": "The id for the event, which is a concatenation of tx_id-event_index."}, "flow_models.transaction_result": {"unique_id": "flow_models.transaction_result", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/transaction_result.md", "original_file_path": "models/descriptions/transaction_result.md", "name": "transaction_result", "block_contents": "Outcome of the transaction, including events that were called."}, "flow_models.authorizers": {"unique_id": "flow_models.authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/authorizers.md", "original_file_path": "models/descriptions/authorizers.md", "name": "authorizers", "block_contents": "Address(es) authorizing the transaction."}, "flow_models.event_type": {"unique_id": "flow_models.event_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_type.md", "original_file_path": "models/descriptions/event_type.md", "name": "event_type", "block_contents": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "flow_models.parent_id": {"unique_id": "flow_models.parent_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/parent_id.md", "original_file_path": "models/descriptions/parent_id.md", "name": "parent_id", "block_contents": "The block hash for the parent block."}, "flow_models.chain_id": {"unique_id": "flow_models.chain_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/chain_id.md", "original_file_path": "models/descriptions/chain_id.md", "name": "chain_id", "block_contents": "The id for the chain of the network on which this block occurred."}, "flow_models.block_timestamp": {"unique_id": "flow_models.block_timestamp", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_timestamp.md", "original_file_path": "models/descriptions/block_timestamp.md", "name": "block_timestamp", "block_contents": "The date and time for when the block was written."}, "dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "flow_models.label_type": {"unique_id": "flow_models.label_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/label_type.md", "original_file_path": "models/descriptions/label_type.md", "name": "label_type", "block_contents": "Predominant label categorization, such as CEX, Operator, NFT, etc."}, "flow_models.address_name": {"unique_id": "flow_models.address_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/address_name.md", "original_file_path": "models/descriptions/address_name.md", "name": "address_name", "block_contents": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator."}, "flow_models.project_name": {"unique_id": "flow_models.project_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/project_name.md", "original_file_path": "models/descriptions/project_name.md", "name": "project_name", "block_contents": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names)."}, "flow_models.blockchain": {"unique_id": "flow_models.blockchain", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/blockchain.md", "original_file_path": "models/descriptions/blockchain.md", "name": "blockchain", "block_contents": "The name of the blockchain for this address."}, "flow_models.creator": {"unique_id": "flow_models.creator", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/creator.md", "original_file_path": "models/descriptions/creator.md", "name": "creator", "block_contents": "The source of the labeling information for the address."}, "flow_models.label_subtype": {"unique_id": "flow_models.label_subtype", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/label_subtype.md", "original_file_path": "models/descriptions/label_subtype.md", "name": "label_subtype", "block_contents": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc."}, "flow_models.address": {"unique_id": "flow_models.address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/address.md", "original_file_path": "models/descriptions/address.md", "name": "address", "block_contents": "The on-chain address."}, "flow_models.event_attributes": {"unique_id": "flow_models.event_attributes", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_attributes.md", "original_file_path": "models/descriptions/event_attributes.md", "name": "event_attributes", "block_contents": "The data passed to the event, in the form of key-value pairs."}, "flow_models.contract_name": {"unique_id": "flow_models.contract_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/contract_name.md", "original_file_path": "models/descriptions/contract_name.md", "name": "contract_name", "block_contents": "The primary name of the contract, derived from the full contract address."}, "flow_models.event_contract": {"unique_id": "flow_models.event_contract", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_contract.md", "original_file_path": "models/descriptions/event_contract.md", "name": "event_contract", "block_contents": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "flow_models.account_address": {"unique_id": "flow_models.account_address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/account_address.md", "original_file_path": "models/descriptions/account_address.md", "name": "account_address", "block_contents": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a."}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"model.flow_models.bronze__blocks": ["source.flow_models.prod.flow_blocks"], "model.flow_models.bronze__transactions": ["source.flow_models.prod.flow_txs"], "model.flow_models.silver__transactions": ["model.flow_models.bronze__transactions"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": ["model.flow_models.silver__transactions"], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": ["model.flow_models.silver__transactions"], "model.flow_models.bronze__labels": ["source.flow_models.crosschain.address_labels"], "model.flow_models.gold__blocks": ["model.flow_models.silver__blocks"], "model.flow_models.core__fact_blocks": ["model.flow_models.gold__blocks"], "model.flow_models.silver__labels": ["model.flow_models.bronze__labels"], "model.flow_models.silver__blocks": ["model.flow_models.bronze__blocks"], "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": ["model.flow_models.gold__blocks"], "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_network.1290e522fb": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_id.6c4c044819": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": ["model.flow_models.core__fact_blocks"], "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_id.88f5737541": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": ["model.flow_models.silver__labels"], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": ["model.flow_models.silver__blocks"], "test.flow_models.unique_silver__blocks_block_height.478ce02832": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_id.b40d544128": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": ["model.flow_models.silver__blocks"], "model.flow_models.core__fact_transactions": ["model.flow_models.gold__transactions"], "model.flow_models.gold__transactions": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": ["model.flow_models.core__fact_transactions"], "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": ["model.flow_models.gold__transactions"], "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_payer.efa8662752": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": ["model.flow_models.gold__transactions"], "model.flow_models.core__fact_events": ["model.flow_models.gold__events"], "model.flow_models.gold__events": ["model.flow_models.silver__event_attributes", "model.flow_models.silver__events"], "model.flow_models.silver__event_attributes": ["model.flow_models.silver__events"], "model.flow_models.silver__events": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": ["model.flow_models.silver__events"], "test.flow_models.unique_silver__events_event_id.c34161972a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_height.7977589637": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_contract.d88483871a": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_type.db25419673": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": ["model.flow_models.silver__events"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": ["model.flow_models.silver__events"], "test.flow_models.not_null_gold__events_tx_id.95926804a2": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_index.b152284f0b": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_contract.7794754732": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": ["model.flow_models.gold__events"], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": ["model.flow_models.gold__events"], "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": ["model.flow_models.silver__event_attributes"], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": ["model.flow_models.silver__event_attributes"], "model.flow_models.silver__contract_labels": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": ["model.flow_models.silver__contract_labels"], "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": ["model.flow_models.silver__contract_labels"], "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": ["model.flow_models.silver__contract_labels"], "source.flow_models.prod.flow_blocks": [], "source.flow_models.prod.flow_txs": [], "source.flow_models.crosschain.address_labels": []}, "child_map": {"model.flow_models.bronze__blocks": ["model.flow_models.silver__blocks"], "model.flow_models.bronze__transactions": ["model.flow_models.silver__transactions"], "model.flow_models.silver__transactions": ["model.flow_models.gold__transactions", "model.flow_models.silver__events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": [], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": [], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": [], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": [], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": [], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": [], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": [], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": [], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": [], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": [], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": [], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": [], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": [], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": [], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": [], "model.flow_models.bronze__labels": ["model.flow_models.silver__labels"], "model.flow_models.gold__blocks": ["model.flow_models.core__fact_blocks", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8", "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313", "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967", "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4", "test.flow_models.not_null_gold__blocks_id.6c4c044819", "test.flow_models.not_null_gold__blocks_network.1290e522fb", "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02", "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f", "test.flow_models.unique_gold__blocks_block_height.7c3e159f31"], "model.flow_models.core__fact_blocks": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b", "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c", "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758", "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722", "test.flow_models.not_null_core__fact_blocks_id.88f5737541", "test.flow_models.not_null_core__fact_blocks_network.2708505a8a", "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8", "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174", "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d"], "model.flow_models.silver__labels": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7", "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f"], "model.flow_models.silver__blocks": ["model.flow_models.gold__blocks", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d", "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "test.flow_models.not_null_silver__blocks_id.b40d544128", "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "test.flow_models.unique_silver__blocks_block_height.478ce02832"], "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": [], "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": [], "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": [], "test.flow_models.not_null_gold__blocks_network.1290e522fb": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": [], "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": [], "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": [], "test.flow_models.not_null_gold__blocks_id.6c4c044819": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": [], "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": [], "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": [], "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": [], "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": [], "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": [], "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": [], "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": [], "test.flow_models.not_null_core__fact_blocks_id.88f5737541": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": [], "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": [], "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": [], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": [], "test.flow_models.unique_silver__blocks_block_height.478ce02832": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": [], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": [], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": [], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": [], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": [], "test.flow_models.not_null_silver__blocks_id.b40d544128": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": [], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": [], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": [], "model.flow_models.core__fact_transactions": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2", "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1", "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd", "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7", "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2", "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e", "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a", "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710", "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749", "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21", "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e", "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382", "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e", "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757", "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c", "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522"], "model.flow_models.gold__transactions": ["model.flow_models.core__fact_transactions", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185", "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8", "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073", "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906", "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d", "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd", "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2", "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d", "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd", "test.flow_models.not_null_gold__transactions_payer.efa8662752", "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134", "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f", "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14", "test.flow_models.not_null_gold__transactions_tx_index.78407db79c", "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49", "test.flow_models.unique_gold__transactions_tx_id.c038e1f494"], "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": [], "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": [], "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": [], "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": [], "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": [], "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": [], "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": [], "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": [], "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": [], "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": [], "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": [], "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": [], "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": [], "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": [], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": [], "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": [], "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": [], "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": [], "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": [], "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": [], "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": [], "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": [], "test.flow_models.not_null_gold__transactions_payer.efa8662752": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": [], "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": [], "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": [], "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": [], "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": [], "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": [], "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": [], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": [], "model.flow_models.core__fact_events": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0", "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0", "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c", "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4", "test.flow_models.not_null_core__fact_events_event_contract.10b5644238", "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3", "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae", "test.flow_models.not_null_core__fact_events_event_type.d865a2b006", "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe", "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade"], "model.flow_models.gold__events": ["model.flow_models.core__fact_events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326", "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5", "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc", "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120", "test.flow_models.not_null_gold__events_event_contract.7794754732", "test.flow_models.not_null_gold__events_event_data.c5e8d4c967", "test.flow_models.not_null_gold__events_event_index.b152284f0b", "test.flow_models.not_null_gold__events_event_type.f7e447ca7d", "test.flow_models.not_null_gold__events_tx_id.95926804a2", "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf"], "model.flow_models.silver__event_attributes": ["model.flow_models.gold__events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19"], "model.flow_models.silver__events": ["model.flow_models.gold__events", "model.flow_models.silver__contract_labels", "model.flow_models.silver__event_attributes", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "test.flow_models.not_null_silver__events__event_data_type.db25419673", "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "test.flow_models.not_null_silver__events_block_height.7977589637", "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "test.flow_models.not_null_silver__events_event_contract.d88483871a", "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "test.flow_models.unique_silver__events_event_id.c34161972a"], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": [], "test.flow_models.unique_silver__events_event_id.c34161972a": [], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": [], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": [], "test.flow_models.not_null_silver__events_block_height.7977589637": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": [], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": [], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": [], "test.flow_models.not_null_silver__events_event_contract.d88483871a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": [], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": [], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": [], "test.flow_models.not_null_silver__events__event_data_type.db25419673": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": [], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": [], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": [], "test.flow_models.not_null_gold__events_tx_id.95926804a2": [], "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": [], "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": [], "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": [], "test.flow_models.not_null_gold__events_event_index.b152284f0b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": [], "test.flow_models.not_null_gold__events_event_contract.7794754732": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": [], "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": [], "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": [], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": [], "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": [], "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": [], "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": [], "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": [], "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": [], "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": [], "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": [], "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": [], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": [], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": [], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": [], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": [], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": [], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": [], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": [], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": [], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": [], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": [], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": [], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": [], "model.flow_models.silver__contract_labels": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29", "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1", "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e", "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b"], "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": [], "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": [], "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": [], "source.flow_models.prod.flow_blocks": ["model.flow_models.bronze__blocks"], "source.flow_models.prod.flow_txs": ["model.flow_models.bronze__transactions"], "source.flow_models.crosschain.address_labels": ["model.flow_models.bronze__labels"]}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.4", "generated_at": "2022-05-19T23:23:23.281048Z", "invocation_id": "7b45de74-0efd-4e9c-97ce-d034039efa9b", "env": {}, "project_id": "208886b48445c6c994c154eb26fa0660", "user_id": "ae8c306c-329d-4e70-837c-2ce0da7e4f48", "send_anonymous_usage_stats": true, "adapter_type": "snowflake"}, "nodes": {"model.flow_models.core__fact_events": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH events AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__events') }}\n)\nSELECT\n *\nFROM\n events", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_events"], "unique_id": "model.flow_models.core__fact_events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_events.sql", "original_file_path": "models/core/core__fact_events.sql", "name": "core__fact_events", "alias": "fact_events", "checksum": {"name": "sha256", "checksum": "da012bfc41bac21ed8a298965ebad78d38d2463a95d0e8539b81988d74580078"}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The data passed to the event, in the form of key-value pairs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_events.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.792008, "compiled_sql": "\n\nWITH events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.events\n)\nSELECT\n *\nFROM\n events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_events"}, "model.flow_models.core__fact_transactions": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH txs AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__transactions') }}\n)\nSELECT\n *\nFROM\n txs", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_transactions"], "unique_id": "model.flow_models.core__fact_transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_transactions.sql", "original_file_path": "models/core/core__fact_transactions.sql", "name": "core__fact_transactions", "alias": "fact_transactions", "checksum": {"name": "sha256", "checksum": "20aae6feefac086e63605a4498361c839e7573d193f71eb45af54dc824212be5"}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_transactions.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.748311, "compiled_sql": "\n\nWITH txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.transactions\n)\nSELECT\n *\nFROM\n txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_transactions"}, "model.flow_models.core__fact_blocks": {"raw_sql": "{{ config(\n materialized = 'view'\n) }}\n\nWITH blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('gold__blocks') }}\n)\nSELECT\n *\nFROM\n blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "core", "fqn": ["flow_models", "core", "core__fact_blocks"], "unique_id": "model.flow_models.core__fact_blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "core/core__fact_blocks.sql", "original_file_path": "models/core/core__fact_blocks.sql", "name": "core__fact_blocks", "alias": "fact_blocks", "checksum": {"name": "sha256", "checksum": "0e8e2a67213be7faf95e877b27080f4e60fc70ac61dfd43365fd734b08a24c76"}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/core/core__fact_blocks.yml", "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.7071831, "compiled_sql": "\n\nWITH blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.gold.blocks\n)\nSELECT\n *\nFROM\n blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.core.fact_blocks"}, "model.flow_models.bronze__labels": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nWITH labels AS (\n\n SELECT\n system_created_at AS _system_created_at,\n insert_date AS _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n {{ source(\n 'crosschain',\n 'address_labels'\n ) }}\n WHERE\n blockchain = 'flow'\n)\nSELECT\n *\nFROM\n labels", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.crosschain.address_labels"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__labels"], "unique_id": "model.flow_models.bronze__labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__labels.sql", "original_file_path": "models/bronze/bronze__labels.sql", "name": "bronze__labels", "alias": "labels", "checksum": {"name": "sha256", "checksum": "192c5bf38039359e902b9d228347974b749826c81a300740397ab303f0dbfe68"}, "tags": [], "refs": [], "sources": [["crosschain", "address_labels"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.646967, "compiled_sql": "\n\nWITH labels AS (\n\n SELECT\n system_created_at AS _system_created_at,\n insert_date AS _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n flipside_prod_db.crosschain.address_labels\n WHERE\n blockchain = 'flow'\n)\nSELECT\n *\nFROM\n labels", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.labels"}, "model.flow_models.bronze__blocks": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n {{ source(\n 'prod',\n 'flow_blocks'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__blocks"], "unique_id": "model.flow_models.bronze__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__blocks.sql", "original_file_path": "models/bronze/bronze__blocks.sql", "name": "bronze__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "ee1b07ff3943e8c3050c73e465d67a27dea8fef911a949c333d12d3792f82cb5"}, "tags": [], "refs": [], "sources": [["prod", "flow_blocks"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.648032, "compiled_sql": "\n\nSELECT \n record_id, \n offset_id,\n block_id,\n block_timestamp, \n network, \n chain_id, \n tx_count, \n header, \n ingested_at as _ingested_at\nFROM \n chainwalkers.prod.flow_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.blocks"}, "model.flow_models.bronze__transactions": {"raw_sql": "{{ config (\n materialized = 'view'\n) }}\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n {{ source(\n 'prod',\n 'flow_txs'\n ) }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.flow_models.prod.flow_txs"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "bronze", "fqn": ["flow_models", "bronze", "bronze__transactions"], "unique_id": "model.flow_models.bronze__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "bronze/bronze__transactions.sql", "original_file_path": "models/bronze/bronze__transactions.sql", "name": "bronze__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "7df148fbc131022c3bb1ec5d7a28adbf721b689c32d8f16168e7275301d79e46"}, "tags": [], "refs": [], "sources": [["prod", "flow_txs"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/bronze/bronze__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "view"}, "created_at": 1653000028.649057, "compiled_sql": "\n\nSELECT\n\n record_id,\n tx_id,\n tx_block_index,\n offset_id,\n block_id,\n block_timestamp,\n network,\n chain_id,\n tx,\n ingested_at as _ingested_at\n\nFROM\n chainwalkers.prod.flow_txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.bronze.transactions"}, "model.flow_models.silver__events": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'event_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__events"], "unique_id": "model.flow_models.silver__events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__events.sql", "original_file_path": "models/silver/silver__events.sql", "name": "silver__events", "alias": "events", "checksum": {"name": "sha256", "checksum": "04893b154d5c479d4cf721799022500d7e1961a7c081563c9023bf71296aa294"}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The raw event data from the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_type": {"name": "_event_data_type", "description": "The type object from event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_event_data_fields": {"name": "_event_data_fields", "description": "The fields object from the event_data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__events.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "event_id", "incremental_strategy": "delete+insert"}, "created_at": 1653000028.853492, "compiled_sql": "\n\nWITH transactions AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n COALESCE(\n VALUE :event_index,\n VALUE :eventIndex\n ) :: NUMBER AS event_index,\n SPLIT(\n VALUE :type,\n '.'\n ) AS type_split,\n ARRAY_TO_STRING(ARRAY_SLICE(type_split, 0, ARRAY_SIZE(type_split) -1), '.') AS event_contract,\n type_split [array_size(type_split)-1] :: STRING AS event_type,\n VALUE :value :: variant AS event_data,\n COALESCE(\n VALUE :value :EventType,\n VALUE :value :eventType\n ) :: variant AS event_data_type,\n COALESCE(\n VALUE :value :Fields,\n VALUE :value :fields\n ) :: variant AS event_data_fields,\n concat_ws(\n '-',\n tx_id,\n event_index\n ) AS event_id,\n _ingested_at\n FROM\n transactions,\n LATERAL FLATTEN(\n input => transaction_result :events\n )\n),\nFINAL AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data,\n event_data_type AS _event_data_type,\n event_data_fields AS _event_data_fields,\n _ingested_at\n FROM\n events\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.events"}, "model.flow_models.silver__contract_labels": {"raw_sql": "{{ config(\n materialized = 'table',\n cluster_by = ['event_contract'],\n unique_key = 'event_contract'\n) }}\n\nWITH splt AS (\n\n SELECT\n event_contract,\n SPLIT(\n event_contract,\n '.'\n ) AS ec_s\n FROM\n {{ ref('silver__events') }}\n)\nSELECT\n DISTINCT event_contract,\n ec_s [array_size(ec_s)-1] :: STRING AS contract_name,\n CONCAT(\n '0x',\n ec_s [array_size(ec_s)-2] :: STRING\n ) AS account_address\nFROM\n splt\nWHERE\n ec_s [0] != 'flow'", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["event_contract"], "unique_key": "event_contract", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__contract_labels"], "unique_id": "model.flow_models.silver__contract_labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__contract_labels.sql", "original_file_path": "models/silver/silver__contract_labels.sql", "name": "silver__contract_labels", "alias": "contract_labels", "checksum": {"name": "sha256", "checksum": "7ec3528bf6a646c1183862c537d038f19b52f5913b870eca7d3fd3e262819721"}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "This table extracts all contract labels referenced in the events item of a Flow transaction.", "columns": {"event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "contract_name": {"name": "contract_name", "description": "The primary name of the contract, derived from the full contract address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_address": {"name": "account_address", "description": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__contract_labels.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "table", "cluster_by": ["event_contract"], "unique_key": "event_contract"}, "created_at": 1653000028.938003, "compiled_sql": "\n\nWITH splt AS (\n\n SELECT\n event_contract,\n SPLIT(\n event_contract,\n '.'\n ) AS ec_s\n FROM\n FLOW_DEV.silver.events\n)\nSELECT\n DISTINCT event_contract,\n ec_s [array_size(ec_s)-1] :: STRING AS contract_name,\n CONCAT(\n '0x',\n ec_s [array_size(ec_s)-2] :: STRING\n ) AS account_address\nFROM\n splt\nWHERE\n ec_s [0] != 'flow'", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.contract_labels"}, "model.flow_models.silver__event_attributes": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'attribute_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH events AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__events') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__event_attributes"], "unique_id": "model.flow_models.silver__event_attributes", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__event_attributes.sql", "original_file_path": "models/silver/silver__event_attributes.sql", "name": "silver__event_attributes", "alias": "event_attributes", "checksum": {"name": "sha256", "checksum": "65df59847b36268e4582cfc1dfff08e82477c59982eff2ff42c56d94453608b4"}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "This table cleans and transform attributes from each event in the events table.", "columns": {"attribute_id": {"name": "attribute_id", "description": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "The id for the event, which is a concatenation of tx_id-event_index.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_index": {"name": "attribute_index", "description": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_key": {"name": "attribute_key", "description": "The key of the attribute key-value pair. This is the label while attribute_value is the data.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "decoded_address": {"name": "decoded_address", "description": "The decoded address, if applicable, for the attribute_value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value": {"name": "attribute_value", "description": "The value of the attribute key-value pair. This is the data that attribute_key labels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "attribute_value_adj": {"name": "attribute_value_adj", "description": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__event_attributes.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "attribute_id", "incremental_strategy": "delete+insert"}, "created_at": 1653000028.951191, "compiled_sql": "\n\nWITH events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.events\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\nevents_data AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n _event_data_type,\n _event_data_fields,\n _ingested_at,\n COALESCE(\n _event_data_type :fields,\n _event_data_type :Fields\n ) AS event_data_type_fields\n FROM\n events\n),\nattributes AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n VALUE :identifier,\n VALUE :Identifier\n ) :: STRING AS attribute_key,\n COALESCE(\n _event_data_fields [index] :Value,\n _event_data_fields [index]\n ) AS attribute_value,\n concat_ws(\n '-',\n event_id,\n INDEX\n ) AS attribute_id,\n INDEX AS attribute_index,\n _ingested_at\n FROM\n events_data,\n LATERAL FLATTEN(\n input => event_data_type_fields\n )\n),\nhandle_address_arrays AS (\n SELECT\n attribute_id,\n b.index,\n LPAD(TRIM(to_char(b.value :: INT, 'XXXXXXX')) :: STRING, 2, '0') AS hex\n FROM\n attributes A,\n TABLE(FLATTEN(attribute_value, recursive => TRUE)) b\n WHERE\n IS_ARRAY(attribute_value) = TRUE\n ORDER BY\n 1,\n 2\n),\nrecombine_address AS (\n SELECT\n attribute_id,\n CONCAT(\n '0x',\n ARRAY_TO_STRING(ARRAY_AGG(hex) within GROUP (\n ORDER BY\n INDEX ASC), '')\n ) AS decoded_address\n FROM\n handle_address_arrays\n GROUP BY\n 1\n),\nreplace_arrays AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n attribute_value,\n decoded_address,\n COALESCE(\n decoded_address,\n attribute_value\n ) :: STRING AS attribute_value_adj,\n _ingested_at\n FROM\n attributes A\n LEFT JOIN recombine_address USING (attribute_id)\n),\naddress_adjustment AS (\n SELECT\n attribute_id,\n LENGTH(attribute_value_adj) AS ava_len,\n CONCAT(\n '0x',\n LPAD(SPLIT(attribute_value_adj, '0x') [1], 16, '0') :: STRING\n ) AS address_adj\n FROM\n replace_arrays\n WHERE\n attribute_value_adj LIKE '0x%'\n AND ava_len < 19\n),\nFINAL AS (\n SELECT\n A.attribute_id,\n event_id,\n tx_id,\n block_timestamp,\n event_index,\n attribute_index,\n event_contract,\n event_type,\n attribute_key,\n decoded_address,\n attribute_value,\n COALESCE(\n address_adj,\n attribute_value_adj\n ) AS attribute_value_adj,\n _ingested_at\n FROM\n replace_arrays A\n LEFT JOIN address_adjustment USING (attribute_id)\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.event_attributes"}, "model.flow_models.silver__labels": {"raw_sql": "{{ config(\n materialized = 'table',\n cluster_by = ['address'],\n unique_key = 'event_id',\n) }}\n\nWITH labels AS (\n\n SELECT\n _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n {{ ref('bronze__labels') }}\n)\nSELECT\n *\nFROM\n labels", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.flow_models.bronze__labels"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["address"], "unique_key": "event_id", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__labels"], "unique_id": "model.flow_models.silver__labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__labels.sql", "original_file_path": "models/silver/silver__labels.sql", "name": "silver__labels", "alias": "labels", "checksum": {"name": "sha256", "checksum": "87e2216956fbf38e7e29352b340eabc8bc7c89a627082ccb646ce8349464d757"}, "tags": [], "refs": [["bronze__labels"]], "sources": [], "description": "This table provides labels for addresses on the Flow blockchain.", "columns": {"_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "blockchain": {"name": "blockchain", "description": "The name of the blockchain for this address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address": {"name": "address", "description": "The on-chain address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "creator": {"name": "creator", "description": "The source of the labeling information for the address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "label_type": {"name": "label_type", "description": "Predominant label categorization, such as CEX, Operator, NFT, etc.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "label_subtype": {"name": "label_subtype", "description": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_name": {"name": "address_name", "description": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "project_name": {"name": "project_name", "description": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names).", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__labels.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "table", "cluster_by": ["address"], "unique_key": "event_id"}, "created_at": 1653000028.985517, "compiled_sql": "\n\nWITH labels AS (\n\n SELECT\n _ingested_at,\n blockchain,\n address,\n creator,\n label_type,\n label_subtype,\n address_name,\n project_name\n FROM\n FLOW_DEV.bronze.labels\n)\nSELECT\n *\nFROM\n labels", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.labels"}, "operation.flow_models.flow_models-on-run-start-0": {"raw_sql": "{{create_sps()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_sps"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-0", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-0"], "unique_id": "operation.flow_models.flow_models-on-run-start-0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-0.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-0", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-0.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1653000028.678493, "compiled_sql": "\n \n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 0}, "operation.flow_models.flow_models-on-run-start-1": {"raw_sql": "{{create_tasks()}}", "compiled": true, "resource_type": "operation", "depends_on": {"macros": ["macro.flow_models.create_tasks"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "flow_models-on-run-start-1", "fqn": ["flow_models", "hooks", "flow_models-on-run-start-1"], "unique_id": "operation.flow_models.flow_models-on-run-start-1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "hooks/flow_models-on-run-start-1.sql", "original_file_path": "./dbt_project.yml", "name": "flow_models-on-run-start-1", "alias": "", "checksum": {"name": "sha256", "checksum": "5957a5f01b29a2343a684dde70c2c1aebc038f5592024c8c91f86a9abd2f40d5"}, "tags": ["on-run-start"], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/./dbt_project.yml/hooks/flow_models-on-run-start-1.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}}, "created_at": 1653000028.680942, "compiled_sql": "\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "index": 1}, "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_block_height"], "unique_id": "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_block_height.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_block_height", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7108538, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "unique_core", "fqn": ["flow_models", "core", "unique_core__fact_blocks_block_height"], "unique_id": "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_core__fact_blocks_block_height.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "unique_core__fact_blocks_block_height", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/unique_core__fact_blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7116868, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.core.fact_blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT", "alias": "fact_blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_260bc5a99a933e66a4eb827527e2b686"}, "created_at": 1653000028.712447, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_block_timestamp.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_block_timestamp", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.718282, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_d247dc3a8e9b2d385ce445b0e87585c7"}, "created_at": 1653000028.719242, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_54dbaeb3f53b8506693602a1a9d86e6d"}, "created_at": 1653000028.729606, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_network"], "unique_id": "test.flow_models.not_null_core__fact_blocks_network.2708505a8a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_network.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_network", "alias": "fact_blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.73197, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR", "alias": "fact_blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f0e3df2b03d75265156192eccab4de46"}, "created_at": 1653000028.7327309, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_chain_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_chain_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_chain_id", "alias": "fact_blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.734852, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR", "alias": "fact_blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4b69ce0944df6569d9798383d0ec3446"}, "created_at": 1653000028.735616, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_tx_count"], "unique_id": "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_tx_count.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_tx_count", "alias": "fact_blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.737729, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER", "alias": "fact_blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a1980e3c1a5100a654027c786d939251"}, "created_at": 1653000028.7384808, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_id.88f5737541": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_id.88f5737541", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_id", "alias": "fact_blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.740451, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR", "alias": "fact_blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_21bc299a2ff05472d30d5ca71699f1cd"}, "created_at": 1653000028.741208, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_blocks_parent_id"], "unique_id": "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_blocks_parent_id.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "not_null_core__fact_blocks_parent_id", "alias": "fact_blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/not_null_core__fact_blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.743319, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('core__fact_blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec.sql", "original_file_path": "models/core/core__fact_blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR", "alias": "fact_blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_blocks.yml/dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_38a83937755e9d905548132a104d98ec"}, "created_at": 1653000028.7440782, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.core__fact_blocks"}, "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_id"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_id", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.748687, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "unique_core", "fqn": ["flow_models", "core", "unique_core__fact_transactions_tx_id"], "unique_id": "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_core__fact_transactions_tx_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "unique_core__fact_transactions_tx_id", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/unique_core__fact_transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.749452, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_block_timestamp.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_block_timestamp", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7502809, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_adab143db73fcddd15bcfb64c7902075"}, "created_at": 1653000028.7510269, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2809782f3f590041385eab8bd583f3da"}, "created_at": 1653000028.7536042, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_block_height"], "unique_id": "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_block_height.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_block_height", "alias": "fact_transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.755569, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT", "alias": "fact_transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8f536c0d7c468d7991761cbccc9e544a"}, "created_at": 1653000028.756315, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_chain_id"], "unique_id": "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_chain_id.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_chain_id", "alias": "fact_transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.758442, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR", "alias": "fact_transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3c746f0b700b44431e84404ddb30a21d"}, "created_at": 1653000028.759198, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_index"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_index.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_index", "alias": "fact_transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.761299, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER", "alias": "fact_transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d938b9cf661a27b6709c0412bb2dc4c4"}, "created_at": 1653000028.762051, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_proposer"], "unique_id": "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_proposer.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_proposer", "alias": "fact_transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.764251, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR", "alias": "fact_transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_92e499eed487c2b11e18d8deb95f17d9"}, "created_at": 1653000028.764996, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_payer"], "unique_id": "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_payer.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_payer", "alias": "fact_transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.767089, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR", "alias": "fact_transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b2ef60ba4c3119d95704cf2188c716b1"}, "created_at": 1653000028.7678368, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_authorizers"], "unique_id": "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_authorizers.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_authorizers", "alias": "fact_transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.769918, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY", "alias": "fact_transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_514e0d16c0be849611973b01304d8139"}, "created_at": 1653000028.7706602, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_count_authorizers.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_count_authorizers", "alias": "fact_transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7726212, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER", "alias": "fact_transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_732f9d68ddecaa61d82e3b958a336cc6"}, "created_at": 1653000028.773358, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_gas_limit"], "unique_id": "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_gas_limit.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_gas_limit", "alias": "fact_transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.77531, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER", "alias": "fact_transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e82d6a4482a136f3db15a1c431193eeb"}, "created_at": 1653000028.776046, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_transaction_result"], "unique_id": "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_transaction_result.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_transaction_result", "alias": "fact_transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7779999, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT", "alias": "fact_transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_73c56c1d1d1145366866aac67072799b"}, "created_at": 1653000028.7787461, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_tx_succeeded.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_tx_succeeded", "alias": "fact_transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7807128, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN", "alias": "fact_transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_04419e0c3827544c62a872c3ffcf7357"}, "created_at": 1653000028.781455, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "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": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_transactions_error_msg"], "unique_id": "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_transactions_error_msg.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "not_null_core__fact_transactions_error_msg", "alias": "fact_transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/not_null_core__fact_transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.783436, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR", "alias": "fact_transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e33a0df6d9b7a951ec6bbc171be6e8de"}, "created_at": 1653000028.7841809, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.core__fact_transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('core__fact_transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_core", "fqn": ["flow_models", "core", "dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927.sql", "original_file_path": "models/core/core__fact_transactions.yml", "name": "dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height", "alias": "fact_transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_transactions.yml/dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_dedb756c38ae0c981db303110accb927"}, "created_at": 1653000028.786308, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.core.fact_transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.core__fact_transactions"}, "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_tx_id"], "unique_id": "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_tx_id.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_tx_id", "alias": "fact_events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.792484, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_block_timestamp"], "unique_id": "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_block_timestamp.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_block_timestamp", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.793259, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_deebe87ac6fa3c848c8ef787354a5d94"}, "created_at": 1653000028.7940109, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.core.fact_events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ", "alias": "fact_events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_49b1b5f9b0b616e9e270c1e4d36614a9"}, "created_at": 1653000028.79659, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_block_height"], "unique_id": "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_block_height.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_block_height", "alias": "fact_events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.7988548, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT", "alias": "fact_events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b9b76796379a97de199adb91acb39f6f"}, "created_at": 1653000028.799593, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_tx_succeeded"], "unique_id": "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_tx_succeeded.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_tx_succeeded", "alias": "fact_events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.801661, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN", "alias": "fact_events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c9c0ebbf65aa5accc026d464f435d6e4"}, "created_at": 1653000028.802398, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_index"], "unique_id": "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_index.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_index", "alias": "fact_events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.804375, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER", "alias": "fact_events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_15c783b75ff7677c1e5721721a6bf7c8"}, "created_at": 1653000028.805226, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_contract"], "unique_id": "test.flow_models.not_null_core__fact_events_event_contract.10b5644238", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_contract.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_contract", "alias": "fact_events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.80766, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR", "alias": "fact_events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c099e3e53d7b1336eb352df479ee74ca"}, "created_at": 1653000028.808435, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_type"], "unique_id": "test.flow_models.not_null_core__fact_events_event_type.d865a2b006", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_type.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_type", "alias": "fact_events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8106701, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR", "alias": "fact_events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_20d6bd155395ffd91b62dfa67e8ed490"}, "created_at": 1653000028.811444, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_core", "fqn": ["flow_models", "core", "not_null_core__fact_events_event_data"], "unique_id": "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_core__fact_events_event_data.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "not_null_core__fact_events_event_data", "alias": "fact_events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/not_null_core__fact_events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8135931, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.core.fact_events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["OBJECT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_core", "fqn": ["flow_models", "core", "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT", "alias": "fact_events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ef1700159542758631ae9bea35c8dc2c"}, "created_at": 1653000028.814367, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('OBJECT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.core__fact_events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('core__fact_events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.core__fact_events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_core", "fqn": ["flow_models", "core", "dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6.sql", "original_file_path": "models/core/core__fact_events.yml", "name": "dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index", "alias": "fact_events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["core__fact_events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/core/core__fact_events.yml/dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a5b5bced5890b51c5f97e0e6bfba9ad6"}, "created_at": 1653000028.816371, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.core.fact_events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.core__fact_events"}, "test.flow_models.not_null_silver__events_event_id.c5f00655c1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_id"], "unique_id": "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8539672, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.unique_silver__events_event_id.c34161972a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__events_event_id"], "unique_id": "test.flow_models.unique_silver__events_event_id.c34161972a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__events_event_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "unique_silver__events_event_id", "alias": "events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/unique_silver__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.85473, "compiled_sql": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.events\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_id.2724c3889b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_id"], "unique_id": "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_id.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_id", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8554702, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_timestamp.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_timestamp", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.856204, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_1c5589da757435406908297f9363cbe0"}, "created_at": 1653000028.8570392, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_73cddc455e64e69abd404cf8fad83d91"}, "created_at": 1653000028.859623, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_block_height.7977589637": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_block_height"], "unique_id": "test.flow_models.not_null_silver__events_block_height.7977589637", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_block_height.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_block_height", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.861588, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_692b835c226209a476c88646f66b5283\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_692b835c226209a476c88646f66b5283.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_692b835c226209a476c88646f66b5283"}, "created_at": 1653000028.8623412, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_tx_succeeded.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_tx_succeeded", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8647208, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_86d75de89b36aa53343ff2c1db53d2b5"}, "created_at": 1653000028.86546, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_index.4e05dcc574": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_index"], "unique_id": "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_index.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_index", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.867427, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_399c3d967ee5e584a257ed0247390d44"}, "created_at": 1653000028.8681622, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_contract.d88483871a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_contract"], "unique_id": "test.flow_models.not_null_silver__events_event_contract.d88483871a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_contract.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_contract", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8701189, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a79461e873cd6a0b7a56c73ec15b691d"}, "created_at": 1653000028.870861, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_type"], "unique_id": "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_type", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.872961, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8a67767c13639fc4367a7c51331c48a0"}, "created_at": 1653000028.873709, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events_event_data"], "unique_id": "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events_event_data.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events_event_data", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.875812, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fa06e988dbe04f2fbdf94789c95e25ea"}, "created_at": 1653000028.876553, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_type.db25419673": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_type"], "unique_id": "test.flow_models.not_null_silver__events__event_data_type.db25419673", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_type.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_type", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.878519, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_type", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_87e252b7a7bd010b6e62ba24c26cd68b"}, "created_at": 1653000028.879266, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_TYPE'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_type", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__event_data_fields"], "unique_id": "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__event_data_fields.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__event_data_fields", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__event_data_fields.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.8812249, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _event_data_fields is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "_event_data_fields", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5b29ef3b5e8402e5f8f07150913d6c51"}, "created_at": 1653000028.881971, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_EVENT_DATA_FIELDS'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_event_data_fields", "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__events__ingested_at"], "unique_id": "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__events__ingested_at.sql", "original_file_path": "models/silver/silver__events.yml", "name": "not_null_silver__events__ingested_at", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/not_null_silver__events__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.883949, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.events\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ", "alias": "events", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c6e793f319b3ed1ee467223b202d3159"}, "created_at": 1653000028.8846972, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_TYPE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_EVENT_DATA_FIELDS' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('silver__events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "original_file_path": "models/silver/silver__events.yml", "name": "dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__events.yml/dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8f41430c9e7c236eba8f9a800b3d18ad"}, "created_at": 1653000028.886677, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.silver.events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__events"}, "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_event_contract"], "unique_id": "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_event_contract.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_event_contract", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.93838, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8c4d15aa66f4f332a37b4b2433c5c8a4"}, "created_at": 1653000028.939141, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contract_name", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_contract_name"], "unique_id": "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_contract_name.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_contract_name", "alias": "contract_labels_contract_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_contract_name.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.941273, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere contract_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "contract_name", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "contract_name", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR", "alias": "contract_labels_contract_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e4f1c20d9a214d62cbcfbd05d2a4b671"}, "created_at": 1653000028.942024, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CONTRACT_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "contract_name", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_address", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__contract_labels_account_address"], "unique_id": "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__contract_labels_account_address.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "not_null_silver__contract_labels_account_address", "alias": "contract_labels_account_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/not_null_silver__contract_labels_account_address.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.944134, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.contract_labels\nwhere account_address is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "account_address", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "account_address", "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR", "alias": "contract_labels_account_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6dbde722f01b49de5d4125dcf8ca1970"}, "created_at": 1653000028.944893, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CONTRACT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ACCOUNT_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ACCOUNT_ADDRESS'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "account_address", "file_key_name": "models.silver__contract_labels"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_contract", "contract_name"], "model": "{{ get_where_subquery(ref('silver__contract_labels')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__contract_labels"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c.sql", "original_file_path": "models/silver/silver__contract_labels.yml", "name": "dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name", "alias": "contract_labels_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__contract_labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__contract_labels.yml/dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_77bec7fac47b58015947ae88ae97cc1c"}, "created_at": 1653000028.946999, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_contract, contract_name\n from FLOW_DEV.silver.contract_labels\n group by event_contract, contract_name\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__contract_labels"}, "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.9515688, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__event_attributes_attribute_id"], "unique_id": "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__event_attributes_attribute_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "unique_silver__event_attributes_attribute_id", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/unique_silver__event_attributes_attribute_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.952353, "compiled_sql": "\n \n \n\nselect\n attribute_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_id is not null\ngroup by attribute_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR", "alias": "event_attributes_attribute_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bf1c8a6f08ed6400face03fc96d23d04"}, "created_at": 1653000028.9532, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_id", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.955196, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR", "alias": "event_attributes_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_888edcfa6964ef8e2216934bfbbc5112"}, "created_at": 1653000028.956065, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_tx_id"], "unique_id": "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_tx_id.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_tx_id", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.9580538, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_block_timestamp.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_block_timestamp", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.95892, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_ee45386d8c6eaffd2cdc1b5c8202a7a0"}, "created_at": 1653000028.959667, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.event_attributes\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ", "alias": "event_attributes_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1be89069bd76ae4ca211e5b7331abc4f"}, "created_at": 1653000028.9624152, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_index", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.964396, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER", "alias": "event_attributes_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_a6d88162d32031971b407e05143f0bd1"}, "created_at": 1653000028.9651399, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_index"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_index.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_index", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.967123, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "attribute_index", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER", "alias": "event_attributes_attribute_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fe6dcfe7834df0b25420416781b9b9d6"}, "created_at": 1653000028.967885, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_index", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_contract"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_contract.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_contract", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.969856, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR", "alias": "event_attributes_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f04490005d83a0b5416c8bf88dbc48e9"}, "created_at": 1653000028.9706, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_event_type"], "unique_id": "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_event_type.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_event_type", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.972704, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR", "alias": "event_attributes_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3100f9dc67bdb1e45eeecd5720259cee"}, "created_at": 1653000028.973453, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes_attribute_key"], "unique_id": "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes_attribute_key.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes_attribute_key", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes_attribute_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.975583, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere attribute_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "attribute_key", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR", "alias": "event_attributes_attribute_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_720646e0faff45d14acef65b0594e108"}, "created_at": 1653000028.976407, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ATTRIBUTE_KEY'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "attribute_key", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__event_attributes__ingested_at"], "unique_id": "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__event_attributes__ingested_at.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "not_null_silver__event_attributes__ingested_at", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/not_null_silver__event_attributes__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.978975, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.event_attributes\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ", "alias": "event_attributes", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_cd7c57d332c316a266134d07b44dd4a6"}, "created_at": 1653000028.97982, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('ATTRIBUTE_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_KEY' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('DECODED_ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ATTRIBUTE_VALUE_ADJ' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__event_attributes"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index", "attribute_index"], "model": "{{ get_where_subquery(ref('silver__event_attributes')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "original_file_path": "models/silver/silver__event_attributes.yml", "name": "dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index", "alias": "event_attributes_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__event_attributes"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__event_attributes.yml/dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7ed8454ca26f74032ad68c9c2ed65618"}, "created_at": 1653000028.982006, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index, attribute_index\n from FLOW_DEV.silver.event_attributes\n group by tx_id, event_index, attribute_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__event_attributes"}, "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__labels__ingested_at"], "unique_id": "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__labels__ingested_at.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "not_null_silver__labels__ingested_at", "alias": "labels", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/not_null_silver__labels__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653000028.985921, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.labels\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ", "alias": "labels", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f7ae1a3d13f8a885536f414906d1c2e8"}, "created_at": 1653000028.9868429, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "blockchain", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR", "alias": "labels_blockchain", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_90a027c43803a5f80c0d274aa3429854"}, "created_at": 1653000028.9889112, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCKCHAIN'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "blockchain", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "address", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR", "alias": "labels_address", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c80c60f5d7cc04d723c45e29916a75e4"}, "created_at": 1653000028.9909298, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ADDRESS'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "address", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "creator", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR", "alias": "labels_creator", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_38e8cad0f124193c8f82c44c95d8ce99"}, "created_at": 1653000028.9930398, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CREATOR'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "creator", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "label_type", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR", "alias": "labels_label_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d8ec1971c5af62a132f52670eec8f37f"}, "created_at": 1653000028.995459, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'LABEL_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "label_type", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "label_subtype", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR", "alias": "labels_label_subtype", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5d7b1adae730d4aa944da79bfa0d9dd7"}, "created_at": 1653000028.997547, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'LABEL_SUBTYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "label_subtype", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "address_name", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR", "alias": "labels_address_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2c6a9b49c2fb02418c5aef0535708218"}, "created_at": 1653000028.9996521, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ADDRESS_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "address_name", "file_key_name": "models.silver__labels"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_000c788288126638456ecd5973b99726\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "project_name", "model": "{{ get_where_subquery(ref('silver__labels')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__labels"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726.sql", "original_file_path": "models/silver/silver__labels.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR", "alias": "labels_project_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__labels"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__labels.yml/dbt_expectations_expect_column_000c788288126638456ecd5973b99726.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_000c788288126638456ecd5973b99726"}, "created_at": 1653000029.001645, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCKCHAIN' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CREATOR' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('LABEL_SUBTYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ADDRESS_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROJECT_NAME' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROJECT_NAME'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "project_name", "file_key_name": "models.silver__labels"}, "model.flow_models.gold__blocks": {"raw_sql": "{{ config(\n materialized = 'incremental',\n incremental_strategy = 'delete+insert',\n cluster_by = ['block_timestamp::DATE'],\n unique_key = 'block_height'\n) }}\n\nWITH silver_blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__blocks') }}\n WHERE\n block_timestamp >= '2022-05-09'\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n),\ngold_blocks AS (\n SELECT\n block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n id,\n parent_id\n FROM\n silver_blocks\n)\nSELECT\n *\nFROM\n gold_blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::DATE"], "incremental_strategy": "delete+insert", "unique_key": "block_height", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__blocks"], "unique_id": "model.flow_models.gold__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__blocks.sql", "original_file_path": "models/gold/gold__blocks.sql", "name": "gold__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "cc85f4bcbcafadf57487de1c70093dd177ee6231423aa7667177a5e5abd1ef2d"}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__blocks.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "incremental_strategy": "delete+insert", "cluster_by": ["block_timestamp::DATE"], "unique_key": "block_height"}, "created_at": 1653001981.632849, "compiled_sql": "\n\nWITH silver_blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.blocks\n WHERE\n block_timestamp >= '2022-05-09'\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n),\ngold_blocks AS (\n SELECT\n block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n id,\n parent_id\n FROM\n silver_blocks\n)\nSELECT\n *\nFROM\n gold_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.blocks"}, "model.flow_models.gold__transactions": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['block_timestamp::DATE'],\n unique_key = 'tx_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH silver_txs AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__transactions') }}\n WHERE\n block_timestamp >= '2022-05-09'\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE > CURRENT_DATE - 2\n{% endif %}\n),\ngold_txs AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n chain_id,\n tx_index,\n proposer,\n payer,\n authorizers,\n count_authorizers,\n gas_limit,\n transaction_result,\n tx_succeeded,\n error_msg\n FROM\n silver_txs\n)\nSELECT\n *\nFROM\n gold_txs", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__transactions"], "unique_id": "model.flow_models.gold__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__transactions.sql", "original_file_path": "models/gold/gold__transactions.sql", "name": "gold__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "55295561efd8c062c25dd75f2b7933f18657f8ea63ae86e1fe705b2d50b78935"}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__transactions.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert"}, "created_at": 1653001981.676706, "compiled_sql": "\n\nWITH silver_txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.transactions\n WHERE\n block_timestamp >= '2022-05-09'\n\n\nWHERE\n _ingested_at :: DATE > CURRENT_DATE - 2\n\n),\ngold_txs AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n chain_id,\n tx_index,\n proposer,\n payer,\n authorizers,\n count_authorizers,\n gas_limit,\n transaction_result,\n tx_succeeded,\n error_msg\n FROM\n silver_txs\n)\nSELECT\n *\nFROM\n gold_txs", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.transactions"}, "model.flow_models.silver__blocks": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'block_height',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__blocks') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__blocks"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__blocks"], "unique_id": "model.flow_models.silver__blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__blocks.sql", "original_file_path": "models/silver/silver__blocks.sql", "name": "silver__blocks", "alias": "blocks", "checksum": {"name": "sha256", "checksum": "630c91697fb92facb17e9594045f28b0ffab240bab62d524bd810a94296e2c88"}, "tags": [], "refs": [["bronze__blocks"]], "sources": [], "description": "Information about blocks on the FLOW network and corresponding metadata.", "columns": {"block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "network": {"name": "network", "description": "The blockchain network the block or transaction occurred on.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_count": {"name": "tx_count", "description": "The number of transactions in the block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The block hash.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The block hash for the parent block.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__blocks.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "block_height", "incremental_strategy": "delete+insert"}, "created_at": 1653001981.724006, "compiled_sql": "\n\nWITH bronze_blocks AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.blocks\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY block_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nsilver_blocks AS (\n SELECT\n block_id AS block_height,\n block_timestamp,\n network,\n chain_id,\n tx_count,\n COALESCE(\n header :block_id,\n header :block_header :block_id,\n header :id\n ) :: STRING AS id,\n COALESCE(\n header :parent_id,\n header :parentId,\n header :block_header :parent_id\n ) :: STRING AS parent_id,\n _ingested_at\n FROM\n bronze_blocks\n)\nSELECT\n *\nFROM\n silver_blocks", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.blocks"}, "model.flow_models.silver__transactions": {"raw_sql": "{{ config(\n materialized = 'incremental',\n cluster_by = ['_ingested_at::DATE', 'block_timestamp::DATE'],\n unique_key = 'tx_id',\n incremental_strategy = 'delete+insert'\n) }}\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n {{ ref('bronze__transactions') }}\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n{% endif %}\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.bronze__transactions"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "silver", "fqn": ["flow_models", "silver", "silver__transactions"], "unique_id": "model.flow_models.silver__transactions", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "silver/silver__transactions.sql", "original_file_path": "models/silver/silver__transactions.sql", "name": "silver__transactions", "alias": "transactions", "checksum": {"name": "sha256", "checksum": "83624dbe1e5e65d466c20b980977a85cb2eda3821b3cb031464b41771d0b9ebe"}, "tags": [], "refs": [["bronze__transactions"]], "sources": [], "description": "This table records all the transactions of the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "chain_id": {"name": "chain_id", "description": "The id for the chain of the network on which this block occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_index": {"name": "tx_index", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "proposer": {"name": "proposer", "description": "Address of the transaction proposer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payer": {"name": "payer", "description": "Address of the wallet paying for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorizers": {"name": "authorizers", "description": "Address(es) authorizing the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_authorizers": {"name": "count_authorizers", "description": "Number of authorizers", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gas_limit": {"name": "gas_limit", "description": "Upper gas limit attached to the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "transaction_result": {"name": "transaction_result", "description": "Outcome of the transaction, including events that were called.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_msg": {"name": "error_msg", "description": "tbd", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_ingested_at": {"name": "_ingested_at", "description": "When the record was ingested by the chainwalker.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/silver/silver__transactions.yml", "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "cluster_by": ["_ingested_at::DATE", "block_timestamp::DATE"], "unique_key": "tx_id", "incremental_strategy": "delete+insert"}, "created_at": 1653001981.754678, "compiled_sql": "\n\nWITH bronze_txs AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.bronze.transactions\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE - 2\n\n\nqualify ROW_NUMBER() over (\n PARTITION BY tx_id\n ORDER BY\n _ingested_at DESC\n) = 1\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_id AS block_height,\n chain_id,\n tx_block_index AS tx_index,\n COALESCE(\n tx :proposal_key :Address,\n tx :proposalKeyAddress\n ) :: STRING AS proposer,\n tx :payer :: STRING AS payer,\n tx :authorizers :: ARRAY AS authorizers,\n ARRAY_SIZE(authorizers) AS count_authorizers,\n COALESCE(\n tx :gas_limit,\n tx :gasLimit\n ) :: NUMBER AS gas_limit,\n COALESCE(\n tx :transaction_result,\n tx :result\n ) :: variant AS transaction_result,\n CASE\n WHEN transaction_result :error = '' THEN TRUE\n WHEN transaction_result :error :: STRING IS NULL THEN TRUE\n ELSE FALSE\n END AS tx_succeeded,\n COALESCE(\n transaction_result :error,\n ''\n ) :: STRING AS error_msg,\n _ingested_at\n FROM\n bronze_txs\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.silver.transactions"}, "model.flow_models.gold__events": {"raw_sql": "{{ config(\n materialized = 'incremental',\n incremental_strategy = 'delete+insert',\n cluster_by = ['block_timestamp::date'],\n unique_key = \"CONCAT_WS('-', tx_id, event_index)\"\n) }}\n\nWITH silver_events AS (\n\n SELECT\n *\n FROM\n {{ ref('silver__events') }}\n WHERE\n block_timestamp >= '2022-05-09'\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n{% endif %}\n),\nsilver_event_attributes AS (\n SELECT\n *\n FROM\n {{ ref('silver__event_attributes') }}\n WHERE\n block_timestamp >= '2022-05-09'\n\n{% if is_incremental() %}\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n{% endif %}\n),\nobjs AS (\n SELECT\n event_id,\n OBJECT_AGG(\n attribute_key,\n attribute_value_adj :: variant\n ) AS event_data\n FROM\n silver_event_attributes\n GROUP BY\n 1\n),\nlocation_object AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n _event_data_type :location,\n _event_data_type :Location\n ) AS event_data\n FROM\n silver_events\n WHERE\n _event_data_fields = '[]'\n),\ngold_events AS (\n SELECT\n e.event_id,\n e.tx_id,\n e.block_timestamp,\n e.block_height,\n e.tx_succeeded,\n e.event_index,\n e.event_contract,\n e.event_type,\n A.event_data\n FROM\n objs A\n LEFT JOIN silver_events e USING (event_id)\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n gold_events\n UNION\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n location_object\n)\nSELECT\n *\nFROM\n FINAL", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental"], "nodes": ["model.flow_models.silver__events", "model.flow_models.silver__event_attributes"]}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {"relation": true, "columns": true}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "copy_grants": true, "cluster_by": ["block_timestamp::date"], "incremental_strategy": "delete+insert", "unique_key": "CONCAT_WS('-', tx_id, event_index)", "post-hook": [], "pre-hook": []}, "database": "FLOW_DEV", "schema": "gold", "fqn": ["flow_models", "gold", "gold__events"], "unique_id": "model.flow_models.gold__events", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "gold/gold__events.sql", "original_file_path": "models/gold/gold__events.sql", "name": "gold__events", "alias": "events", "checksum": {"name": "sha256", "checksum": "e9d7a27617b83872605972bb2d14d0ed23ebc995d7f8483ff58e281e86636457"}, "tags": [], "refs": [["silver__events"], ["silver__event_attributes"]], "sources": [], "description": "This table records events from each transaction on the FLOW blockchain.", "columns": {"tx_id": {"name": "tx_id", "description": "ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_timestamp": {"name": "block_timestamp", "description": "The date and time for when the block was written.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "block_height": {"name": "block_height", "description": "The block height the block was recorded at.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tx_succeeded": {"name": "tx_succeeded", "description": "Transaction status, if it succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_index": {"name": "event_index", "description": "The index of the event within the transaction, i.e. in what order the events occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_contract": {"name": "event_contract", "description": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_type": {"name": "event_type", "description": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_data": {"name": "event_data", "description": "The data passed to the event, in the form of key-value pairs.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "flow_models://models/gold/gold__events.yml", "compiled_path": "target/compiled/flow_models/models/gold/gold__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"copy_grants": true, "persist_docs": {"relation": true, "columns": true}, "materialized": "incremental", "incremental_strategy": "delete+insert", "cluster_by": ["block_timestamp::date"], "unique_key": "CONCAT_WS('-', tx_id, event_index)"}, "created_at": 1653001981.799264, "compiled_sql": "\n\nWITH silver_events AS (\n\n SELECT\n *\n FROM\n FLOW_DEV.silver.events\n WHERE\n block_timestamp >= '2022-05-09'\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n\n),\nsilver_event_attributes AS (\n SELECT\n *\n FROM\n FLOW_DEV.silver.event_attributes\n WHERE\n block_timestamp >= '2022-05-09'\n\n\nWHERE\n _ingested_at :: DATE >= CURRENT_DATE -2\n\n),\nobjs AS (\n SELECT\n event_id,\n OBJECT_AGG(\n attribute_key,\n attribute_value_adj :: variant\n ) AS event_data\n FROM\n silver_event_attributes\n GROUP BY\n 1\n),\nlocation_object AS (\n SELECT\n event_id,\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n COALESCE(\n _event_data_type :location,\n _event_data_type :Location\n ) AS event_data\n FROM\n silver_events\n WHERE\n _event_data_fields = '[]'\n),\ngold_events AS (\n SELECT\n e.event_id,\n e.tx_id,\n e.block_timestamp,\n e.block_height,\n e.tx_succeeded,\n e.event_index,\n e.event_contract,\n e.event_type,\n A.event_data\n FROM\n objs A\n LEFT JOIN silver_events e USING (event_id)\n),\nFINAL AS (\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n gold_events\n UNION\n SELECT\n tx_id,\n block_timestamp,\n block_height,\n tx_succeeded,\n event_index,\n event_contract,\n event_type,\n event_data\n FROM\n location_object\n)\nSELECT\n *\nFROM\n FINAL", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "FLOW_DEV.gold.events"}, "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_block_height"], "unique_id": "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_block_height.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.636485, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "unique_gold", "fqn": ["flow_models", "gold", "unique_gold__blocks_block_height"], "unique_id": "test.flow_models.unique_gold__blocks_block_height.7c3e159f31", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_gold__blocks_block_height.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "unique_gold__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/unique_gold__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.637314, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.gold.blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_444504d9d5b73cde139497080c91f040"}, "created_at": 1653001981.638081, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_block_timestamp.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_block_timestamp", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.643713, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_4c7a705aa4b58d94af50ed6e34172e43"}, "created_at": 1653001981.644585, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_52d9893434163129a875c39c124985f7\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_52d9893434163129a875c39c124985f7.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_52d9893434163129a875c39c124985f7"}, "created_at": 1653001981.654639, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_network.1290e522fb": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_network"], "unique_id": "test.flow_models.not_null_gold__blocks_network.1290e522fb", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_network.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_network", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.656974, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_3b12f19895213e04b85d4ef69f8a2d67"}, "created_at": 1653001981.657738, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_chain_id"], "unique_id": "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_chain_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_chain_id", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.659863, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_024057dd60fea6722c191edee5b36d71"}, "created_at": 1653001981.660628, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_tx_count"], "unique_id": "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_tx_count.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_tx_count", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.6627278, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_007c33b23027bf75603a43c718320163\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_007c33b23027bf75603a43c718320163.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_007c33b23027bf75603a43c718320163"}, "created_at": 1653001981.663477, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_id.6c4c044819": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_id"], "unique_id": "test.flow_models.not_null_gold__blocks_id.6c4c044819", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_id", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.665451, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_141ccd7f45f2ed02547f9d055859f316"}, "created_at": 1653001981.666204, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__blocks_parent_id"], "unique_id": "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__blocks_parent_id.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "not_null_gold__blocks_parent_id", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/not_null_gold__blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.6683059, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ad06ed6b1ac9fa24f9ae4d4467ea6cb1"}, "created_at": 1653001981.669068, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.gold__blocks"}, "test.flow_models.sequence_gaps_gold__blocks_block_height.57b7dba0ad": {"raw_sql": "{{ test_sequence_gaps(**_dbt_generic_test_kwargs) }}{{ config(where=\"BLOCK_TIMESTAMP < CURRENT_DATE\") }}", "test_metadata": {"name": "sequence_gaps", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.flow_models.test_sequence_gaps", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__blocks"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": "BLOCK_TIMESTAMP < CURRENT_DATE", "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "sequence_gaps_gold", "fqn": ["flow_models", "gold", "sequence_gaps_gold__blocks_block_height"], "unique_id": "test.flow_models.sequence_gaps_gold__blocks_block_height.57b7dba0ad", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "sequence_gaps_gold__blocks_block_height.sql", "original_file_path": "models/gold/gold__blocks.yml", "name": "sequence_gaps_gold__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__blocks.yml/sequence_gaps_gold__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {"where": "BLOCK_TIMESTAMP < CURRENT_DATE"}, "created_at": 1653001981.671316, "compiled_sql": "WITH source AS (\n SELECT\n \n block_height,\n LAG(\n block_height,\n 1\n ) over (\n \n ORDER BY\n block_height ASC\n ) AS prev_block_height\n FROM\n (select * from FLOW_DEV.gold.blocks where BLOCK_TIMESTAMP < CURRENT_DATE) dbt_subquery\n)\nSELECT\n \n prev_block_height,\n block_height,\n block_height - prev_block_height\n - 1 AS gap\nFROM\n source\nWHERE\n block_height - prev_block_height <> 1\nORDER BY\n gap DESC ", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.gold__blocks"}, "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_id"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.677088, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "unique_gold", "fqn": ["flow_models", "gold", "unique_gold__transactions_tx_id"], "unique_id": "test.flow_models.unique_gold__transactions_tx_id.c038e1f494", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_gold__transactions_tx_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "unique_gold__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/unique_gold__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.6778612, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.gold.transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6": {"raw_sql": "{{ test_tx_gaps(**_dbt_generic_test_kwargs) }}{{ config(where=\"BLOCK_TIMESTAMP < CURRENT_DATE\") }}", "test_metadata": {"name": "tx_gaps", "kwargs": {"column_block": "block_height", "column_tx_count": "tx_count", "column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.flow_models.test_tx_gaps", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions", "model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": "BLOCK_TIMESTAMP < CURRENT_DATE", "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "tx_gaps_gold", "fqn": ["flow_models", "gold", "tx_gaps_gold__transactions_block_height__tx_id__tx_count"], "unique_id": "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "tx_gaps_gold__transactions_block_height__tx_id__tx_count.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "tx_gaps_gold__transactions_block_height__tx_id__tx_count", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"], ["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/tx_gaps_gold__transactions_block_height__tx_id__tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {"where": "BLOCK_TIMESTAMP < CURRENT_DATE"}, "created_at": 1653001981.678865, "compiled_sql": "\nWITH block_base AS (\n SELECT\n block_height,\n tx_count\n FROM\n FLOW_DEV.silver.blocks\n),\nmodel_name AS (\n SELECT\n block_height,\n COUNT(\n DISTINCT tx_id\n ) AS model_tx_count\n FROM\n (select * from FLOW_DEV.gold.transactions where BLOCK_TIMESTAMP < CURRENT_DATE) dbt_subquery\n GROUP BY\n block_height\n)\nSELECT\n block_base.block_height,\n tx_count,\n model_name.block_height,\n model_tx_count\nFROM\n block_base\n LEFT JOIN model_name\n ON block_base.block_height = model_name.block_height\nWHERE\n tx_count <> model_tx_count ", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_block_timestamp.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_block_timestamp", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.681816, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_9f46095568c4fde39f897fc3eddfc0f1"}, "created_at": 1653001981.682688, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_5054f5739efdb619f3dcc83422428974"}, "created_at": 1653001981.685239, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_block_height"], "unique_id": "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_block_height.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_block_height", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.687202, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_02d891e21e83bb0b513ae9d922c77029"}, "created_at": 1653001981.687958, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_chain_id"], "unique_id": "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_chain_id.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_chain_id", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.690302, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4cf7721108e1a64a7322a75d12cd4e9e"}, "created_at": 1653001981.69105, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_index"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_index.78407db79c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_index.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_index", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.693158, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_45c9eb5c350f681bf8a1f471bc0e67e8"}, "created_at": 1653001981.693912, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_proposer"], "unique_id": "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_proposer.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_proposer", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.6958861, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1769c94974aac44a7816bac213b92a25"}, "created_at": 1653001981.69664, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_payer.efa8662752": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_payer"], "unique_id": "test.flow_models.not_null_gold__transactions_payer.efa8662752", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_payer.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_payer", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.698739, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_600ab70a569722ab239be856c187cec5"}, "created_at": 1653001981.699492, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_authorizers"], "unique_id": "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_authorizers.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_authorizers", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.701596, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ae6a2a5831a7019ae4490d13f25cd9a6"}, "created_at": 1653001981.702357, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_count_authorizers.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_count_authorizers", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.704329, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_64c004f785e21f47e53200caaf87b649"}, "created_at": 1653001981.7050781, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_gas_limit"], "unique_id": "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_gas_limit.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_gas_limit", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.707045, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d91ec1a80543eac6cbbe08c6e3e0bbf8"}, "created_at": 1653001981.707787, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_transaction_result"], "unique_id": "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_transaction_result.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_transaction_result", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.70977, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_eeea7b7e43b132b2e652f18e3f33d207"}, "created_at": 1653001981.7105222, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_tx_succeeded.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_tx_succeeded", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.712485, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ab15e8b407c90ad52a46e9f0466d483c"}, "created_at": 1653001981.7132301, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__transactions_error_msg"], "unique_id": "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__transactions_error_msg.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "not_null_gold__transactions_error_msg", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/not_null_gold__transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7153149, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_69ffc0de2884959cf5ef4ea657dd7bfb"}, "created_at": 1653001981.716078, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.gold__transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('gold__transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_gold", "fqn": ["flow_models", "gold", "dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0.sql", "original_file_path": "models/gold/gold__transactions.yml", "name": "dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__transactions.yml/dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9e1e29a7fef20c56d9ab92895f4cb2c0"}, "created_at": 1653001981.71826, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.gold.transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.gold__transactions"}, "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_height"], "unique_id": "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7247958, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.unique_silver__blocks_block_height.478ce02832": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__blocks_block_height"], "unique_id": "test.flow_models.unique_silver__blocks_block_height.478ce02832", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__blocks_block_height.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "unique_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/unique_silver__blocks_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.725564, "compiled_sql": "\n \n \n\nselect\n block_height as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.blocks\nwhere block_height is not null\ngroup by block_height\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8d9ba6000505b85e43c4cca58e4fd480"}, "created_at": 1653001981.726316, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_block_timestamp.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_block_timestamp", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7284322, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_f8c7cb807bf5527b93589f5606885739"}, "created_at": 1653001981.729174, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.blocks\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ", "alias": "blocks_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_48f7fbc31e0abd10b3a5ed647d44f893"}, "created_at": 1653001981.731731, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_network.2020ad46b9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_network"], "unique_id": "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_network.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_network", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_network.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7336829, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere network is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "network", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR", "alias": "blocks_network", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6ce2617efc68e1ea8aec0fc45e0b4ac1"}, "created_at": 1653001981.734428, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'NETWORK'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "network", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_chain_id"], "unique_id": "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_chain_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_chain_id", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.736512, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR", "alias": "blocks_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d363e95fdd4f6eac4459965af4d4b68e"}, "created_at": 1653001981.737254, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_tx_count"], "unique_id": "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_tx_count.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_tx_count", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_tx_count.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.739341, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere tx_count is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_count", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER", "alias": "blocks_tx_count", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e46175e725b11de66317d10c04b3eba2"}, "created_at": 1653001981.7400918, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_COUNT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_count", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_id.b40d544128": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_id"], "unique_id": "test.flow_models.not_null_silver__blocks_id.b40d544128", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_id", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7420402, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR", "alias": "blocks_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_e52839f96189e2588cd49f7b3d94c101"}, "created_at": 1653001981.74279, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks_parent_id"], "unique_id": "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks_parent_id.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks_parent_id", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks_parent_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.744885, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere parent_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "parent_id", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR", "alias": "blocks_parent_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ef5ad2056578d02115f04a085e4ba84c"}, "created_at": 1653001981.745638, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PARENT_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "parent_id", "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__blocks__ingested_at"], "unique_id": "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__blocks__ingested_at.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "not_null_silver__blocks__ingested_at", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/not_null_silver__blocks__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.747736, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.blocks\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ", "alias": "blocks", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_bc73b9e4faeef7ce8f8d898b455c8e81"}, "created_at": 1653001981.748485, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('NETWORK' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_COUNT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PARENT_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__blocks"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["block_height"], "model": "{{ get_where_subquery(ref('silver__blocks')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__blocks"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__blocks_block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6.sql", "original_file_path": "models/silver/silver__blocks.yml", "name": "dbt_utils_unique_combination_of_columns_silver__blocks_block_height", "alias": "blocks_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__blocks"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__blocks.yml/dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7b1f5b6ed9ce9877c70c9cc986c947f6"}, "created_at": 1653001981.750452, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n block_height\n from FLOW_DEV.silver.blocks\n group by block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__blocks"}, "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_id"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7550569, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "unique_silver", "fqn": ["flow_models", "silver", "unique_silver__transactions_tx_id"], "unique_id": "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "unique_silver__transactions_tx_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "unique_silver__transactions_tx_id", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/unique_silver__transactions_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.755827, "compiled_sql": "\n \n \n\nselect\n tx_id as unique_field,\n count(*) as n_records\n\nfrom FLOW_DEV.silver.transactions\nwhere tx_id is not null\ngroup by tx_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_timestamp"], "unique_id": "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_timestamp.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_timestamp", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7565691, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_5d2004d0f76917aee39e225642f78757"}, "created_at": 1653001981.757673, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.silver.transactions\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ", "alias": "transactions_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8035146711011cfa5b59349a671995e0"}, "created_at": 1653001981.760252, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_block_height.52f8623258": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_block_height"], "unique_id": "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_block_height.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_block_height", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.76223, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT", "alias": "transactions_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7becf5ebb9283b3fd6b804a7d71953db"}, "created_at": 1653001981.762985, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_chain_id"], "unique_id": "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_chain_id.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_chain_id", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_chain_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7650921, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere chain_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "chain_id", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR", "alias": "transactions_chain_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_9e816c1c82c3d4f36c18fac8ed695b82"}, "created_at": 1653001981.7658508, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'CHAIN_ID'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "chain_id", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_index"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_index.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_index", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.767972, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "tx_index", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER", "alias": "transactions_tx_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_7454c5b178655aafc16c26a6acc4e563"}, "created_at": 1653001981.7687218, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_index", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_proposer"], "unique_id": "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_proposer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_proposer", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_proposer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7706938, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere proposer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "proposer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR", "alias": "transactions_proposer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_4a1beae08ec9b59cc8e861563724ad71"}, "created_at": 1653001981.771446, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PROPOSER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "proposer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_payer"], "unique_id": "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_payer.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_payer", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_payer.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.773607, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere payer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "payer", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR", "alias": "transactions_payer", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_b0147d4baf1cfe05bf3ca359e05199df"}, "created_at": 1653001981.774367, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'PAYER'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "payer", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_authorizers", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.776483, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["ARRAY"], "column_name": "authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY", "alias": "transactions_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_6991d529925fc95a84bb0d83a503f34f"}, "created_at": 1653001981.777239, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'AUTHORIZERS'\n and\n relation_column_type not in ('ARRAY')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_count_authorizers"], "unique_id": "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_count_authorizers.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_count_authorizers", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_count_authorizers.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7792268, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere count_authorizers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "count_authorizers", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER", "alias": "transactions_count_authorizers", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_58ee99ce633582efe95d7ae3fa4feac0"}, "created_at": 1653001981.779975, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'COUNT_AUTHORIZERS'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "count_authorizers", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_gas_limit"], "unique_id": "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_gas_limit.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_gas_limit", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_gas_limit.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7819579, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere gas_limit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "gas_limit", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER", "alias": "transactions_gas_limit", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_ea75452c86dbac25c09ae432c3ed57bb"}, "created_at": 1653001981.78271, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'GAS_LIMIT'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gas_limit", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_transaction_result"], "unique_id": "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_transaction_result.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_transaction_result", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_transaction_result.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.784692, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere transaction_result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["VARIANT"], "column_name": "transaction_result", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT", "alias": "transactions_transaction_result", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c508518787128faee7c2fbd8da10cd49"}, "created_at": 1653001981.7854478, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TRANSACTION_RESULT'\n and\n relation_column_type not in ('VARIANT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "transaction_result", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_tx_succeeded"], "unique_id": "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_tx_succeeded.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_tx_succeeded", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.787426, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN", "alias": "transactions_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_812e47b41972fb5dcaeb0b679ac6f500"}, "created_at": 1653001981.788172, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions_error_msg"], "unique_id": "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions_error_msg.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions_error_msg", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions_error_msg.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.790446, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere error_msg is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "error_msg", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR", "alias": "transactions_error_msg", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_845721d81b3a7f929e684dfbd000a890"}, "created_at": 1653001981.791191, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'ERROR_MSG'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "error_msg", "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "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": "FLOW_DEV", "schema": "not_null_silver", "fqn": ["flow_models", "silver", "not_null_silver__transactions__ingested_at"], "unique_id": "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_silver__transactions__ingested_at.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "not_null_silver__transactions__ingested_at", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/not_null_silver__transactions__ingested_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7932742, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.silver.transactions\nwhere _ingested_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "_ingested_at", "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_silver", "fqn": ["flow_models", "silver", "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ", "alias": "transactions", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1b451730bab7952ba49a815bdcc98c78"}, "created_at": 1653001981.794018, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('CHAIN_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PROPOSER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('PAYER' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('ARRAY' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('COUNT_AUTHORIZERS' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('GAS_LIMIT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TRANSACTION_RESULT' as \n varchar\n) as relation_column,\n cast('VARIANT' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('ERROR_MSG' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('_INGESTED_AT' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '_INGESTED_AT'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_ingested_at", "file_key_name": "models.silver__transactions"}, "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "block_height"], "model": "{{ get_where_subquery(ref('silver__transactions')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.silver__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_silver", "fqn": ["flow_models", "silver", "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "original_file_path": "models/silver/silver__transactions.yml", "name": "dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height", "alias": "transactions_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["silver__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/silver/silver__transactions.yml/dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e159f09f9ccea774c4ab64d7e71f0076"}, "created_at": 1653001981.795979, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, block_height\n from FLOW_DEV.silver.transactions\n group by tx_id, block_height\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.silver__transactions"}, "test.flow_models.not_null_gold__events_tx_id.95926804a2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_id", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_tx_id"], "unique_id": "test.flow_models.not_null_gold__events_tx_id.95926804a2", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_tx_id.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_tx_id", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_tx_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.7996402, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere tx_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_id", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_block_timestamp"], "unique_id": "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_block_timestamp.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_block_timestamp", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_block_timestamp.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.800498, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere block_timestamp is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": {"raw_sql": "{{ dbt_expectations.test_expect_row_values_to_have_recent_data(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227\") }}", "test_metadata": {"name": "expect_row_values_to_have_recent_data", "kwargs": {"datepart": "day", "interval": 1, "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_row_values_to_have_recent_data_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1"], "unique_id": "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_row_va_674a82f02e2aa1c27661609924bca227"}, "created_at": 1653001981.801248, "compiled_sql": "\n\n with max_recency as (\n\n select max(cast(block_timestamp as \n timestamp_ntz\n)) as max_timestamp\n from\n FLOW_DEV.gold.events\n where\n cast(block_timestamp as \n timestamp_ntz\n) <= cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n \n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('1970-01-01' as \n timestamp_ntz\n))\n <\n cast(\n\n dateadd(\n day,\n -1,\n cast(convert_timezone('UTC', 'GMT', \n current_timestamp::\n timestamp_ntz\n\n) as \n timestamp_ntz\n)\n )\n\n as \n timestamp_ntz\n)\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["TIMESTAMP_NTZ"], "column_name": "block_timestamp", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ", "alias": "events_block_timestamp", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_fb2e186e8415147939b2add0bdb91617"}, "created_at": 1653001981.803809, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_TIMESTAMP'\n and\n relation_column_type not in ('TIMESTAMP_NTZ')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_timestamp", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_block_height"], "unique_id": "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_block_height.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_block_height", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_block_height.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.8057768, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere block_height is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER", "FLOAT"], "column_name": "block_height", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT", "alias": "events_block_height", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_2862a54152a2a8feae1f25cff5f728f2"}, "created_at": 1653001981.806527, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'BLOCK_HEIGHT'\n and\n relation_column_type not in ('NUMBER', 'FLOAT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "block_height", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_tx_succeeded"], "unique_id": "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_tx_succeeded.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_tx_succeeded", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_tx_succeeded.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.808649, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere tx_succeeded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["BOOLEAN"], "column_name": "tx_succeeded", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN", "alias": "events_tx_succeeded", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_8081bc9f95466a4543faf3101ac1940b"}, "created_at": 1653001981.809403, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'TX_SUCCEEDED'\n and\n relation_column_type not in ('BOOLEAN')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "tx_succeeded", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_index.b152284f0b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_index", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_index"], "unique_id": "test.flow_models.not_null_gold__events_event_index.b152284f0b", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_index.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_index", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_index.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.811386, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["NUMBER"], "column_name": "event_index", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER", "alias": "events_event_index", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_1b53072c92aa356c79fee7e766423e7d"}, "created_at": 1653001981.812136, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_INDEX'\n and\n relation_column_type not in ('NUMBER')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_index", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_contract.7794754732": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_contract", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_contract"], "unique_id": "test.flow_models.not_null_gold__events_event_contract.7794754732", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_contract.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_contract", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_contract.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.8141189, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_contract is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_contract", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR", "alias": "events_event_contract", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_c38b38dc19789c8cf00da3c3e1c1b315"}, "created_at": 1653001981.814888, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_CONTRACT'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_contract", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_type", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_type"], "unique_id": "test.flow_models.not_null_gold__events_event_type.f7e447ca7d", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_type.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_type", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_type.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.8170161, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["STRING", "VARCHAR"], "column_name": "event_type", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR", "alias": "events_event_type", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_f528f8138408cc30b14f89e49c80fc7e"}, "created_at": 1653001981.817805, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_TYPE'\n and\n relation_column_type not in ('STRING', 'VARCHAR')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_type", "file_key_name": "models.gold__events"}, "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_data", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "not_null_gold", "fqn": ["flow_models", "gold", "not_null_gold__events_event_data"], "unique_id": "test.flow_models.not_null_gold__events_event_data.c5e8d4c967", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "not_null_gold__events_event_data.sql", "original_file_path": "models/gold/gold__events.yml", "name": "not_null_gold__events_event_data", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/not_null_gold__events_event_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1653001981.820081, "compiled_sql": "\n \n \n\nselect *\nfrom FLOW_DEV.gold.events\nwhere event_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": {"raw_sql": "{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1\") }}", "test_metadata": {"name": "expect_column_values_to_be_in_type_list", "kwargs": {"column_type_list": ["OBJECT"], "column_name": "event_data", "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_expectations"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_expectations_expect_column_values_to_be_in_type_list_gold", "fqn": ["flow_models", "gold", "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT"], "unique_id": "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT", "alias": "events_event_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_expectations_expect_column_d742a294dfb49043750f16694b849eb1"}, "created_at": 1653001981.820898, "compiled_sql": "with relation_columns as (\n\n \n select\n cast('TX_ID' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_TIMESTAMP' as \n varchar\n) as relation_column,\n cast('TIMESTAMP_NTZ' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('BLOCK_HEIGHT' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('TX_SUCCEEDED' as \n varchar\n) as relation_column,\n cast('BOOLEAN' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_INDEX' as \n varchar\n) as relation_column,\n cast('NUMBER' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_CONTRACT' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_TYPE' as \n varchar\n) as relation_column,\n cast('VARCHAR' as \n varchar\n) as relation_column_type\n union all\n \n select\n cast('EVENT_DATA' as \n varchar\n) as relation_column,\n cast('OBJECT' as \n varchar\n) as relation_column_type\n \n \n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = 'EVENT_DATA'\n and\n relation_column_type not in ('OBJECT')\n\n )\n select *\n from test_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_data", "file_key_name": "models.gold__events"}, "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["tx_id", "event_index"], "model": "{{ get_where_subquery(ref('gold__events')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.flow_models.gold__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "FLOW_DEV", "schema": "dbt_utils_unique_combination_of_columns_gold", "fqn": ["flow_models", "gold", "dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index"], "unique_id": "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9.sql", "original_file_path": "models/gold/gold__events.yml", "name": "dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index", "alias": "events_tx_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gold__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/flow_models/models/gold/gold__events.yml/dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_c90832ccd9fc36507923bfa6395667b9"}, "created_at": 1653001981.823343, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n tx_id, event_index\n from FLOW_DEV.gold.events\n group by tx_id, event_index\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.gold__events"}}, "sources": {"source.flow_models.prod.flow_blocks": {"fqn": ["flow_models", "prod", "flow_blocks"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_blocks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_blocks", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_blocks", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_blocks", "created_at": 1653000029.097467}, "source.flow_models.prod.flow_txs": {"fqn": ["flow_models", "prod", "flow_txs"], "database": "chainwalkers", "schema": "prod", "unique_id": "source.flow_models.prod.flow_txs", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "flow_txs", "source_name": "prod", "source_description": "", "loader": "", "identifier": "flow_txs", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "chainwalkers.prod.flow_txs", "created_at": 1653000029.097537}, "source.flow_models.crosschain.address_labels": {"fqn": ["flow_models", "crosschain", "address_labels"], "database": "flipside_prod_db", "schema": "crosschain", "unique_id": "source.flow_models.crosschain.address_labels", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "models/sources.yml", "original_file_path": "models/sources.yml", "name": "address_labels", "source_name": "crosschain", "source_description": "", "loader": "", "identifier": "address_labels", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "flipside_prod_db.crosschain.address_labels", "created_at": 1653000029.097589}}, "macros": {"macro.flow_models.create_tasks": {"unique_id": "macro.flow_models.create_tasks", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_tasks.sql", "original_file_path": "macros/create_tasks.sql", "name": "create_tasks", "macro_sql": "{% macro create_tasks() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ task_run_sp_create_prod_clone('_internal') }};\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.task_run_sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.019115}, "macro.flow_models.create_sps": {"unique_id": "macro.flow_models.create_sps", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/create_sps.sql", "original_file_path": "macros/create_sps.sql", "name": "create_sps", "macro_sql": "{% macro create_sps() %}\n {% if target.database == 'FLOW' %}\n CREATE SCHEMA IF NOT EXISTS _internal;\n {{ sp_create_prod_clone('_internal') }};\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.flow_models.sp_create_prod_clone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0194921}, "macro.flow_models.generate_schema_name": {"unique_id": "macro.flow_models.generate_schema_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(\n custom_schema_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [0] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0200179}, "macro.flow_models.generate_alias_name": {"unique_id": "macro.flow_models.generate_alias_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/custom_naming_macros.sql", "original_file_path": "macros/custom_naming_macros.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(\n custom_alias_name = none,\n node = none\n ) -%}\n {% set node_name = node.name %}\n {% set split_name = node_name.split('__') %}\n {{ split_name [1] | trim }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.020305}, "macro.flow_models.task_run_sp_create_prod_clone": {"unique_id": "macro.flow_models.task_run_sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/task_run_sp_create_prod_clone.sql", "original_file_path": "macros/task_run_sp_create_prod_clone.sql", "name": "task_run_sp_create_prod_clone", "macro_sql": "{% macro task_run_sp_create_prod_clone(target_schema) -%}\n create or replace task {{target_schema}}.run_sp_create_prod_clone\n warehouse = dbt_cloud\n schedule = 'USING CRON 15 10 * * * UTC'\n as\n call {{ target_schema }}.create_prod_clone('flow', 'flow_dev', 'internal_dev');\n\n alter task {{ target_schema }}.run_sp_create_prod_clone resume\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0206048}, "macro.flow_models.sp_create_prod_clone": {"unique_id": "macro.flow_models.sp_create_prod_clone", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/sp_create_prod_clone.sql", "original_file_path": "macros/sp_create_prod_clone.sql", "name": "sp_create_prod_clone", "macro_sql": "{% macro sp_create_prod_clone(target_schema) -%}\n\ncreate or replace procedure {{ target_schema }}.create_prod_clone(source_db_name string, destination_db_name string, role_name string)\nreturns boolean \nlanguage javascript\nexecute as caller\nas\n$$\n snowflake.execute({sqlText: `BEGIN TRANSACTION;`});\n try {\n snowflake.execute({sqlText: `DROP DATABASE IF EXISTS ${DESTINATION_DB_NAME}`});\n snowflake.execute({sqlText: `CREATE DATABASE ${DESTINATION_DB_NAME} CLONE ${SOURCE_DB_NAME}`});\n snowflake.execute({sqlText: `DROP SCHEMA ${DESTINATION_DB_NAME}._INTERNAL`}); /* this only needs to be in prod */\n\n var existing_schemas = snowflake.execute({sqlText: `SELECT table_schema\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1;`});\n\n while (existing_schemas.next()) {\n var schema = existing_schemas.getColumnValue(1)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON SCHEMA ${DESTINATION_DB_NAME}.${schema} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n var existing_tables = snowflake.execute({sqlText: `SELECT table_schema, table_name\n FROM ${DESTINATION_DB_NAME}.INFORMATION_SCHEMA.TABLE_PRIVILEGES\n WHERE grantor IS NOT NULL\n GROUP BY 1,2;`});\n\n while (existing_tables.next()) {\n var schema = existing_tables.getColumnValue(1)\n var table_name = existing_tables.getColumnValue(2)\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON TABLE ${DESTINATION_DB_NAME}.${schema}.${table_name} TO ROLE ${ROLE_NAME} COPY CURRENT GRANTS;`});\n }\n\n snowflake.execute({sqlText: `GRANT OWNERSHIP ON DATABASE ${DESTINATION_DB_NAME} TO ROLE ${ROLE_NAME};`})\n snowflake.execute({sqlText: `COMMIT;`});\n } catch (err) {\n snowflake.execute({sqlText: `ROLLBACK;`});\n throw(err);\n }\n \n return true\n$$\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0211148}, "macro.flow_models.test_tx_gaps": {"unique_id": "macro.flow_models.test_tx_gaps", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/tests/tx_gaps.sql", "original_file_path": "macros/tests/tx_gaps.sql", "name": "test_tx_gaps", "macro_sql": "{% test tx_gaps(\n model,\n column_name,\n column_block,\n column_tx_count\n) %}\nWITH block_base AS (\n SELECT\n {{ column_block }},\n {{ column_tx_count }}\n FROM\n {{ ref('silver__blocks') }}\n),\nmodel_name AS (\n SELECT\n {{ column_block }},\n COUNT(\n DISTINCT {{ column_name }}\n ) AS model_tx_count\n FROM\n {{ model }}\n GROUP BY\n {{ column_block }}\n)\nSELECT\n block_base.{{ column_block }},\n {{ column_tx_count }},\n model_name.{{ column_block }},\n model_tx_count\nFROM\n block_base\n LEFT JOIN model_name\n ON block_base.{{ column_block }} = model_name.{{ column_block }}\nWHERE\n {{ column_tx_count }} <> model_tx_count {% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.021902}, "macro.flow_models.test_sequence_gaps": {"unique_id": "macro.flow_models.test_sequence_gaps", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "macros/tests/sequence_gaps.sql", "original_file_path": "macros/tests/sequence_gaps.sql", "name": "test_sequence_gaps", "macro_sql": "{% test sequence_gaps(\n model,\n partition_by,\n column_name\n) %}\n{%- set partition_sql = partition_by | join(\", \") -%}\n{%- set previous_column = \"prev_\" ~ column_name -%}\nWITH source AS (\n SELECT\n {{ partition_sql + \",\" if partition_sql }}\n {{ column_name }},\n LAG(\n {{ column_name }},\n 1\n ) over (\n {{ \"PARTITION BY \" ~ partition_sql if partition_sql }}\n ORDER BY\n {{ column_name }} ASC\n ) AS {{ previous_column }}\n FROM\n {{ model }}\n)\nSELECT\n {{ partition_sql + \",\" if partition_sql }}\n {{ previous_column }},\n {{ column_name }},\n {{ column_name }} - {{ previous_column }}\n - 1 AS gap\nFROM\n source\nWHERE\n {{ column_name }} - {{ previous_column }} <> 1\nORDER BY\n gap DESC {% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0230138}, "macro.dbt_snowflake.snowflake__get_catalog": {"unique_id": "macro.dbt_snowflake.snowflake__get_catalog", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "snowflake__get_catalog", "macro_sql": "{% macro snowflake__get_catalog(information_schema, schemas) -%}\n {% set query %}\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 comment as \"table_comment\",\n\n -- note: this is the _role_ that owns the table\n table_owner as \"table_owner\",\n\n 'Clustering Key' as \"stats:clustering_key:label\",\n clustering_key as \"stats:clustering_key:value\",\n 'The key used to cluster this table' as \"stats:clustering_key:description\",\n (clustering_key is not null) as \"stats:clustering_key:include\",\n\n 'Row Count' as \"stats:row_count:label\",\n row_count as \"stats:row_count:value\",\n 'An approximate count of rows in this table' as \"stats:row_count:description\",\n (row_count is not null) as \"stats:row_count:include\",\n\n 'Approximate Size' as \"stats:bytes:label\",\n bytes as \"stats:bytes:value\",\n 'Approximate size of the table as reported by Snowflake' as \"stats:bytes:description\",\n (bytes is not null) as \"stats:bytes:include\",\n\n 'Last Modified' as \"stats:last_modified:label\",\n to_varchar(convert_timezone('UTC', last_altered), 'yyyy-mm-dd HH24:MI'||'UTC') as \"stats:last_modified:value\",\n 'The timestamp for last update/change' as \"stats:last_modified:description\",\n (last_altered is not null and table_type='BASE TABLE') as \"stats:last_modified:include\"\n\n from {{ information_schema }}.tables\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 )\n\n select *\n from tables\n join columns using (\"table_database\", \"table_schema\", \"table_name\")\n where (\n {%- for schema in schemas -%}\n upper(\"table_schema\") = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n order by \"column_index\"\n {%- endset -%}\n\n {{ return(run_query(query)) }}\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": 1653000028.023956}, "macro.dbt_snowflake.snowflake__create_table_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_table_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_table_as", "macro_sql": "{% macro snowflake__create_table_as(temporary, relation, sql) -%}\n {%- set transient = config.get('transient', default=true) -%}\n {%- set cluster_by_keys = config.get('cluster_by', default=none) -%}\n {%- set enable_automatic_clustering = config.get('automatic_clustering', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n\n {%- if cluster_by_keys is not none and cluster_by_keys is string -%}\n {%- set cluster_by_keys = [cluster_by_keys] -%}\n {%- endif -%}\n {%- if cluster_by_keys is not none -%}\n {%- set cluster_by_string = cluster_by_keys|join(\", \")-%}\n {% else %}\n {%- set cluster_by_string = none -%}\n {%- endif -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace {% if temporary -%}\n temporary\n {%- elif transient -%}\n transient\n {%- endif %} table {{ relation }} {% if copy_grants and not temporary -%} copy grants {%- endif %} as\n (\n {%- if cluster_by_string is not none -%}\n select * from(\n {{ sql }}\n ) order by ({{ cluster_by_string }})\n {%- else -%}\n {{ sql }}\n {%- endif %}\n );\n {% if cluster_by_string is not none and not temporary -%}\n alter table {{relation}} cluster by ({{cluster_by_string}});\n {%- endif -%}\n {% if enable_automatic_clustering and cluster_by_string is not none and not temporary -%}\n alter table {{relation}} resume recluster;\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.035079}, "macro.dbt_snowflake.get_column_comment_sql": {"unique_id": "macro.dbt_snowflake.get_column_comment_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_column_comment_sql", "macro_sql": "{% macro get_column_comment_sql(column_name, column_dict) %}\n {{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} COMMENT $${{ column_dict[column_name]['description'] | replace('$', '[$]') }}$$\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0354009}, "macro.dbt_snowflake.get_persist_docs_column_list": {"unique_id": "macro.dbt_snowflake.get_persist_docs_column_list", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_persist_docs_column_list", "macro_sql": "{% macro get_persist_docs_column_list(model_columns, query_columns) %}\n(\n {% for column_name in query_columns %}\n {% if (column_name|upper in model_columns) or (column_name in model_columns) %}\n {{ get_column_comment_sql(column_name, model_columns) }}\n {% else %}\n {{column_name}}\n {% endif %}\n {{ \", \" if not loop.last else \"\" }}\n {% endfor %}\n)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0358589}, "macro.dbt_snowflake.snowflake__create_view_as": {"unique_id": "macro.dbt_snowflake.snowflake__create_view_as", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__create_view_as", "macro_sql": "{% macro snowflake__create_view_as(relation, sql) -%}\n {%- set secure = config.get('secure', default=false) -%}\n {%- set copy_grants = config.get('copy_grants', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create or replace {% if secure -%}\n secure\n {%- endif %} view {{ relation }} \n {% if config.persist_column_docs() -%}\n {% set model_columns = model.columns %}\n {% set query_columns = get_columns_in_query(sql) %}\n {{ get_persist_docs_column_list(model_columns, query_columns) }}\n \n {%- endif %}\n {% if copy_grants -%} copy grants {%- endif %} as (\n {{ sql }}\n );\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt_snowflake.get_persist_docs_column_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0366132}, "macro.dbt_snowflake.snowflake__get_columns_in_relation": {"unique_id": "macro.dbt_snowflake.snowflake__get_columns_in_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__get_columns_in_relation", "macro_sql": "{% macro snowflake__get_columns_in_relation(relation) -%}\n {%- set sql -%}\n describe table {{ 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['name'], row['type'])) %}\n {% endfor %}\n {% do return(columns) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0373828}, "macro.dbt_snowflake.snowflake__list_schemas": {"unique_id": "macro.dbt_snowflake.snowflake__list_schemas", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_schemas", "macro_sql": "{% macro snowflake__list_schemas(database) -%}\n {# 10k limit from here: https://docs.snowflake.net/manuals/sql-reference/sql/show-schemas.html#usage-notes #}\n {% set maximum = 10000 %}\n {% set sql -%}\n show terse schemas in database {{ database }}\n limit {{ maximum }}\n {%- endset %}\n {% set result = run_query(sql) %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in database {{ database }}! dbt can only get\n information about databases with fewer than {{ maximum }} schemas.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {{ return(result) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.037923}, "macro.dbt_snowflake.snowflake__list_relations_without_caching": {"unique_id": "macro.dbt_snowflake.snowflake__list_relations_without_caching", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__list_relations_without_caching", "macro_sql": "{% macro snowflake__list_relations_without_caching(schema_relation) %}\n {%- set sql -%}\n show terse objects in {{ schema_relation }}\n {%- endset -%}\n\n {%- set result = run_query(sql) -%}\n {% set maximum = 10000 %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many schemas in schema {{ schema_relation }}! dbt can only get\n information about schemas with fewer than {{ maximum }} objects.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n {%- do return(result) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.038416}, "macro.dbt_snowflake.snowflake__check_schema_exists": {"unique_id": "macro.dbt_snowflake.snowflake__check_schema_exists", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__check_schema_exists", "macro_sql": "{% macro snowflake__check_schema_exists(information_schema, schema) -%}\n {% call statement('check_schema_exists', fetch_result=True) -%}\n select count(*)\n from {{ information_schema }}.schemata\n where upper(schema_name) = upper('{{ schema }}')\n and upper(catalog_name) = upper('{{ information_schema.database }}')\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": 1653000028.038739}, "macro.dbt_snowflake.snowflake__current_timestamp": {"unique_id": "macro.dbt_snowflake.snowflake__current_timestamp", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__current_timestamp", "macro_sql": "{% macro snowflake__current_timestamp() -%}\n convert_timezone('UTC', current_timestamp())\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.03882}, "macro.dbt_snowflake.snowflake__snapshot_string_as_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_string_as_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_string_as_time", "macro_sql": "{% macro snowflake__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"to_timestamp_ntz('\" ~ timestamp ~ \"')\" -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0389912}, "macro.dbt_snowflake.snowflake__snapshot_get_time": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_get_time", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__snapshot_get_time", "macro_sql": "{% macro snowflake__snapshot_get_time() -%}\n to_timestamp_ntz({{ current_timestamp() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.03909}, "macro.dbt_snowflake.snowflake__rename_relation": {"unique_id": "macro.dbt_snowflake.snowflake__rename_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__rename_relation", "macro_sql": "{% macro snowflake__rename_relation(from_relation, to_relation) -%}\n {% call statement('rename_relation') -%}\n alter table {{ 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": 1653000028.039273}, "macro.dbt_snowflake.snowflake__alter_column_type": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_type", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_type", "macro_sql": "{% macro snowflake__alter_column_type(relation, column_name, new_column_type) -%}\n {% call statement('alter_column_type') %}\n alter table {{ relation }} alter {{ adapter.quote(column_name) }} set data type {{ new_column_type }};\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": 1653000028.039517}, "macro.dbt_snowflake.snowflake__alter_relation_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_comment", "macro_sql": "{% macro snowflake__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": 1653000028.0397198}, "macro.dbt_snowflake.snowflake__alter_column_comment": {"unique_id": "macro.dbt_snowflake.snowflake__alter_column_comment", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_column_comment", "macro_sql": "{% macro snowflake__alter_column_comment(relation, column_dict) -%}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n alter {{ relation.type }} {{ relation }} alter\n {% for column_name in column_dict if (column_name in existing_columns) or (column_name|upper in existing_columns) %}\n {{ get_column_comment_sql(column_name, column_dict) }} {{ ',' if not loop.last else ';' }}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_column_comment_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.040288}, "macro.dbt_snowflake.get_current_query_tag": {"unique_id": "macro.dbt_snowflake.get_current_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "get_current_query_tag", "macro_sql": "{% macro get_current_query_tag() -%}\n {{ return(run_query(\"show parameters like 'query_tag' in session\").rows[0]['value']) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.040469}, "macro.dbt_snowflake.set_query_tag": {"unique_id": "macro.dbt_snowflake.set_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "set_query_tag", "macro_sql": "{% macro set_query_tag() -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% set original_query_tag = get_current_query_tag() %}\n {{ log(\"Setting query_tag to '\" ~ new_query_tag ~ \"'. Will reset to '\" ~ original_query_tag ~ \"' after materialization.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(new_query_tag)) %}\n {{ return(original_query_tag)}}\n {% endif %}\n {{ return(none)}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.get_current_query_tag", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.040929}, "macro.dbt_snowflake.unset_query_tag": {"unique_id": "macro.dbt_snowflake.unset_query_tag", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "unset_query_tag", "macro_sql": "{% macro unset_query_tag(original_query_tag) -%}\n {% set new_query_tag = config.get('query_tag') %}\n {% if new_query_tag %}\n {% if original_query_tag %}\n {{ log(\"Resetting query_tag to '\" ~ original_query_tag ~ \"'.\") }}\n {% do run_query(\"alter session set query_tag = '{}'\".format(original_query_tag)) %}\n {% else %}\n {{ log(\"No original query_tag, unsetting parameter.\") }}\n {% do run_query(\"alter session unset query_tag\") %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0414028}, "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns": {"unique_id": "macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__alter_relation_add_remove_columns", "macro_sql": "{% macro snowflake__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column\n {% for column in add_columns %}\n {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n {% endif %}\n\n {% if remove_columns %}\n \n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column\n {% for column in remove_columns %}\n {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n {%- endset -%}\n \n {% do run_query(sql) %}\n \n {% endif %}\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": 1653000028.042151}, "macro.dbt_snowflake.snowflake_dml_explicit_transaction": {"unique_id": "macro.dbt_snowflake.snowflake_dml_explicit_transaction", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake_dml_explicit_transaction", "macro_sql": "{% macro snowflake_dml_explicit_transaction(dml) %}\n {#\n Use this macro to wrap all INSERT, MERGE, UPDATE, DELETE, and TRUNCATE \n statements before passing them into run_query(), or calling in the 'main' statement\n of a materialization\n #}\n {% set dml_transaction -%}\n begin;\n {{ dml }};\n commit;\n {%- endset %}\n \n {% do return(dml_transaction) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.042358}, "macro.dbt_snowflake.snowflake__truncate_relation": {"unique_id": "macro.dbt_snowflake.snowflake__truncate_relation", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "snowflake__truncate_relation", "macro_sql": "{% macro snowflake__truncate_relation(relation) -%}\n {% set truncate_dml %}\n truncate table {{ relation }}\n {% endset %}\n {% call statement('truncate_relation') -%}\n {{ snowflake_dml_explicit_transaction(truncate_dml) }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.042594}, "macro.dbt_snowflake.snowflake__get_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_merge_sql", "macro_sql": "{% macro snowflake__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) -%}\n\n {#\n Workaround for Snowflake not being happy with a merge on a constant-false predicate.\n When no unique_key is provided, this macro will do a regular insert. If a unique_key\n is provided, then this macro will do a proper merge instead.\n #}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute='name')) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set dml -%}\n {%- if unique_key is none -%}\n\n {{ sql_header if sql_header is not none }}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source_sql }}\n )\n\n {%- else -%}\n\n {{ default__get_merge_sql(target, source_sql, unique_key, dest_columns, predicates) }}\n\n {%- endif -%}\n {%- endset -%}\n \n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.default__get_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.043807}, "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__get_delete_insert_merge_sql", "macro_sql": "{% macro snowflake__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% set dml = default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0440881}, "macro.dbt_snowflake.snowflake__snapshot_merge_sql": {"unique_id": "macro.dbt_snowflake.snowflake__snapshot_merge_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/merge.sql", "original_file_path": "macros/materializations/merge.sql", "name": "snowflake__snapshot_merge_sql", "macro_sql": "{% macro snowflake__snapshot_merge_sql(target, source, insert_cols) %}\n {% set dml = default__snapshot_merge_sql(target, source, insert_cols) %}\n {% do return(snowflake_dml_explicit_transaction(dml)) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql", "macro.dbt_snowflake.snowflake_dml_explicit_transaction"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.044339}, "macro.dbt_snowflake.snowflake__load_csv_rows": {"unique_id": "macro.dbt_snowflake.snowflake__load_csv_rows", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "snowflake__load_csv_rows", "macro_sql": "{% macro snowflake__load_csv_rows(model, agate_table) %}\n {% set batch_size = get_batch_size() %}\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 %s\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query('BEGIN', auto_begin=False) %}\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n {% do adapter.add_query('COMMIT', auto_begin=False) %}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.046426}, "macro.dbt_snowflake.materialization_seed_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_seed_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "materialization_seed_snowflake", "macro_sql": "{% materialization seed, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_seed_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_seed_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.046717}, "macro.dbt_snowflake.materialization_view_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_view_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_snowflake", "macro_sql": "{% materialization view, adapter='snowflake' -%}\n\n {% set original_query_tag = set_query_tag() %}\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n {% do persist_docs(target_relation, model, for_columns=false) %}\n\n {% do return(to_return) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.create_or_replace_view", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.047307}, "macro.dbt_snowflake.materialization_table_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_table_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_snowflake", "macro_sql": "{% materialization table, adapter='snowflake' %}\n\n {% set original_query_tag = set_query_tag() %}\n\n {%- set identifier = model['alias'] -%}\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, type='table') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#-- Drop the relation if it was a view to \"convert\" it in a table. This may lead to\n -- downtime, but it should be a relatively infrequent occurrence #}\n {% if old_relation is not none and not old_relation.is_table %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ drop_relation_if_exists(old_relation) }}\n {% endif %}\n\n --build model\n {% call statement('main') -%}\n {{ create_table_as(false, target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0487208}, "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_snowflake_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"merge\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'delete+insert'\n {%- endset %}\n {% if strategy not in ['merge', 'delete+insert'] %}\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": 1653000028.050046}, "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql": {"unique_id": "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_snowflake_get_incremental_sql", "macro_sql": "{% macro dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n {% if strategy == 'merge' %}\n {% do return(get_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% elif strategy == 'delete+insert' %}\n {% do return(get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% else %}\n {% do exceptions.raise_compiler_error('invalid strategy: ' ~ strategy) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql", "macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.050572}, "macro.dbt_snowflake.materialization_incremental_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_incremental_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_snowflake", "macro_sql": "{% materialization incremental, adapter='snowflake' -%}\n \n {% set original_query_tag = set_query_tag() %}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set target_relation = this %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_snowflake_validate_get_incremental_strategy(config) -%}\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif existing_relation.is_view %}\n {#-- 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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% elif full_refresh_mode %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = dbt_snowflake_get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = target_relation.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_snowflake.dbt_snowflake_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt_snowflake.dbt_snowflake_get_incremental_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.052608}, "macro.dbt_snowflake.materialization_snapshot_snowflake": {"unique_id": "macro.dbt_snowflake.materialization_snapshot_snowflake", "package_name": "dbt_snowflake", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/snowflake", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "materialization_snapshot_snowflake", "macro_sql": "{% materialization snapshot, adapter='snowflake' %}\n {% set original_query_tag = set_query_tag() %}\n\n {% set relations = materialization_snapshot_default() %}\n\n {% do unset_query_tag(original_query_tag) %}\n\n {{ return(relations) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.set_query_tag", "macro.dbt.materialization_snapshot_default", "macro.dbt_snowflake.unset_query_tag"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.053022}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.054097}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.054288}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0544262}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.054562}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.054698}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.055113}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.05541}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.055703}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0561762}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.05644}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.059627}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.059794}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0600069}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.060145}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.060236}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.060989}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0611541}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.061331}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\n {%- set ns = namespace() -%} {# handle for-loop scoping with a namespace #}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0623438}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.06421}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.067314}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.067589}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.067752}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0678341}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0680351}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select \n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n \n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n \n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.06889}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0690749}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.069321}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0697432}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.07549}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n \n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n \n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n \n {% do relations.append(target_relation) %}\n \n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n \n {{ adapter.commit() }}\n \n {% else %}\n\n {% set main_sql = sql %}\n \n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n \n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.077526}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.078012}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0783098}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0787241}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.079097}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n \n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.079909}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n \n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n \n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.080439}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n \n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }} \n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.081045}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0837162}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ predicates | join(' and ') }}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0848389}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.085068}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.085475}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.085731}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0863428}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.087026}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {% set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %} \n {% do adapter.rename_relation(target_relation, backup_relation) %} \n {% do adapter.rename_relation(intermediate_relation, target_relation) %} \n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.0919108}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n \n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n \n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n \n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.096472}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n \n {% set schema_changed = False %}\n \n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n \n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n \n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.097665}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n \n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n \n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %} \n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n \n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n \n {% do log(schema_change_message) %}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.098859}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n \n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n \n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n \n {% if schema_changes_dict['schema_changed'] %}\n \n {% if on_schema_change == 'fail' %}\n \n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways: \n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n {% endset %}\n \n {% do exceptions.raise_compiler_error(fail_msg) %}\n \n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n \n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n \n {% endif %}\n \n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n \n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.09957}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.103157}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.103628}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.103809}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.104007}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n \n {{ sql_header if sql_header is not none }}\n \n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.104407}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"old_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.134515}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.135046}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1352708}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.136503}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1369169}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.137079}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.137255}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.137513}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set agate_table = load_agate_table() -%}\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.140299}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.144127}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.145015}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1452448}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1457229}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1458628}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.145977}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.146136}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.146247}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.146711}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.146951}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1481411}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.14858}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.148801}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.149355}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1496089}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.149886}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.150326}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.150568}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.150961}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1511931}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1514869}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.152085}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.153197}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.153759}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.154048}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.155734}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.156982}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.157718}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.15795}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.15837}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.15855}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.15871}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.15889}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1593752}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1595058}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.159661}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1600482}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.161588}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.161886}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1620648}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1622689}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.162446}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1625988}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1627939}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1630652}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.16331}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1639218}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.164156}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.164348}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.164865}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter '+adapter.type()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.165012}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.165236}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.165649}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.166336}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1665}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.166702}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.166862}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.16713}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1676002}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.168981}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.16923}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.169413}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1695611}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.169738}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1699798}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.17018}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1705449}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1707299}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1708858}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.172554}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.172713}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.173017}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.173194}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.173532}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.173755}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1743412}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_snowflake.snowflake__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.174591}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n \n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n \n {% set sql -%}\n \n alter {{ relation.type }} {{ relation }}\n \n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n \n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1753569}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.175906}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1761322}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1764119}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.176682}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.176988}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.177061}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1771278}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.177508}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n \n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.177666}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.177972}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.178157}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.178855}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1789272}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.178998}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179064}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.17913}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179286}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1793542}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179422}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179486}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1796422}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179709}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.179777}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1799319}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.180001}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.180067}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.18022}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.180287}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.180352}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1805608}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.180632}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1806972}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.181195}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1815412}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.181647}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1817431}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.182326}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.182486}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.182642}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.182793}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.182985}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.183284}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.183357}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.183423}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1838021}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.183938}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.184072}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.184205}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.184777}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.184906}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.185054}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.185277}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.187424}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.18782}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.188095}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n \n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.188478}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %} \n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1894028}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.191941}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.192099}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.192251}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt_utils.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.193984}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.194182}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.194592}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1947289}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.19485}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1949692}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.195306}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1954439}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.195568}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.195921}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.196059}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.196183}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1966841}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.196785}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1968791}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.197214}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.197312}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1974149}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.197818}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1979468}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1980941}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.198451}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.198551}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199126}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199234}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199302}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199368}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199525}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.1996312}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199775}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.199882}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.20001}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.201389}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.201844}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.type_numeric() ) }}\n = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.202293}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2024782}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.202857}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.202958}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.20306}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.203156}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.203737}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.204067}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2042098}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2045949}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.204768}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.206176}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2063382}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "_split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }}) \n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.206552}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.206881}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "redshift__split_part", "macro_sql": "{% macro redshift__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2072058}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n {% else %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset(\n length({{ string_text }}) \n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 1\n )]\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.207556}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2079391}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.208066}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.208193}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.209051}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.21452}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.215018}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2153332}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2158132}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.220997}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.221431}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.221907}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.222423}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2230709}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.223436}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2237508}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2243168}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.224534}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.224969}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'coalesce(diff_count, 0)') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2252648}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.22594}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.226272}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2267132}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.227036}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.227401}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.227572}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.228201}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.228729}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.229311}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2296782}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.230131}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.230294}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.230667}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2308412}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.231471}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.232099}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2326882}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.233025}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.233526}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.233807}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2342799}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\nwith validation as (\n select\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n),\nvalidation_errors as (\n select\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2347798}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.235452}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2361128}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2365801}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.236744}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2375}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt_utils.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2383628}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.24129}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions nore cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.242742}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.243066}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2432299}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.243556}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2437508}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2440572}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.244231}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.244742}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2454479}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{dbt_utils.datediff(start_date, end_date, datepart)}}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.246027}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2462552}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt_utils.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2466052}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2469609}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2473679}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.24806}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.248918}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.249734}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.250147}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2503328}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2508428}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.251542}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.252383}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.252834}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2531111}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.253737}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('*') }}\n {% endif %}\n\n {%- for col in dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2545621}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.256233}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.258284}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.260658}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.263495}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.26385}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.264095}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by=none, relation_alias=none) -%}\n\n {%- set error_message_group_by -%}\nWarning: the `group_by` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nUse `partition_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if kwargs.get('group_by') %}\n {%- do exceptions.warn(error_message_group_by) -%}\n {%- endif -%}\n\n {%- set error_message_order_by -%}\nWarning: `order_by` as an optional parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nSupply a non-null value for `order_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if not order_by %}\n {%- do exceptions.warn(error_message_order_by) -%}\n {%- endif -%}\n\n {%- set error_message_alias -%}\nWarning: the `relation_alias` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nIf you were using `relation_alias` to point to a CTE previously then you can now pass the alias directly to `relation` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if relation_alias %}\n {%- do exceptions.warn(error_message_alias) -%}\n {%- endif -%}\n\n {% set partition_by = partition_by or kwargs.get('group_by') %}\n {% set relation = relation_alias or relation %}\n {% set order_by = order_by or \"'1'\" %}\n\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.snowflake__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.266442}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.266655}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.26685}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.267036}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.267194}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2673569}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.267961}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.268873}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.269297}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.269569}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.269948}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.270276}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2717462}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.272012}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2727811}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.273282}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.274373}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.275865}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.276914}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.277749}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2782478}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return('') }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.278971}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2793999}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2799811}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.280475}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2805572}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.280638}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.280715}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2817311}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.282005}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.282924}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.28379}, "macro.dbt_date.get_date_dimension": {"unique_id": "macro.dbt_date.get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "get_date_dimension", "macro_sql": "{% macro get_date_dimension(start_date, end_date) %}\n {{ adapter.dispatch('get_date_dimension', 'dbt_date') (start_date, end_date) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_date_dimension"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.291575}, "macro.dbt_date.default__get_date_dimension": {"unique_id": "macro.dbt_date.default__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "default__get_date_dimension", "macro_sql": "{% macro default__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=false) }} as day_of_week,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week_iso,\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'quarter') }} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.293819}, "macro.dbt_date.postgres__get_date_dimension": {"unique_id": "macro.dbt_date.postgres__get_date_dimension", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_date_dimension.sql", "original_file_path": "macros/get_date_dimension.sql", "name": "postgres__get_date_dimension", "macro_sql": "{% macro postgres__get_date_dimension(start_date, end_date) %}\nwith base_dates as (\n {{ dbt_date.get_base_dates(start_date, end_date) }}\n),\ndates_with_prior_year_dates as (\n\n select\n cast(d.date_day as date) as date_day,\n cast({{ dbt_utils.dateadd('year', -1 , 'd.date_day') }} as date) as prior_year_date_day,\n cast({{ dbt_utils.dateadd('day', -364 , 'd.date_day') }} as date) as prior_year_over_year_date_day\n from\n \tbase_dates d\n\n)\nselect\n d.date_day,\n {{ dbt_date.yesterday('d.date_day') }} as prior_date_day,\n {{ dbt_date.tomorrow('d.date_day') }} as next_date_day,\n d.prior_year_date_day as prior_year_date_day,\n d.prior_year_over_year_date_day,\n {{ dbt_date.day_of_week('d.date_day', isoweek=true) }} as day_of_week,\n\n {{ dbt_date.day_name('d.date_day', short=false) }} as day_of_week_name,\n {{ dbt_date.day_name('d.date_day', short=true) }} as day_of_week_name_short,\n {{ dbt_date.day_of_month('d.date_day') }} as day_of_month,\n {{ dbt_date.day_of_year('d.date_day') }} as day_of_year,\n\n {{ dbt_date.week_start('d.date_day') }} as week_start_date,\n {{ dbt_date.week_end('d.date_day') }} as week_end_date,\n {{ dbt_date.week_start('d.prior_year_over_year_date_day') }} as prior_year_week_start_date,\n {{ dbt_date.week_end('d.prior_year_over_year_date_day') }} as prior_year_week_end_date,\n {{ dbt_date.week_of_year('d.date_day') }} as week_of_year,\n\n {{ dbt_date.iso_week_start('d.date_day') }} as iso_week_start_date,\n {{ dbt_date.iso_week_end('d.date_day') }} as iso_week_end_date,\n {{ dbt_date.iso_week_start('d.prior_year_over_year_date_day') }} as prior_year_iso_week_start_date,\n {{ dbt_date.iso_week_end('d.prior_year_over_year_date_day') }} as prior_year_iso_week_end_date,\n {{ dbt_date.iso_week_of_year('d.date_day') }} as iso_week_of_year,\n\n {{ dbt_date.week_of_year('d.prior_year_over_year_date_day') }} as prior_year_week_of_year,\n {{ dbt_date.iso_week_of_year('d.prior_year_over_year_date_day') }} as prior_year_iso_week_of_year,\n\n cast({{ dbt_date.date_part('month', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as month_of_year,\n {{ dbt_date.month_name('d.date_day', short=false) }} as month_name,\n {{ dbt_date.month_name('d.date_day', short=true) }} as month_name_short,\n\n cast({{ dbt_utils.date_trunc('month', 'd.date_day') }} as date) as month_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'month') }} as date) as month_end_date,\n\n cast({{ dbt_utils.date_trunc('month', 'd.prior_year_date_day') }} as date) as prior_year_month_start_date,\n cast({{ dbt_utils.last_day('d.prior_year_date_day', 'month') }} as date) as prior_year_month_end_date,\n\n cast({{ dbt_date.date_part('quarter', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as quarter_of_year,\n cast({{ dbt_utils.date_trunc('quarter', 'd.date_day') }} as date) as quarter_start_date,\n {# dbt_utils.last_day does not support quarter because postgresql does not support quarter interval. #}\n cast({{dbt_utils.dateadd('day', '-1', dbt_utils.dateadd('month', '3', dbt_utils.date_trunc('quarter', 'd.date_day')))}} as date) as quarter_end_date,\n\n cast({{ dbt_date.date_part('year', 'd.date_day') }} as {{ dbt_utils.type_int() }}) as year_number,\n cast({{ dbt_utils.date_trunc('year', 'd.date_day') }} as date) as year_start_date,\n cast({{ dbt_utils.last_day('d.date_day', 'year') }} as date) as year_end_date\nfrom\n dates_with_prior_year_dates d\norder by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_base_dates", "macro.dbt_utils.dateadd", "macro.dbt_date.yesterday", "macro.dbt_date.tomorrow", "macro.dbt_date.day_of_week", "macro.dbt_date.day_name", "macro.dbt_date.day_of_month", "macro.dbt_date.day_of_year", "macro.dbt_date.week_start", "macro.dbt_date.week_end", "macro.dbt_date.week_of_year", "macro.dbt_date.iso_week_start", "macro.dbt_date.iso_week_end", "macro.dbt_date.iso_week_of_year", "macro.dbt_date.date_part", "macro.dbt_utils.type_int", "macro.dbt_date.month_name", "macro.dbt_utils.date_trunc", "macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.296163}, "macro.dbt_date.get_base_dates": {"unique_id": "macro.dbt_date.get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "get_base_dates", "macro_sql": "{% macro get_base_dates(start_date=None, end_date=None, n_dateparts=None, datepart=\"day\") %}\n {{ adapter.dispatch('get_base_dates', 'dbt_date') (start_date, end_date, n_dateparts, datepart) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_base_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.297154}, "macro.dbt_date.default__get_base_dates": {"unique_id": "macro.dbt_date.default__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "default__get_base_dates", "macro_sql": "{% macro default__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as \" ~ dbt_utils.type_timestamp() ~ \")\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.297898}, "macro.dbt_date.bigquery__get_base_dates": {"unique_id": "macro.dbt_date.bigquery__get_base_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/get_base_dates.sql", "original_file_path": "macros/get_base_dates.sql", "name": "bigquery__get_base_dates", "macro_sql": "{% macro bigquery__get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n{%- if start_date and end_date -%}\n{%- set start_date=\"cast('\" ~ start_date ~ \"' as date )\" -%}\n{%- set end_date=\"cast('\" ~ end_date ~ \"' as date )\" -%}\n\n{%- elif n_dateparts and datepart -%}\n\n{%- set start_date = dbt_utils.dateadd(datepart, -1 * n_dateparts, dbt_date.today()) -%}\n{%- set end_date = dbt_date.tomorrow() -%}\n{%- endif -%}\n\nwith date_spine as\n(\n\n {{ dbt_utils.date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n)\nselect\n cast(d.date_{{ datepart }} as {{ dbt_utils.type_timestamp() }}) as date_{{ datepart }}\nfrom\n date_spine d\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_date.today", "macro.dbt_date.tomorrow", "macro.dbt_utils.date_spine", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.2985668}, "macro.dbt_date.get_fiscal_year_dates": {"unique_id": "macro.dbt_date.get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "get_fiscal_year_dates", "macro_sql": "{% macro get_fiscal_year_dates(dates, year_end_month=12, week_start_day=1, shift_year=1) %}\n{{ adapter.dispatch('get_fiscal_year_dates', 'dbt_date') (dates, year_end_month, week_start_day, shift_year) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__get_fiscal_year_dates"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.300193}, "macro.dbt_date.default__get_fiscal_year_dates": {"unique_id": "macro.dbt_date.default__get_fiscal_year_dates", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_year_dates.sql", "original_file_path": "macros/fiscal_date/get_fiscal_year_dates.sql", "name": "default__get_fiscal_year_dates", "macro_sql": "{% macro default__get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) %}\n-- this gets all the dates within a fiscal year\n-- determined by the given year-end-month\n-- ending on the saturday closest to that month's end date\nwith date_dimension as (\n select * from {{ dates }}\n),\nyear_month_end as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.month_end_date\n from\n date_dimension d\n where\n d.month_of_year = {{ year_end_month }}\n group by 1,2\n\n),\nweeks as (\n\n select\n d.year_number,\n d.month_of_year,\n d.date_day as week_start_date,\n cast({{ dbt_utils.dateadd('day', 6, 'd.date_day') }} as date) as week_end_date\n from\n date_dimension d\n where\n d.day_of_week = {{ week_start_day }}\n\n),\n-- get all the weeks that start in the month the year ends\nyear_week_ends as (\n\n select\n d.year_number - {{ shift_year }} as fiscal_year_number,\n d.week_end_date\n from\n weeks d\n where\n d.month_of_year = {{ year_end_month }}\n group by\n 1,2\n\n),\n-- then calculate which Saturday is closest to month end\nweeks_at_month_end as (\n\n select\n d.fiscal_year_number,\n d.week_end_date,\n m.month_end_date,\n rank() over\n (partition by d.fiscal_year_number\n order by\n abs({{ dbt_utils.datediff('d.week_end_date', 'm.month_end_date', 'day') }})\n\n ) as closest_to_month_end\n from\n year_week_ends d\n join\n year_month_end m on d.fiscal_year_number = m.fiscal_year_number\n),\nfiscal_year_range as (\n\n select\n w.fiscal_year_number,\n cast(\n {{ dbt_utils.dateadd('day', 1,\n 'lag(w.week_end_date) over(order by w.week_end_date)') }}\n as date) as fiscal_year_start_date,\n w.week_end_date as fiscal_year_end_date\n from\n weeks_at_month_end w\n where\n w.closest_to_month_end = 1\n\n),\nfiscal_year_dates as (\n\n select\n d.date_day,\n m.fiscal_year_number,\n m.fiscal_year_start_date,\n m.fiscal_year_end_date,\n w.week_start_date,\n w.week_end_date,\n -- we reset the weeks of the year starting with the merch year start date\n dense_rank()\n over(\n partition by m.fiscal_year_number\n order by w.week_start_date\n ) as fiscal_week_of_year\n from\n date_dimension d\n join\n fiscal_year_range m on d.date_day between m.fiscal_year_start_date and m.fiscal_year_end_date\n join\n weeks w on d.date_day between w.week_start_date and w.week_end_date\n\n)\nselect * from fiscal_year_dates order by 1\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.30075}, "macro.dbt_date.get_fiscal_periods": {"unique_id": "macro.dbt_date.get_fiscal_periods", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/fiscal_date/get_fiscal_periods.sql", "original_file_path": "macros/fiscal_date/get_fiscal_periods.sql", "name": "get_fiscal_periods", "macro_sql": "{% macro get_fiscal_periods(dates, year_end_month, week_start_day, shift_year=1) %}\n{# \nThis macro requires you to pass in a ref to a date dimension, created via\ndbt_date.get_date_dimension()s\n#}\nwith fscl_year_dates_for_periods as (\n {{ dbt_date.get_fiscal_year_dates(dates, year_end_month, week_start_day, shift_year) }}\n),\nfscl_year_w13 as (\n\n select\n f.*,\n -- We count the weeks in a 13 week period\n -- and separate the 4-5-4 week sequences\n mod(cast(\n (f.fiscal_week_of_year-1) as {{ dbt_utils.type_int() }}\n ), 13) as w13_number,\n -- Chop weeks into 13 week merch quarters\n cast(\n least(\n floor((f.fiscal_week_of_year-1)/13.0)\n , 3)\n as {{ dbt_utils.type_int() }}) as quarter_number\n from\n fscl_year_dates_for_periods f\n\n),\nfscl_periods as (\n\n select\n f.date_day,\n f.fiscal_year_number,\n f.week_start_date,\n f.week_end_date,\n f.fiscal_week_of_year,\n case \n -- we move week 53 into the 3rd period of the quarter\n when f.fiscal_week_of_year = 53 then 3\n when f.w13_number between 0 and 3 then 1\n when f.w13_number between 4 and 8 then 2\n when f.w13_number between 9 and 12 then 3\n end as period_of_quarter,\n f.quarter_number\n from\n fscl_year_w13 f\n\n),\nfscl_periods_quarters as (\n\n select\n f.*,\n cast((\n (f.quarter_number * 3) + f.period_of_quarter\n ) as {{ dbt_utils.type_int() }}) as fiscal_period_number\n from\n fscl_periods f\n\n)\nselect\n date_day,\n fiscal_year_number,\n week_start_date,\n week_end_date,\n fiscal_week_of_year, \n dense_rank() over(partition by fiscal_period_number order by fiscal_week_of_year) as fiscal_week_of_period,\n fiscal_period_number,\n quarter_number+1 as fiscal_quarter_number,\n period_of_quarter as fiscal_period_of_quarter\nfrom \n fscl_periods_quarters \norder by 1,2\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.get_fiscal_year_dates", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.301667}, "macro.dbt_date.tomorrow": {"unique_id": "macro.dbt_date.tomorrow", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/tomorrow.sql", "original_file_path": "macros/calendar_date/tomorrow.sql", "name": "tomorrow", "macro_sql": "{%- macro tomorrow(date=None, tz=None) -%}\n{{ dbt_date.n_days_away(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.301945}, "macro.dbt_date.next_week": {"unique_id": "macro.dbt_date.next_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_week.sql", "original_file_path": "macros/calendar_date/next_week.sql", "name": "next_week", "macro_sql": "{%- macro next_week(tz=None) -%}\n{{ dbt_date.n_weeks_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.302185}, "macro.dbt_date.next_month_name": {"unique_id": "macro.dbt_date.next_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_name.sql", "original_file_path": "macros/calendar_date/next_month_name.sql", "name": "next_month_name", "macro_sql": "{%- macro next_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.next_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.302492}, "macro.dbt_date.next_month": {"unique_id": "macro.dbt_date.next_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month.sql", "original_file_path": "macros/calendar_date/next_month.sql", "name": "next_month", "macro_sql": "{%- macro next_month(tz=None) -%}\n{{ dbt_date.n_months_away(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3027341}, "macro.dbt_date.day_name": {"unique_id": "macro.dbt_date.day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "day_name", "macro_sql": "{%- macro day_name(date, short=True) -%}\n {{ adapter.dispatch('day_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.30336}, "macro.dbt_date.default__day_name": {"unique_id": "macro.dbt_date.default__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "default__day_name", "macro_sql": "\n\n{%- macro default__day_name(date, short) -%}\n{%- set f = 'Dy' if short else 'Day' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.303554}, "macro.dbt_date.snowflake__day_name": {"unique_id": "macro.dbt_date.snowflake__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "snowflake__day_name", "macro_sql": "\n\n{%- macro snowflake__day_name(date, short) -%}\n {%- if short -%}\n dayname({{ date }})\n {%- else -%}\n -- long version not implemented on Snowflake so we're doing it manually :/\n case dayname({{ date }})\n when 'Mon' then 'Monday'\n when 'Tue' then 'Tuesday'\n when 'Wed' then 'Wednesday'\n when 'Thu' then 'Thursday'\n when 'Fri' then 'Friday'\n when 'Sat' then 'Saturday'\n when 'Sun' then 'Sunday'\n end\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.303749}, "macro.dbt_date.bigquery__day_name": {"unique_id": "macro.dbt_date.bigquery__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "bigquery__day_name", "macro_sql": "\n\n{%- macro bigquery__day_name(date, short) -%}\n{%- set f = '%a' if short else '%A' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.303949}, "macro.dbt_date.postgres__day_name": {"unique_id": "macro.dbt_date.postgres__day_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_name.sql", "original_file_path": "macros/calendar_date/day_name.sql", "name": "postgres__day_name", "macro_sql": "\n\n{%- macro postgres__day_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMDy' if short else 'FMDay' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3041449}, "macro.dbt_date.to_unixtimestamp": {"unique_id": "macro.dbt_date.to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "to_unixtimestamp", "macro_sql": "{%- macro to_unixtimestamp(timestamp) -%}\n {{ adapter.dispatch('to_unixtimestamp', 'dbt_date') (timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__to_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3044941}, "macro.dbt_date.default__to_unixtimestamp": {"unique_id": "macro.dbt_date.default__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "default__to_unixtimestamp", "macro_sql": "\n\n{%- macro default__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.304627}, "macro.dbt_date.snowflake__to_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "snowflake__to_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__to_unixtimestamp(timestamp) -%}\n {{ dbt_date.date_part('epoch_seconds', timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.304758}, "macro.dbt_date.bigquery__to_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__to_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/to_unixtimestamp.sql", "original_file_path": "macros/calendar_date/to_unixtimestamp.sql", "name": "bigquery__to_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__to_unixtimestamp(timestamp) -%}\n unix_seconds({{ timestamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3048582}, "macro.dbt_date.n_days_away": {"unique_id": "macro.dbt_date.n_days_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_away.sql", "original_file_path": "macros/calendar_date/n_days_away.sql", "name": "n_days_away", "macro_sql": "{%- macro n_days_away(n, date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(-1 * n, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.305217}, "macro.dbt_date.week_start": {"unique_id": "macro.dbt_date.week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "week_start", "macro_sql": "{%- macro week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3057249}, "macro.dbt_date.default__week_start": {"unique_id": "macro.dbt_date.default__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "default__week_start", "macro_sql": "{%- macro default__week_start(date) -%}\ncast({{ dbt_utils.date_trunc('week', date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3058681}, "macro.dbt_date.snowflake__week_start": {"unique_id": "macro.dbt_date.snowflake__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "snowflake__week_start", "macro_sql": "\n\n{%- macro snowflake__week_start(date) -%}\n {#\n Get the day of week offset: e.g. if the date is a Sunday,\n dbt_date.day_of_week returns 1, so we subtract 1 to get a 0 offset\n #}\n {% set off_set = dbt_date.day_of_week(date, isoweek=False) ~ \" - 1\" %}\n cast({{ dbt_utils.dateadd(\"day\", \"-1 * (\" ~ off_set ~ \")\", date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.day_of_week", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3061519}, "macro.dbt_date.postgres__week_start": {"unique_id": "macro.dbt_date.postgres__week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_start.sql", "original_file_path": "macros/calendar_date/week_start.sql", "name": "postgres__week_start", "macro_sql": "\n\n{%- macro postgres__week_start(date) -%}\n-- Sunday as week start date\ncast({{ dbt_utils.dateadd('day', -1, dbt_utils.date_trunc('week', dbt_utils.dateadd('day', 1, date))) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.30641}, "macro.dbt_date.iso_week_start": {"unique_id": "macro.dbt_date.iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "iso_week_start", "macro_sql": "{%- macro iso_week_start(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_start', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.306933}, "macro.dbt_date._iso_week_start": {"unique_id": "macro.dbt_date._iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "_iso_week_start", "macro_sql": "{%- macro _iso_week_start(date, week_type) -%}\ncast({{ dbt_utils.date_trunc(week_type, date) }} as date)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.307085}, "macro.dbt_date.default__iso_week_start": {"unique_id": "macro.dbt_date.default__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "default__iso_week_start", "macro_sql": "\n\n{%- macro default__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3072178}, "macro.dbt_date.snowflake__iso_week_start": {"unique_id": "macro.dbt_date.snowflake__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "snowflake__iso_week_start", "macro_sql": "\n\n{%- macro snowflake__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.30735}, "macro.dbt_date.postgres__iso_week_start": {"unique_id": "macro.dbt_date.postgres__iso_week_start", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_start.sql", "original_file_path": "macros/calendar_date/iso_week_start.sql", "name": "postgres__iso_week_start", "macro_sql": "\n\n{%- macro postgres__iso_week_start(date) -%}\n{{ dbt_date._iso_week_start(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_start"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.307482}, "macro.dbt_date.n_days_ago": {"unique_id": "macro.dbt_date.n_days_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_days_ago.sql", "original_file_path": "macros/calendar_date/n_days_ago.sql", "name": "n_days_ago", "macro_sql": "{%- macro n_days_ago(n, date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{%- set n = n|int -%}\ncast({{ dbt_utils.dateadd('day', -1 * n, dt) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.307945}, "macro.dbt_date.last_week": {"unique_id": "macro.dbt_date.last_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_week.sql", "original_file_path": "macros/calendar_date/last_week.sql", "name": "last_week", "macro_sql": "{%- macro last_week(tz=None) -%}\n{{ dbt_date.n_weeks_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_weeks_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3081841}, "macro.dbt_date.now": {"unique_id": "macro.dbt_date.now", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/now.sql", "original_file_path": "macros/calendar_date/now.sql", "name": "now", "macro_sql": "{%- macro now(tz=None) -%}\n{{ dbt_date.convert_timezone(dbt_utils.current_timestamp(), tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.convert_timezone", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.308439}, "macro.dbt_date.periods_since": {"unique_id": "macro.dbt_date.periods_since", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/periods_since.sql", "original_file_path": "macros/calendar_date/periods_since.sql", "name": "periods_since", "macro_sql": "{%- macro periods_since(date_col, period_name='day', tz=None) -%}\n{{ dbt_utils.datediff(date_col, dbt_date.now(tz), period_name) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.308751}, "macro.dbt_date.today": {"unique_id": "macro.dbt_date.today", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/today.sql", "original_file_path": "macros/calendar_date/today.sql", "name": "today", "macro_sql": "{%- macro today(tz=None) -%}\ncast({{ dbt_date.now(tz) }} as date)\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3089821}, "macro.dbt_date.last_month": {"unique_id": "macro.dbt_date.last_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month.sql", "original_file_path": "macros/calendar_date/last_month.sql", "name": "last_month", "macro_sql": "{%- macro last_month(tz=None) -%}\n{{ dbt_date.n_months_ago(1, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_months_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.309218}, "macro.dbt_date.day_of_year": {"unique_id": "macro.dbt_date.day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "day_of_year", "macro_sql": "{%- macro day_of_year(date) -%}\n{{ adapter.dispatch('day_of_year', 'dbt_date') (date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__day_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.309571}, "macro.dbt_date.default__day_of_year": {"unique_id": "macro.dbt_date.default__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "default__day_of_year", "macro_sql": "\n\n{%- macro default__day_of_year(date) -%}\n {{ dbt_date.date_part('dayofyear', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3097029}, "macro.dbt_date.postgres__day_of_year": {"unique_id": "macro.dbt_date.postgres__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "postgres__day_of_year", "macro_sql": "\n\n{%- macro postgres__day_of_year(date) -%}\n {{ dbt_date.date_part('doy', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.309838}, "macro.dbt_date.redshift__day_of_year": {"unique_id": "macro.dbt_date.redshift__day_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_year.sql", "original_file_path": "macros/calendar_date/day_of_year.sql", "name": "redshift__day_of_year", "macro_sql": "\n\n{%- macro redshift__day_of_year(date) -%}\n cast({{ dbt_date.date_part('dayofyear', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.310011}, "macro.dbt_date.from_unixtimestamp": {"unique_id": "macro.dbt_date.from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "from_unixtimestamp", "macro_sql": "{%- macro from_unixtimestamp(epochs, format=\"seconds\") -%}\n {{ adapter.dispatch('from_unixtimestamp', 'dbt_date') (epochs, format) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__from_unixtimestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.311216}, "macro.dbt_date.default__from_unixtimestamp": {"unique_id": "macro.dbt_date.default__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "default__from_unixtimestamp", "macro_sql": "\n\n{%- macro default__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp({{ epochs }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3114681}, "macro.dbt_date.postgres__from_unixtimestamp": {"unique_id": "macro.dbt_date.postgres__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "postgres__from_unixtimestamp", "macro_sql": "\n\n{%- macro postgres__from_unixtimestamp(epochs, format=\"seconds\") -%}\n {%- if format != \"seconds\" -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n cast(to_timestamp({{ epochs }}) at time zone 'UTC' as timestamp)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3117208}, "macro.dbt_date.snowflake__from_unixtimestamp": {"unique_id": "macro.dbt_date.snowflake__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "snowflake__from_unixtimestamp", "macro_sql": "\n\n{%- macro snowflake__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n {%- set scale = 0 -%}\n {%- elif format == \"milliseconds\" -%}\n {%- set scale = 3 -%}\n {%- elif format == \"microseconds\" -%}\n {%- set scale = 6 -%}\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n to_timestamp_ntz({{ epochs }}, {{ scale }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.312174}, "macro.dbt_date.bigquery__from_unixtimestamp": {"unique_id": "macro.dbt_date.bigquery__from_unixtimestamp", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/from_unixtimestamp.sql", "original_file_path": "macros/calendar_date/from_unixtimestamp.sql", "name": "bigquery__from_unixtimestamp", "macro_sql": "\n\n{%- macro bigquery__from_unixtimestamp(epochs, format) -%}\n {%- if format == \"seconds\" -%}\n timestamp_seconds({{ epochs }})\n {%- elif format == \"milliseconds\" -%}\n timestamp_millis({{ epochs }})\n {%- elif format == \"microseconds\" -%}\n timestamp_micros({{ epochs }})\n {%- else -%}\n {{ exceptions.raise_compiler_error(\n \"value \" ~ format ~ \" for `format` for from_unixtimestamp is not supported.\"\n )\n }}\n {% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.312546}, "macro.dbt_date.n_months_ago": {"unique_id": "macro.dbt_date.n_months_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_ago.sql", "original_file_path": "macros/calendar_date/n_months_ago.sql", "name": "n_months_ago", "macro_sql": "{%- macro n_months_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.312976}, "macro.dbt_date.date_part": {"unique_id": "macro.dbt_date.date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "date_part", "macro_sql": "{% macro date_part(datepart, date) -%}\n {{ adapter.dispatch('date_part', 'dbt_date') (datepart, date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.313314}, "macro.dbt_date.default__date_part": {"unique_id": "macro.dbt_date.default__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "default__date_part", "macro_sql": "{% macro default__date_part(datepart, date) -%}\n date_part('{{ datepart }}', {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3134441}, "macro.dbt_date.bigquery__date_part": {"unique_id": "macro.dbt_date.bigquery__date_part", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/date_part.sql", "original_file_path": "macros/calendar_date/date_part.sql", "name": "bigquery__date_part", "macro_sql": "{% macro bigquery__date_part(datepart, date) -%}\n extract({{ datepart }} from {{ date }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.313571}, "macro.dbt_date.n_weeks_away": {"unique_id": "macro.dbt_date.n_weeks_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_away.sql", "original_file_path": "macros/calendar_date/n_weeks_away.sql", "name": "n_weeks_away", "macro_sql": "{%- macro n_weeks_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.313974}, "macro.dbt_date.day_of_month": {"unique_id": "macro.dbt_date.day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "day_of_month", "macro_sql": "{%- macro day_of_month(date) -%}\n{{ dbt_date.date_part('day', date) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3142369}, "macro.dbt_date.redshift__day_of_month": {"unique_id": "macro.dbt_date.redshift__day_of_month", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_month.sql", "original_file_path": "macros/calendar_date/day_of_month.sql", "name": "redshift__day_of_month", "macro_sql": "\n\n{%- macro redshift__day_of_month(date) -%}\ncast({{ dbt_date.date_part('day', date) }} as {{ dbt_utils.type_bigint() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.314413}, "macro.dbt_date.yesterday": {"unique_id": "macro.dbt_date.yesterday", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/yesterday.sql", "original_file_path": "macros/calendar_date/yesterday.sql", "name": "yesterday", "macro_sql": "{%- macro yesterday(date=None, tz=None) -%}\n{{ dbt_date.n_days_ago(1, date, tz) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.314683}, "macro.dbt_date.day_of_week": {"unique_id": "macro.dbt_date.day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "day_of_week", "macro_sql": "{%- macro day_of_week(date, isoweek=true) -%}\n{{ adapter.dispatch('day_of_week', 'dbt_date') (date, isoweek) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__day_of_week"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3163142}, "macro.dbt_date.default__day_of_week": {"unique_id": "macro.dbt_date.default__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "default__day_of_week", "macro_sql": "\n\n{%- macro default__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else {{ dow }}\n end\n {%- else -%}\n {{ dow }} + 1\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3165948}, "macro.dbt_date.snowflake__day_of_week": {"unique_id": "macro.dbt_date.snowflake__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "snowflake__day_of_week", "macro_sql": "\n\n{%- macro snowflake__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'dayofweekiso' -%}\n {{ dbt_date.date_part(dow_part, date) }}\n {%- else -%}\n {%- set dow_part = 'dayofweek' -%}\n case\n when {{ dbt_date.date_part(dow_part, date) }} = 7 then 1\n else {{ dbt_date.date_part(dow_part, date) }} + 1\n end\n {%- endif -%}\n\n\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.31699}, "macro.dbt_date.bigquery__day_of_week": {"unique_id": "macro.dbt_date.bigquery__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "bigquery__day_of_week", "macro_sql": "\n\n{%- macro bigquery__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (1) to Monday (2)\n when {{ dow }} = 1 then 7\n else {{ dow }} - 1\n end\n {%- else -%}\n {{ dow }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.317272}, "macro.dbt_date.postgres__day_of_week": {"unique_id": "macro.dbt_date.postgres__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "postgres__day_of_week", "macro_sql": "\n\n\n{%- macro postgres__day_of_week(date, isoweek) -%}\n\n {%- if isoweek -%}\n {%- set dow_part = 'isodow' -%}\n -- Monday(1) to Sunday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} as {{ dbt_utils.type_int() }})\n {%- else -%}\n {%- set dow_part = 'dow' -%}\n -- Sunday(1) to Saturday (7)\n cast({{ dbt_date.date_part(dow_part, date) }} + 1 as {{ dbt_utils.type_int() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3176918}, "macro.dbt_date.redshift__day_of_week": {"unique_id": "macro.dbt_date.redshift__day_of_week", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/day_of_week.sql", "original_file_path": "macros/calendar_date/day_of_week.sql", "name": "redshift__day_of_week", "macro_sql": "\n\n\n{%- macro redshift__day_of_week(date, isoweek) -%}\n\n {%- set dow = dbt_date.date_part('dayofweek', date) -%}\n\n {%- if isoweek -%}\n case\n -- Shift start of week from Sunday (0) to Monday (1)\n when {{ dow }} = 0 then 7\n else cast({{ dow }} as {{ dbt_utils.type_bigint() }})\n end\n {%- else -%}\n cast({{ dow }} + 1 as {{ dbt_utils.type_bigint() }})\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.318109}, "macro.dbt_date.iso_week_end": {"unique_id": "macro.dbt_date.iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "iso_week_end", "macro_sql": "{%- macro iso_week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.318599}, "macro.dbt_date._iso_week_end": {"unique_id": "macro.dbt_date._iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "_iso_week_end", "macro_sql": "{%- macro _iso_week_end(date, week_type) -%}\n{%- set dt = dbt_date.iso_week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.iso_week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.318801}, "macro.dbt_date.default__iso_week_end": {"unique_id": "macro.dbt_date.default__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "default__iso_week_end", "macro_sql": "\n\n{%- macro default__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.318934}, "macro.dbt_date.snowflake__iso_week_end": {"unique_id": "macro.dbt_date.snowflake__iso_week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_end.sql", "original_file_path": "macros/calendar_date/iso_week_end.sql", "name": "snowflake__iso_week_end", "macro_sql": "\n\n{%- macro snowflake__iso_week_end(date) -%}\n{{ dbt_date._iso_week_end(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.319069}, "macro.dbt_date.n_weeks_ago": {"unique_id": "macro.dbt_date.n_weeks_ago", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_weeks_ago.sql", "original_file_path": "macros/calendar_date/n_weeks_ago.sql", "name": "n_weeks_ago", "macro_sql": "{%- macro n_weeks_ago(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('week', \n dbt_utils.dateadd('week', -1 * n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.319486}, "macro.dbt_date.month_name": {"unique_id": "macro.dbt_date.month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "month_name", "macro_sql": "{%- macro month_name(date, short=True) -%}\n {{ adapter.dispatch('month_name', 'dbt_date') (date, short) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.snowflake__month_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.319987}, "macro.dbt_date.default__month_name": {"unique_id": "macro.dbt_date.default__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "default__month_name", "macro_sql": "\n\n{%- macro default__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MONTH' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.320184}, "macro.dbt_date.bigquery__month_name": {"unique_id": "macro.dbt_date.bigquery__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "bigquery__month_name", "macro_sql": "\n\n{%- macro bigquery__month_name(date, short) -%}\n{%- set f = '%b' if short else '%B' -%}\n format_date('{{ f }}', cast({{ date }} as date))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.320375}, "macro.dbt_date.snowflake__month_name": {"unique_id": "macro.dbt_date.snowflake__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "snowflake__month_name", "macro_sql": "\n\n{%- macro snowflake__month_name(date, short) -%}\n{%- set f = 'MON' if short else 'MMMM' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.320568}, "macro.dbt_date.postgres__month_name": {"unique_id": "macro.dbt_date.postgres__month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/month_name.sql", "original_file_path": "macros/calendar_date/month_name.sql", "name": "postgres__month_name", "macro_sql": "\n\n{%- macro postgres__month_name(date, short) -%}\n{# FM = Fill mode, which suppresses padding blanks #}\n{%- set f = 'FMMon' if short else 'FMMonth' -%}\n to_char({{ date }}, '{{ f }}')\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3207622}, "macro.dbt_date.last_month_name": {"unique_id": "macro.dbt_date.last_month_name", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_name.sql", "original_file_path": "macros/calendar_date/last_month_name.sql", "name": "last_month_name", "macro_sql": "{%- macro last_month_name(short=True, tz=None) -%}\n{{ dbt_date.month_name(dbt_date.last_month(1, tz), short=short) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.month_name", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.321072}, "macro.dbt_date.week_of_year": {"unique_id": "macro.dbt_date.week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "week_of_year", "macro_sql": "{%- macro week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.default__week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3215308}, "macro.dbt_date.default__week_of_year": {"unique_id": "macro.dbt_date.default__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "default__week_of_year", "macro_sql": "{%- macro default__week_of_year(date) -%}\ncast({{ dbt_date.date_part('week', date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.321712}, "macro.dbt_date.postgres__week_of_year": {"unique_id": "macro.dbt_date.postgres__week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_of_year.sql", "original_file_path": "macros/calendar_date/week_of_year.sql", "name": "postgres__week_of_year", "macro_sql": "\n\n{%- macro postgres__week_of_year(date) -%}\n{# postgresql 'week' returns isoweek. Use to_char instead.\n WW = the first week starts on the first day of the year #}\ncast(to_char({{ date }}, 'WW') as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3218539}, "macro.dbt_date.convert_timezone": {"unique_id": "macro.dbt_date.convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "convert_timezone", "macro_sql": "{%- macro convert_timezone(column, target_tz=None, source_tz=None) -%}\n{%- set source_tz = \"UTC\" if not source_tz else source_tz -%}\n{%- set target_tz = var(\"dbt_date:time_zone\") if not target_tz else target_tz -%}\n{{ adapter.dispatch('convert_timezone', 'dbt_date') (column, target_tz, source_tz) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.322997}, "macro.dbt_date.default__convert_timezone": {"unique_id": "macro.dbt_date.default__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "default__convert_timezone", "macro_sql": "{% macro default__convert_timezone(column, target_tz, source_tz) -%}\n{%- if not source_tz -%}\ncast(convert_timezone('{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast(convert_timezone('{{ source_tz }}', '{{ target_tz }}', {{ column }}) as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.323325}, "macro.dbt_date.bigquery__convert_timezone": {"unique_id": "macro.dbt_date.bigquery__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "bigquery__convert_timezone", "macro_sql": "{%- macro bigquery__convert_timezone(column, target_tz, source_tz=None) -%}\ntimestamp(datetime({{ column }}, '{{ target_tz}}'))\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3234718}, "macro.dbt_date.spark__convert_timezone": {"unique_id": "macro.dbt_date.spark__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "spark__convert_timezone", "macro_sql": "{%- macro spark__convert_timezone(column, target_tz, source_tz) -%}\nfrom_utc_timestamp(\n to_utc_timestamp({{ column }}, '{{ source_tz }}'),\n '{{ target_tz }}'\n )\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.323626}, "macro.dbt_date.postgres__convert_timezone": {"unique_id": "macro.dbt_date.postgres__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "postgres__convert_timezone", "macro_sql": "{% macro postgres__convert_timezone(column, target_tz, source_tz) -%}\n{%- if source_tz -%}\ncast({{ column }} at time zone '{{ source_tz }}' at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- else -%}\ncast({{ column }} at time zone '{{ target_tz }}' as {{ dbt_utils.type_timestamp() }})\n{%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.324107}, "macro.dbt_date.redshift__convert_timezone": {"unique_id": "macro.dbt_date.redshift__convert_timezone", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/convert_timezone.sql", "original_file_path": "macros/calendar_date/convert_timezone.sql", "name": "redshift__convert_timezone", "macro_sql": "{%- macro redshift__convert_timezone(column, target_tz, source_tz) -%}\n{{ return(dbt_date.default__convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.default__convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3242939}, "macro.dbt_date.n_months_away": {"unique_id": "macro.dbt_date.n_months_away", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/n_months_away.sql", "original_file_path": "macros/calendar_date/n_months_away.sql", "name": "n_months_away", "macro_sql": "{%- macro n_months_away(n, tz=None) -%}\n{%- set n = n|int -%}\n{{ dbt_utils.date_trunc('month', \n dbt_utils.dateadd('month', n, \n dbt_date.today(tz)\n )\n ) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.dateadd", "macro.dbt_date.today"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.324695}, "macro.dbt_date.iso_week_of_year": {"unique_id": "macro.dbt_date.iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "iso_week_of_year", "macro_sql": "{%- macro iso_week_of_year(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('iso_week_of_year', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.325254}, "macro.dbt_date._iso_week_of_year": {"unique_id": "macro.dbt_date._iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "_iso_week_of_year", "macro_sql": "{%- macro _iso_week_of_year(date, week_type) -%}\ncast({{ dbt_date.date_part(week_type, date) }} as {{ dbt_utils.type_int() }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.325438}, "macro.dbt_date.default__iso_week_of_year": {"unique_id": "macro.dbt_date.default__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "default__iso_week_of_year", "macro_sql": "\n\n{%- macro default__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'isoweek') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3255732}, "macro.dbt_date.snowflake__iso_week_of_year": {"unique_id": "macro.dbt_date.snowflake__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "snowflake__iso_week_of_year", "macro_sql": "\n\n{%- macro snowflake__iso_week_of_year(date) -%}\n{{ dbt_date._iso_week_of_year(date, 'weekiso') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.325706}, "macro.dbt_date.postgres__iso_week_of_year": {"unique_id": "macro.dbt_date.postgres__iso_week_of_year", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/iso_week_of_year.sql", "original_file_path": "macros/calendar_date/iso_week_of_year.sql", "name": "postgres__iso_week_of_year", "macro_sql": "\n\n{%- macro postgres__iso_week_of_year(date) -%}\n-- postgresql week is isoweek, the first week of a year containing January 4 of that year.\n{{ dbt_date._iso_week_of_year(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date._iso_week_of_year"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.325844}, "macro.dbt_date.week_end": {"unique_id": "macro.dbt_date.week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "week_end", "macro_sql": "{%- macro week_end(date=None, tz=None) -%}\n{%-set dt = date if date else dbt_date.today(tz) -%}\n{{ adapter.dispatch('week_end', 'dbt_date') (dt) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.today", "macro.dbt_date.snowflake__week_end"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.326337}, "macro.dbt_date.default__week_end": {"unique_id": "macro.dbt_date.default__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "default__week_end", "macro_sql": "{%- macro default__week_end(date) -%}\n{{ dbt_utils.last_day(date, 'week') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3264709}, "macro.dbt_date.snowflake__week_end": {"unique_id": "macro.dbt_date.snowflake__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "snowflake__week_end", "macro_sql": "\n\n{%- macro snowflake__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3266618}, "macro.dbt_date.postgres__week_end": {"unique_id": "macro.dbt_date.postgres__week_end", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/week_end.sql", "original_file_path": "macros/calendar_date/week_end.sql", "name": "postgres__week_end", "macro_sql": "\n\n{%- macro postgres__week_end(date) -%}\n{%- set dt = dbt_date.week_start(date) -%}\n{{ dbt_date.n_days_away(6, dt) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.week_start", "macro.dbt_date.n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3268611}, "macro.dbt_date.next_month_number": {"unique_id": "macro.dbt_date.next_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/next_month_number.sql", "original_file_path": "macros/calendar_date/next_month_number.sql", "name": "next_month_number", "macro_sql": "{%- macro next_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.next_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.next_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3271449}, "macro.dbt_date.last_month_number": {"unique_id": "macro.dbt_date.last_month_number", "package_name": "dbt_date", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_date", "path": "macros/calendar_date/last_month_number.sql", "original_file_path": "macros/calendar_date/last_month_number.sql", "name": "last_month_number", "macro_sql": "{%- macro last_month_number(tz=None) -%}\n{{ dbt_date.date_part('month', dbt_date.last_month(1, tz)) }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_date.date_part", "macro.dbt_date.last_month"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.327426}, "macro.dbt_expectations.type_timestamp": {"unique_id": "macro.dbt_expectations.type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_expectations')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3278348}, "macro.dbt_expectations.default__type_timestamp": {"unique_id": "macro.dbt_expectations.default__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() -%}\n timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3279061}, "macro.dbt_expectations.snowflake__type_timestamp": {"unique_id": "macro.dbt_expectations.snowflake__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3279731}, "macro.dbt_expectations.postgres__type_timestamp": {"unique_id": "macro.dbt_expectations.postgres__type_timestamp", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.32804}, "macro.dbt_expectations.type_datetime": {"unique_id": "macro.dbt_expectations.type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "type_datetime", "macro_sql": "{% macro type_datetime() -%}\n {{ return(adapter.dispatch('type_datetime', 'dbt_expectations')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__type_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.328193}, "macro.dbt_expectations.default__type_datetime": {"unique_id": "macro.dbt_expectations.default__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "default__type_datetime", "macro_sql": "{% macro default__type_datetime() -%}\n datetime\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.328265}, "macro.dbt_expectations.snowflake__type_datetime": {"unique_id": "macro.dbt_expectations.snowflake__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "snowflake__type_datetime", "macro_sql": "{% macro snowflake__type_datetime() -%}\n timestamp_ntz\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.32833}, "macro.dbt_expectations.postgres__type_datetime": {"unique_id": "macro.dbt_expectations.postgres__type_datetime", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "name": "postgres__type_datetime", "macro_sql": "{% macro postgres__type_datetime() -%}\n timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.328456}, "macro.dbt_expectations.regexp_instr": {"unique_id": "macro.dbt_expectations.regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "regexp_instr", "macro_sql": "{% macro regexp_instr(source_value, regexp, position=1, occurrence=1) %}\n\n {{ adapter.dispatch('regexp_instr', 'dbt_expectations')(\n source_value, regexp, position, occurrence\n ) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__regexp_instr"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.329066}, "macro.dbt_expectations.default__regexp_instr": {"unique_id": "macro.dbt_expectations.default__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "default__regexp_instr", "macro_sql": "{% macro default__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.32925}, "macro.dbt_expectations.redshift__regexp_instr": {"unique_id": "macro.dbt_expectations.redshift__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "redshift__regexp_instr", "macro_sql": "{% macro redshift__regexp_instr(source_value, regexp, position, occurrence) %}\nregexp_instr({{ source_value }}, '{{ regexp }}', {{ position }}, {{ occurrence }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.329429}, "macro.dbt_expectations.postgres__regexp_instr": {"unique_id": "macro.dbt_expectations.postgres__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "postgres__regexp_instr", "macro_sql": "{% macro postgres__regexp_instr(source_value, regexp, position, occurrence) %}\narray_length((select regexp_matches({{ source_value }}, '{{ regexp }}')), 1)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3295732}, "macro.dbt_expectations.spark__regexp_instr": {"unique_id": "macro.dbt_expectations.spark__regexp_instr", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/regex/regexp_instr.sql", "original_file_path": "macros/regex/regexp_instr.sql", "name": "spark__regexp_instr", "macro_sql": "{% macro spark__regexp_instr(source_value, regexp, position, occurrence) %}\ncase when {{ source_value }} rlike '{{ regexp }}' then 1 else 0 end\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.329716}, "macro.dbt_expectations.log_natural": {"unique_id": "macro.dbt_expectations.log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "log_natural", "macro_sql": "{% macro log_natural(x) -%}\n {{ adapter.dispatch('log_natural', 'dbt_expectations') (x) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.330048}, "macro.dbt_expectations.default__log_natural": {"unique_id": "macro.dbt_expectations.default__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "default__log_natural", "macro_sql": "{% macro default__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3301492}, "macro.dbt_expectations.bigquery__log_natural": {"unique_id": "macro.dbt_expectations.bigquery__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "bigquery__log_natural", "macro_sql": "{% macro bigquery__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.330244}, "macro.dbt_expectations.snowflake__log_natural": {"unique_id": "macro.dbt_expectations.snowflake__log_natural", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/log_natural.sql", "original_file_path": "macros/math/log_natural.sql", "name": "snowflake__log_natural", "macro_sql": "{% macro snowflake__log_natural(x) %}\n\n ln({{ x }})\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.330338}, "macro.dbt_expectations.rand": {"unique_id": "macro.dbt_expectations.rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "rand", "macro_sql": "{% macro rand() -%}\n {{ adapter.dispatch('rand', 'dbt_expectations') () }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.snowflake__rand"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.330689}, "macro.dbt_expectations.default__rand": {"unique_id": "macro.dbt_expectations.default__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "default__rand", "macro_sql": "{% macro default__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.33076}, "macro.dbt_expectations.bigquery__rand": {"unique_id": "macro.dbt_expectations.bigquery__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "bigquery__rand", "macro_sql": "{% macro bigquery__rand() %}\n\n rand()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3308291}, "macro.dbt_expectations.snowflake__rand": {"unique_id": "macro.dbt_expectations.snowflake__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "snowflake__rand", "macro_sql": "{% macro snowflake__rand(seed) %}\n\n uniform(0::float, 1::float, random())\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.330904}, "macro.dbt_expectations.postgres__rand": {"unique_id": "macro.dbt_expectations.postgres__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "postgres__rand", "macro_sql": "{% macro postgres__rand() %}\n\n random()\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.33097}, "macro.dbt_expectations.redshift__rand": {"unique_id": "macro.dbt_expectations.redshift__rand", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/rand.sql", "original_file_path": "macros/math/rand.sql", "name": "redshift__rand", "macro_sql": "{% macro redshift__rand() %}\n\n random()\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.331035}, "macro.dbt_expectations.median": {"unique_id": "macro.dbt_expectations.median", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/median.sql", "original_file_path": "macros/math/median.sql", "name": "median", "macro_sql": "{% macro median(field) %}\n{{ dbt_expectations.percentile_cont(field, 0.5) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.331275}, "macro.dbt_expectations.percentile_cont": {"unique_id": "macro.dbt_expectations.percentile_cont", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "percentile_cont", "macro_sql": "{% macro percentile_cont(field, quantile, partition=None) %}\n {{ adapter.dispatch('quantile', 'dbt_expectations') (field, quantile, partition) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__quantile"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.331748}, "macro.dbt_expectations.default__quantile": {"unique_id": "macro.dbt_expectations.default__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "default__quantile", "macro_sql": "{% macro default__quantile(field, quantile, partition) -%}\n percentile_cont({{ quantile }}) within group (order by {{ field }})\n {%- if partition %}over(partition by {{ partition }}){% endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.331946}, "macro.dbt_expectations.bigquery__quantile": {"unique_id": "macro.dbt_expectations.bigquery__quantile", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/math/percentile_cont.sql", "original_file_path": "macros/math/percentile_cont.sql", "name": "bigquery__quantile", "macro_sql": "{% macro bigquery__quantile(field, quantile, partition) %}\n percentile_cont({{ field }}, {{ quantile }})\n over({%- if partition %}partition by {{ partition }}{% endif -%})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.332212}, "macro.dbt_expectations.test_expression_between": {"unique_id": "macro.dbt_expectations.test_expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "test_expression_between", "macro_sql": "{% test expression_between(model,\n expression,\n min_value=None,\n max_value=None,\n group_by_columns=None,\n row_condition=None,\n strictly=False\n ) %}\n\n {{ dbt_expectations.expression_between(model, expression, min_value, max_value, group_by_columns, row_condition, strictly) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.333355}, "macro.dbt_expectations.expression_between": {"unique_id": "macro.dbt_expectations.expression_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_between.sql", "original_file_path": "macros/schema_tests/_generalized/expression_between.sql", "name": "expression_between", "macro_sql": "{% macro expression_between(model,\n expression,\n min_value,\n max_value,\n group_by_columns,\n row_condition,\n strictly\n ) %}\n\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n\n{%- set strict_operator = \"\" if strictly else \"=\" -%}\n\n{% set expression_min_max %}\n( 1=1\n{%- if min_value is not none %} and {{ expression | trim }} >{{ strict_operator }} {{ min_value }}{% endif %}\n{%- if max_value is not none %} and {{ expression | trim }} <{{ strict_operator }} {{ max_value }}{% endif %}\n)\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression_min_max,\n group_by_columns=group_by_columns,\n row_condition=row_condition)\n }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.334081}, "macro.dbt_expectations.test_expression_is_true": {"unique_id": "macro.dbt_expectations.test_expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n\n {{ dbt_expectations.expression_is_true(model, expression, test_condition, group_by_columns, row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.335005}, "macro.dbt_expectations.expression_is_true": {"unique_id": "macro.dbt_expectations.expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "expression_is_true", "macro_sql": "{% macro expression_is_true(model,\n expression,\n test_condition=\"= true\",\n group_by_columns=None,\n row_condition=None\n ) %}\n {{ adapter.dispatch('expression_is_true', 'dbt_expectations') (model, expression, test_condition, group_by_columns, row_condition) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3352919}, "macro.dbt_expectations.default__expression_is_true": {"unique_id": "macro.dbt_expectations.default__expression_is_true", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/expression_is_true.sql", "original_file_path": "macros/schema_tests/_generalized/expression_is_true.sql", "name": "default__expression_is_true", "macro_sql": "{% macro default__expression_is_true(model, expression, test_condition, group_by_columns, row_condition) -%}\nwith grouped_expression as (\n select\n {% if group_by_columns %}\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ dbt_expectations.truth_expression(expression) }}\n from {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by_columns %}\n group by\n {% for group_by_column in group_by_columns -%}\n {{ group_by_column }}{% if not loop.last %},{% endif %}\n {% endfor %}\n {% endif %}\n\n),\nvalidation_errors as (\n\n select\n *\n from\n grouped_expression\n where\n not(expression {{ test_condition }})\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.335888}, "macro.dbt_expectations.get_select": {"unique_id": "macro.dbt_expectations.get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "get_select", "macro_sql": "{% macro get_select(model, expression, row_condition, group_by) -%}\n {{ adapter.dispatch('get_select', 'dbt_expectations') (model, expression, row_condition, group_by) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3406599}, "macro.dbt_expectations.default__get_select": {"unique_id": "macro.dbt_expectations.default__get_select", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__get_select", "macro_sql": "\n\n{%- macro default__get_select(model, expression, row_condition, group_by) %}\n select\n {% if group_by %}\n {% for g in group_by -%}\n {{ g }} as col_{{ loop.index }},\n {% endfor -%}\n {% endif %}\n {{ expression }} as expression\n from\n {{ model }}\n {%- if row_condition %}\n where\n {{ row_condition }}\n {% endif %}\n {% if group_by %}\n group by\n {% for g in group_by -%}\n {{ loop.index }}{% if not loop.last %},{% endif %}\n {% endfor %}\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": 1653000028.341193}, "macro.dbt_expectations.test_equal_expression": {"unique_id": "macro.dbt_expectations.test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "test_equal_expression", "macro_sql": "{% test equal_expression(model, expression,\n compare_model=None,\n compare_expression=None,\n group_by=None,\n compare_group_by=None,\n row_condition=None,\n compare_row_condition=None,\n tolerance=0.0,\n tolerance_percent=None\n ) -%}\n\n {{ adapter.dispatch('test_equal_expression', 'dbt_expectations') (\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.341654}, "macro.dbt_expectations.default__test_equal_expression": {"unique_id": "macro.dbt_expectations.default__test_equal_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/equal_expression.sql", "original_file_path": "macros/schema_tests/_generalized/equal_expression.sql", "name": "default__test_equal_expression", "macro_sql": "\n\n{%- macro default__test_equal_expression(\n model,\n expression,\n compare_model,\n compare_expression,\n group_by,\n compare_group_by,\n row_condition,\n compare_row_condition,\n tolerance,\n tolerance_percent) -%}\n\n {%- set compare_model = model if not compare_model else compare_model -%}\n {%- set compare_expression = expression if not compare_expression else compare_expression -%}\n {%- set compare_row_condition = row_condition if not compare_row_condition else compare_row_condition -%}\n {%- set compare_group_by = group_by if not compare_group_by else compare_group_by -%}\n\n {%- set n_cols = (group_by|length) if group_by else 0 %}\n with a as (\n {{ dbt_expectations.get_select(model, expression, row_condition, group_by) }}\n ),\n b as (\n {{ dbt_expectations.get_select(compare_model, compare_expression, compare_row_condition, compare_group_by) }}\n ),\n final as (\n\n select\n {% for i in range(1, n_cols + 1) -%}\n coalesce(a.col_{{ i }}, b.col_{{ i }}) as col_{{ i }},\n {% endfor %}\n a.expression,\n b.expression as compare_expression,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0)) as expression_difference,\n abs(coalesce(a.expression, 0) - coalesce(b.expression, 0))/\n nullif(a.expression * 1.0, 0) as expression_difference_percent\n from\n {% if n_cols > 0 %}\n a\n full outer join\n b on\n {% for i in range(1, n_cols + 1) -%}\n a.col_{{ i }} = b.col_{{ i }} {% if not loop.last %}and{% endif %}\n {% endfor -%}\n {% else %}\n a cross join b\n {% endif %}\n )\n -- DEBUG:\n -- select * from final\n select\n *\n from final\n where\n {% if tolerance_percent %}\n expression_difference_percent > {{ tolerance_percent }}\n {% else %}\n expression_difference > {{ tolerance }}\n {% endif %}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.get_select"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.342902}, "macro.dbt_expectations.truth_expression": {"unique_id": "macro.dbt_expectations.truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "truth_expression", "macro_sql": "{% macro truth_expression(expression) %}\n {{ adapter.dispatch('truth_expression', 'dbt_expectations') (expression) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__truth_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.343204}, "macro.dbt_expectations.default__truth_expression": {"unique_id": "macro.dbt_expectations.default__truth_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/_generalized/_truth_expression.sql", "original_file_path": "macros/schema_tests/_generalized/_truth_expression.sql", "name": "default__truth_expression", "macro_sql": "{% macro default__truth_expression(expression) %}\n {{ expression }} as expression\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.343303}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql", "name": "test_expect_column_values_to_match_like_pattern", "macro_sql": "{% test expect_column_values_to_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.34387}, "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern_list.sql", "name": "test_expect_column_values_to_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=True) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.34489}, "macro.dbt_expectations.test_expect_column_values_to_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql", "name": "test_expect_column_values_to_match_regex", "macro_sql": "{% test expect_column_values_to_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.345516}, "macro.dbt_expectations.test_expect_column_value_lengths_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_equal.sql", "name": "test_expect_column_value_lengths_to_equal", "macro_sql": "{% test expect_column_value_lengths_to_equal(model, column_name,\n value,\n row_condition=None\n ) %}\n\n{% set expression = dbt_utils.length(column_name) ~ \" = \" ~ value %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3460648}, "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_value_lengths_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_value_lengths_to_be_between.sql", "name": "test_expect_column_value_lengths_to_be_between", "macro_sql": "{% test expect_column_value_lengths_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\n{{ dbt_utils.length(column_name) }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.length", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.346869}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql", "name": "test_expect_column_values_to_not_match_regex", "macro_sql": "{% test expect_column_values_to_not_match_regex(model, column_name,\n regex,\n row_condition=None\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.347492}, "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql", "name": "test_expect_column_values_to_not_match_regex_list", "macro_sql": "{% test expect_column_values_to_not_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for regex in regex_list %}\n{{ dbt_expectations.regexp_instr(column_name, regex) }} = 0\n{%- if not loop.last %}\n{{ \" and \" if match_on == \"all\" else \" or \"}}\n{% endif -%}\n{% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.348543}, "macro.dbt_expectations.test_expect_column_values_to_match_regex_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_match_regex_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql", "name": "test_expect_column_values_to_match_regex_list", "macro_sql": "{% test expect_column_values_to_match_regex_list(model, column_name,\n regex_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for regex in regex_list %}\n {{ dbt_expectations.regexp_instr(column_name, regex) }} > 0\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.regexp_instr", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.349544}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern_list.sql", "name": "test_expect_column_values_to_not_match_like_pattern_list", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern_list(model, column_name,\n like_pattern_list,\n match_on=\"any\",\n row_condition=None\n ) %}\n\n{% set expression %}\n {% for like_pattern in like_pattern_list %}\n {{ dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) }}\n {%- if not loop.last %}\n {{ \" and \" if match_on == \"all\" else \" or \"}}\n {% endif -%}\n {% endfor %}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.35057}, "macro.dbt_expectations._get_like_pattern_expression": {"unique_id": "macro.dbt_expectations._get_like_pattern_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "original_file_path": "macros/schema_tests/string_matching/_get_like_pattern_expression.sql", "name": "_get_like_pattern_expression", "macro_sql": "{% macro _get_like_pattern_expression(column_name, like_pattern, positive) %}\n{{ column_name }} {{ \"not\" if not positive else \"\" }} like '{{ like_pattern }}'\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.350877}, "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_match_like_pattern", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "original_file_path": "macros/schema_tests/string_matching/expect_column_values_to_not_match_like_pattern.sql", "name": "test_expect_column_values_to_not_match_like_pattern", "macro_sql": "{% test expect_column_values_to_not_match_like_pattern(model, column_name,\n like_pattern,\n row_condition=None\n ) %}\n\n{% set expression = dbt_expectations._get_like_pattern_expression(column_name, like_pattern, positive=False) %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_like_pattern_expression", "macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.351446}, "macro.dbt_expectations.test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "test_expect_row_values_to_have_recent_data", "macro_sql": "{% test expect_row_values_to_have_recent_data(model,\n column_name,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_row_values_to_have_recent_data', 'dbt_expectations') (model,\n column_name,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.35254}, "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql", "name": "default__test_expect_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_row_values_to_have_recent_data(model, column_name, datepart, interval, row_condition) %}\n{%- set default_start_date = '1970-01-01' -%}\nwith max_recency as (\n\n select max(cast({{ column_name }} as {{ dbt_utils.type_timestamp() }})) as max_timestamp\n from\n {{ model }}\n where\n cast({{ column_name }} as {{ dbt_utils.type_timestamp() }}) <= {{ dbt_date.now() }}\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n)\nselect\n *\nfrom\n max_recency\nwhere\n -- if the row_condition excludes all row, we need to compare against a default date\n -- to avoid false negatives\n coalesce(max_timestamp, cast('{{ default_start_date }}' as {{ dbt_utils.type_timestamp() }}))\n <\n cast({{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }} as {{ dbt_utils.type_timestamp() }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_date.now", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.35315}, "macro.dbt_expectations.test_expect_table_columns_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_contain_set.sql", "name": "test_expect_table_columns_to_contain_set", "macro_sql": "{%- test expect_table_columns_to_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n input_columns i\n left join\n relation_columns r on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n r.relation_column is null\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.354311}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table.sql", "name": "test_expect_table_row_count_to_equal_other_table", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table(model, compare_model, factor=1, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_equal_expression(model, \"count(*)\",\n compare_model=compare_model,\n compare_expression=\"count(*) * \" + factor|string,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3547509}, "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_not_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_not_contain_set.sql", "name": "test_expect_table_columns_to_not_contain_set", "macro_sql": "{%- test expect_table_columns_to_not_contain_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n -- catch any column in input list that is in the list of table columns\n select *\n from\n input_columns i\n inner join\n relation_columns r on r.relation_column = i.input_column\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.355882}, "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% test expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition=None) %}\n\n {{ adapter.dispatch('test_expect_grouped_row_values_to_have_recent_data', 'dbt_expectations') (model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.357565}, "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data": {"unique_id": "macro.dbt_expectations.default__test_expect_grouped_row_values_to_have_recent_data", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "original_file_path": "macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql", "name": "default__test_expect_grouped_row_values_to_have_recent_data", "macro_sql": "{% macro default__test_expect_grouped_row_values_to_have_recent_data(model,\n group_by,\n timestamp_column,\n datepart,\n interval,\n row_condition) %}\nwith latest_grouped_timestamps as (\n\n select\n {%- for g in group_by %}\n {{ g }},\n {%- endfor %}\n max(1) as join_key,\n max({{ timestamp_column }}) as latest_timestamp_column\n from\n {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {{ dbt_utils.group_by(group_by | length )}}\n\n),\ntotal_row_counts as (\n\n select\n max(1) as join_key,\n count(*) as row_count\n from\n latest_grouped_timestamps\n\n),\noutdated_grouped_timestamps as (\n\n select *\n from\n latest_grouped_timestamps\n where\n latest_timestamp_column < {{ dbt_utils.dateadd(datepart, interval * -1, dbt_date.now()) }}\n\n),\nvalidation_errors as (\n\n select\n r.row_count,\n t.*\n from\n total_row_counts r\n left join\n outdated_grouped_timestamps t\n on r.join_key = t.join_key\n where\n -- fail if either no rows were returned due to row_condition,\n -- or the recency test returned failed rows\n r.row_count = 0\n or\n t.join_key is not null\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.group_by", "macro.dbt_utils.dateadd", "macro.dbt_date.now"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.358088}, "macro.dbt_expectations.test_expect_column_to_exist": {"unique_id": "macro.dbt_expectations.test_expect_column_to_exist", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "original_file_path": "macros/schema_tests/table_shape/expect_column_to_exist.sql", "name": "test_expect_column_to_exist", "macro_sql": "{%- test expect_column_to_exist(model, column_name, column_index=None, transform=\"upper\") -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | map(transform) | join -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n\n {%- set matching_column_index = relation_column_names.index(column_name) if column_name in relation_column_names else -1 %}\n\n {%- if column_index -%}\n\n {%- set column_index_0 = column_index - 1 if column_index > 0 else 0 -%}\n\n {%- set column_index_matches = true if matching_column_index == column_index_0 else false %}\n\n {%- else -%}\n\n {%- set column_index_matches = true -%}\n\n {%- endif %}\n\n with test_data as (\n\n select\n cast('{{ column_name }}' as {{ dbt_utils.type_string() }}) as column_name,\n {{ matching_column_index }} as matching_column_index,\n {{ column_index_matches }} as column_index_matches\n\n )\n select *\n from test_data\n where\n not(matching_column_index >= 0 and column_index_matches)\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3592691}, "macro.dbt_expectations.test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "test_expect_table_row_count_to_equal", "macro_sql": "{%- test expect_table_row_count_to_equal(model,\n value,\n group_by=None,\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_table_row_count_to_equal',\n 'dbt_expectations') (model,\n value,\n group_by,\n row_condition\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_table_row_count_to_equal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.360246}, "macro.dbt_expectations.default__test_expect_table_row_count_to_equal": {"unique_id": "macro.dbt_expectations.default__test_expect_table_row_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal.sql", "name": "default__test_expect_table_row_count_to_equal", "macro_sql": "\n\n\n\n{%- macro default__test_expect_table_row_count_to_equal(model,\n value,\n group_by,\n row_condition\n ) -%}\n{% set expression %}\ncount(*) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.360524}, "macro.dbt_expectations.test_expect_table_row_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_be_between.sql", "name": "test_expect_table_row_count_to_be_between", "macro_sql": "{%- test expect_table_row_count_to_be_between(model,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n{% set expression %}\ncount(*)\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.361252}, "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor": {"unique_id": "macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table_times_factor", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_row_count_to_equal_other_table_times_factor.sql", "name": "test_expect_table_row_count_to_equal_other_table_times_factor", "macro_sql": "{%- test expect_table_row_count_to_equal_other_table_times_factor(model, compare_model, factor, row_condition=None, compare_row_condition=None) -%}\n{{ dbt_expectations.test_expect_table_row_count_to_equal_other_table(model, compare_model,\n factor=factor,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_table_row_count_to_equal_other_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3616178}, "macro.dbt_expectations.test_expect_table_columns_to_match_set": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_set.sql", "name": "test_expect_table_columns_to_match_set", "macro_sql": "{%- test expect_table_columns_to_match_set(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column\n where\n -- catch any column in input list that is not in the list of table columns\n -- or any table column that is not in the input list\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.362883}, "macro.dbt_expectations._get_column_list": {"unique_id": "macro.dbt_expectations._get_column_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_get_column_list.sql", "original_file_path": "macros/schema_tests/table_shape/_get_column_list.sql", "name": "_get_column_list", "macro_sql": "{%- macro _get_column_list(model, transform=\"upper\") -%}\n{%- set relation_columns = adapter.get_columns_in_relation(model) -%}\n{%- set relation_column_names = relation_columns | map(attribute=\"name\") | map(transform) | list -%}\n{%- do return(relation_column_names) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.36332}, "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list": {"unique_id": "macro.dbt_expectations.test_expect_table_columns_to_match_ordered_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_columns_to_match_ordered_list.sql", "name": "test_expect_table_columns_to_match_ordered_list", "macro_sql": "{%- test expect_table_columns_to_match_ordered_list(model, column_list, transform=\"upper\") -%}\n{%- if execute -%}\n {%- set column_list = column_list | map(transform) | list -%}\n {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}\n {%- set matching_columns = dbt_expectations._list_intersect(column_list, relation_column_names) -%}\n with relation_columns as (\n\n {% for col_name in relation_column_names %}\n select\n {{ loop.index }} as relation_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as relation_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n input_columns as (\n\n {% for col_name in column_list %}\n select\n {{ loop.index }} as input_column_idx,\n cast('{{ col_name }}' as {{ dbt_utils.type_string() }}) as input_column\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n )\n select *\n from\n relation_columns r\n full outer join\n input_columns i on r.relation_column = i.input_column and r.relation_column_idx = i.input_column_idx\n where\n -- catch any column in input list that is not in the sequence of table columns\n -- or any table column that is not in the input sequence\n r.relation_column is null or\n i.input_column is null\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations._get_column_list", "macro.dbt_expectations._list_intersect", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.364697}, "macro.dbt_expectations._list_intersect": {"unique_id": "macro.dbt_expectations._list_intersect", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/_list_intersect.sql", "original_file_path": "macros/schema_tests/table_shape/_list_intersect.sql", "name": "_list_intersect", "macro_sql": "{%- macro _list_intersect(list1, list2) -%}\n{%- set matching_items = [] -%}\n{%- for itm in list1 -%}\n {%- if itm in list2 -%}\n {%- do matching_items.append(itm) -%}\n {%- endif -%}\n{%- endfor -%}\n{%- do return(matching_items) -%}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.365152}, "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal_other_table.sql", "name": "test_expect_table_column_count_to_equal_other_table", "macro_sql": "{%- test expect_table_column_count_to_equal_other_table(model, compare_model) -%}\n{%- if execute -%}\n{%- set number_columns = (adapter.get_columns_in_relation(model) | length) -%}\n{%- set compare_number_columns = (adapter.get_columns_in_relation(compare_model) | length) -%}\nwith test_data as (\n\n select\n {{ number_columns }} as number_columns,\n {{ compare_number_columns }} as compare_number_columns\n\n)\nselect *\nfrom test_data\nwhere\n number_columns != compare_number_columns\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3656719}, "macro.dbt_expectations.test_expect_table_column_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_equal.sql", "name": "test_expect_table_column_count_to_equal", "macro_sql": "{%- test expect_table_column_count_to_equal(model, value) -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ value }} as value\n\n)\nselect *\nfrom test_data\nwhere\n number_actual_columns != value\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.36608}, "macro.dbt_expectations.test_expect_table_column_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_table_column_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "original_file_path": "macros/schema_tests/table_shape/expect_table_column_count_to_be_between.sql", "name": "test_expect_table_column_count_to_be_between", "macro_sql": "{%- test expect_table_column_count_to_be_between(model,\n min_value=None,\n max_value=None\n ) -%}\n{%- if min_value is none and max_value is none -%}\n{{ exceptions.raise_compiler_error(\n \"You have to provide either a min_value, max_value or both.\"\n) }}\n{%- endif -%}\n{%- if execute -%}\n{%- set number_actual_columns = (adapter.get_columns_in_relation(model) | length) -%}\n\n{%- set expression %}\n( 1=1\n{%- if min_value %} and number_actual_columns >= min_value{% endif %}\n{%- if max_value %} and number_actual_columns <= max_value{% endif %}\n)\n{% endset -%}\n\nwith test_data as (\n\n select\n {{ number_actual_columns }} as number_actual_columns,\n {{ min_value if min_value else 0 }} as min_value,\n {{ max_value if max_value else 0 }} as max_value\n\n)\nselect *\nfrom test_data\nwhere\n not {{ expression }}\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3670568}, "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_in_set.sql", "name": "test_expect_column_values_to_not_be_in_set", "macro_sql": "{% test expect_column_values_to_not_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that match the set\n select\n v.value_field\n from\n all_values v\n join\n set_values s on v.value_field = s.value_field\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3679402}, "macro.dbt_expectations.test_expect_column_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_set.sql", "name": "test_expect_column_values_to_be_in_set", "macro_sql": "{% test expect_column_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n cast('{{ value }}' as {{ dbt_utils.type_string() }})\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.368837}, "macro.dbt_expectations.test_expect_column_values_to_be_increasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_increasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql", "name": "test_expect_column_values_to_be_increasing", "macro_sql": "{% test expect_column_values_to_be_increasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \">\" if strictly else \">=\" -%}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.37017}, "macro.dbt_expectations.test_expect_column_values_to_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql", "name": "test_expect_column_values_to_be_null", "macro_sql": "{% test expect_column_values_to_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.370665}, "macro.dbt_expectations.test_expect_column_values_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql", "name": "test_expect_column_values_to_be_unique", "macro_sql": "{% test expect_column_values_to_be_unique(model, column_name, row_condition=None) %}\n{{ dbt_expectations.test_expect_compound_columns_to_be_unique(model, [column_name], row_condition=row_condition) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_compound_columns_to_be_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.37097}, "macro.dbt_expectations.test_expect_column_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_between.sql", "name": "test_expect_column_values_to_be_between", "macro_sql": "{% test expect_column_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ column_name }}\n{% endset %}\n\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=None,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.371739}, "macro.dbt_expectations.test_expect_column_values_to_be_decreasing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_decreasing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_decreasing.sql", "name": "test_expect_column_values_to_be_decreasing", "macro_sql": "{% test expect_column_values_to_be_decreasing(model, column_name,\n sort_column=None,\n strictly=True,\n row_condition=None,\n group_by=None) %}\n\n{%- set sort_column = column_name if not sort_column else sort_column -%}\n{%- set operator = \"<\" if strictly else \"<=\" %}\nwith all_values as (\n\n select\n {{ sort_column }} as sort_column,\n {%- if group_by -%}\n {{ group_by | join(\", \") }},\n {%- endif %}\n {{ column_name }} as value_field\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nadd_lag_values as (\n\n select\n sort_column,\n value_field,\n lag(value_field) over\n {%- if not group_by -%}\n (order by sort_column)\n {%- else -%}\n (partition by {{ group_by | join(\", \") }} order by sort_column)\n {%- endif %} as value_field_lag\n from\n all_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n add_lag_values\n where\n value_field_lag is not null\n and\n not (value_field {{ operator }} value_field_lag)\n\n)\nselect *\nfrom validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3729138}, "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_in_type_list", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql", "name": "test_expect_column_values_to_be_in_type_list", "macro_sql": "{%- test expect_column_values_to_be_in_type_list(model, column_name, column_type_list) -%}\n{%- if execute -%}\n\n {%- set column_name = column_name | upper -%}\n {%- set columns_in_relation = adapter.get_columns_in_relation(model) -%}\n {%- set column_type_list = column_type_list| map(\"upper\") | list -%}\n with relation_columns as (\n\n {% for column in columns_in_relation %}\n select\n cast('{{ column.name | upper }}' as {{ dbt_utils.type_string() }}) as relation_column,\n cast('{{ column.dtype | upper }}' as {{ dbt_utils.type_string() }}) as relation_column_type\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n ),\n test_data as (\n\n select\n *\n from\n relation_columns\n where\n relation_column = '{{ column_name }}'\n and\n relation_column_type not in ('{{ column_type_list | join(\"', '\") }}')\n\n )\n select *\n from test_data\n\n{%- endif -%}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.373971}, "macro.dbt_expectations.test_expect_column_values_to_be_of_type": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_of_type", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_be_of_type.sql", "name": "test_expect_column_values_to_be_of_type", "macro_sql": "{%- test expect_column_values_to_be_of_type(model, column_name, column_type) -%}\n{{ dbt_expectations.test_expect_column_values_to_be_in_type_list(model, column_name, [column_type]) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_expect_column_values_to_be_in_type_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3742568}, "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_have_consistent_casing", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_have_consistent_casing.sql", "name": "test_expect_column_values_to_have_consistent_casing", "macro_sql": "{% test expect_column_values_to_have_consistent_casing(model, column_name, display_inconsistent_columns=False) %}\n\nwith test_data as (\n\n select\n distinct {{ column_name }} as distinct_values\n from\n {{ model }}\n\n ),\n {% if display_inconsistent_columns %}\n validation_errors as (\n\n select\n lower(distinct_values) as inconsistent_columns,\n count(distinct_values) as set_count_case_insensitive\n from\n test_data\n group by 1\n having\n count(distinct_values) > 1\n\n )\n select * from validation_errors\n {% else %}\n validation_errors as (\n\n select\n count(1) as set_count,\n count(distinct lower(distinct_values)) as set_count_case_insensitive\n from\n test_data\n\n )\n select *\n from\n validation_errors\n where\n set_count != set_count_case_insensitive\n {% endif %}\n {%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.374717}, "macro.dbt_expectations.test_expect_column_values_to_not_be_null": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_not_be_null", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "original_file_path": "macros/schema_tests/column_values_basic/expect_column_values_to_not_be_null.sql", "name": "test_expect_column_values_to_not_be_null", "macro_sql": "{% test expect_column_values_to_not_be_null(model, column_name, row_condition=None) %}\n\n{% set expression = column_name ~ \" is not null\" %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.375204}, "macro.dbt_expectations.test_expect_column_min_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_min_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_min_to_be_between.sql", "name": "test_expect_column_min_to_be_between", "macro_sql": "{% test expect_column_min_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmin({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.376064}, "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_unique_value_count_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_unique_value_count_to_be_between.sql", "name": "test_expect_column_unique_value_count_to_be_between", "macro_sql": "{% test expect_column_unique_value_count_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.376877}, "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_quantile_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_quantile_values_to_be_between.sql", "name": "test_expect_column_quantile_values_to_be_between", "macro_sql": "{% test expect_column_quantile_values_to_be_between(model, column_name,\n quantile,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.percentile_cont(column_name, quantile) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.percentile_cont", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.377751}, "macro.dbt_expectations.test_expect_column_median_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_median_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_median_to_be_between.sql", "name": "test_expect_column_median_to_be_between", "macro_sql": "{% test expect_column_median_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n\n{% set expression %}\n{{ dbt_expectations.median(column_name) }}\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.median", "macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3785799}, "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_proportion_of_unique_values_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_proportion_of_unique_values_to_be_between.sql", "name": "test_expect_column_proportion_of_unique_values_to_be_between", "macro_sql": "{% test expect_column_proportion_of_unique_values_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }})/count({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3794508}, "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_equal_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_equal_set.sql", "name": "test_expect_column_distinct_values_to_equal_set", "macro_sql": "{% test expect_column_distinct_values_to_equal_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as column_value\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n\n select\n *\n from\n all_values v\n full outer join\n unique_set_values s on v.column_value = s.value_field\n where\n v.column_value is null or\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.380329}, "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% test expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values=False,\n data_type=\"decimal\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_column_most_common_value_to_be_in_set', 'dbt_expectations') (model, column_name, value_set, top_n, quote_values, data_type, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.381888}, "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set": {"unique_id": "macro.dbt_expectations.default__test_expect_column_most_common_value_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_most_common_value_to_be_in_set.sql", "name": "default__test_expect_column_most_common_value_to_be_in_set", "macro_sql": "{% macro default__test_expect_column_most_common_value_to_be_in_set(model, column_name,\n value_set,\n top_n,\n quote_values,\n data_type,\n row_condition\n ) %}\n\nwith value_counts as (\n\n select\n {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %} as value_field,\n count(*) as value_count\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n group by {% if quote_values -%}\n {{ column_name }}\n {%- else -%}\n cast({{ column_name }} as {{ data_type }})\n {%- endif %}\n\n),\nvalue_counts_ranked as (\n\n select\n *,\n row_number() over(order by value_count desc) as value_count_rank\n from\n value_counts\n\n),\nvalue_count_top_n as (\n\n select\n value_field\n from\n value_counts_ranked\n where\n value_count_rank = {{ top_n }}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n cast({{ value }} as {{ data_type }})\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n value_field\n from\n value_count_top_n\n where\n value_field not in (select value_field from unique_set_values)\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.382636}, "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_contain_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_contain_set.sql", "name": "test_expect_column_distinct_values_to_contain_set", "macro_sql": "{% test expect_column_distinct_values_to_contain_set(model, column_name,\n value_set,\n quote_values=True,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values in set that are not in the list of values from the model\n select\n s.value_field\n from\n unique_set_values s\n left join\n all_values v on s.value_field = v.value_field\n where\n v.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.383532}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal.sql", "name": "test_expect_column_distinct_count_to_equal", "macro_sql": "{% test expect_column_distinct_count_to_equal(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) = {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.384191}, "macro.dbt_expectations.test_expect_column_sum_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_sum_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_sum_to_be_between.sql", "name": "test_expect_column_sum_to_be_between", "macro_sql": "{% test expect_column_sum_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nsum({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3849862}, "macro.dbt_expectations.test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "test_expect_column_stdev_to_be_between", "macro_sql": "{% test expect_column_stdev_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) -%}\n {{ adapter.dispatch('test_expect_column_stdev_to_be_between', 'dbt_expectations') (\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_stdev_to_be_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.386307}, "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between": {"unique_id": "macro.dbt_expectations.default__test_expect_column_stdev_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_stdev_to_be_between.sql", "name": "default__test_expect_column_stdev_to_be_between", "macro_sql": "{% macro default__test_expect_column_stdev_to_be_between(\n model, column_name,\n min_value,\n max_value,\n group_by,\n row_condition,\n strictly\n ) %}\n\n{% set expression %}\nstddev({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3866801}, "macro.dbt_expectations.test_expect_column_mean_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_mean_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_mean_to_be_between.sql", "name": "test_expect_column_mean_to_be_between", "macro_sql": "{% test expect_column_mean_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\navg({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3874822}, "macro.dbt_expectations.test_expect_column_max_to_be_between": {"unique_id": "macro.dbt_expectations.test_expect_column_max_to_be_between", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_max_to_be_between.sql", "name": "test_expect_column_max_to_be_between", "macro_sql": "{% test expect_column_max_to_be_between(model, column_name,\n min_value=None,\n max_value=None,\n group_by=None,\n row_condition=None,\n strictly=False\n ) %}\n{% set expression %}\nmax({{ column_name }})\n{% endset %}\n{{ dbt_expectations.expression_between(model,\n expression=expression,\n min_value=min_value,\n max_value=max_value,\n group_by_columns=group_by,\n row_condition=row_condition,\n strictly=strictly\n ) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3882802}, "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_be_greater_than", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_be_greater_than.sql", "name": "test_expect_column_distinct_count_to_be_greater_than", "macro_sql": "{% test expect_column_distinct_count_to_be_greater_than(model,\n column_name,\n value,\n quote_values=False,\n group_by=None,\n row_condition=None\n ) %}\n{% set expression %}\ncount(distinct {{ column_name }}) > {{ value }}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition)\n }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.388949}, "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_values_to_be_in_set.sql", "name": "test_expect_column_distinct_values_to_be_in_set", "macro_sql": "{% test expect_column_distinct_values_to_be_in_set(model, column_name,\n value_set,\n quote_values=False,\n row_condition=None\n ) %}\n\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n),\nset_values as (\n\n {% for value in value_set -%}\n select\n {% if quote_values -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif %} as value_field\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n\n),\nunique_set_values as (\n\n select distinct value_field\n from\n set_values\n\n),\nvalidation_errors as (\n -- values from the model that are not in the set\n select\n v.value_field\n from\n all_values v\n left join\n unique_set_values s on v.value_field = s.value_field\n where\n s.value_field is null\n\n)\n\nselect *\nfrom validation_errors\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.389824}, "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table": {"unique_id": "macro.dbt_expectations.test_expect_column_distinct_count_to_equal_other_table", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "original_file_path": "macros/schema_tests/aggregate_functions/expect_column_distinct_count_to_equal_other_table.sql", "name": "test_expect_column_distinct_count_to_equal_other_table", "macro_sql": "{% test expect_column_distinct_count_to_equal_other_table(model,\n compare_model,\n column_name,\n compare_column_name,\n row_condition=None,\n compare_row_condition=None\n ) %}\n{%- set expression -%}\ncount(distinct {{ column_name }})\n{%- endset -%}\n{%- set compare_expression -%}\n{%- if compare_column_name -%}\ncount(distinct {{ compare_column_name }})\n{%- else -%}\n{{ expression }}\n{%- endif -%}\n{%- endset -%}\n{{ dbt_expectations.test_equal_expression(\n model,\n expression=expression,\n compare_model=compare_model,\n compare_expression=compare_expression,\n row_condition=row_condition,\n compare_row_condition=compare_row_condition\n) }}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.test_equal_expression"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3905861}, "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart": {"unique_id": "macro.dbt_expectations.test_expect_row_values_to_have_data_for_every_n_datepart", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "original_file_path": "macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql", "name": "test_expect_row_values_to_have_data_for_every_n_datepart", "macro_sql": "{%- test expect_row_values_to_have_data_for_every_n_datepart(model,\n date_col,\n date_part=\"day\",\n interval=None,\n row_condition=None,\n exclusion_condition=None,\n test_start_date=None,\n test_end_date=None) -%}\n{% if not execute %}\n {{ return('') }}\n{% endif %}\n\n{% if not test_start_date or not test_end_date %}\n {% set sql %}\n\n select\n min({{ date_col }}) as start_{{ date_part }},\n max({{ date_col }}) as end_{{ date_part }}\n from {{ model }}\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n\n {% endset %}\n\n {%- set dr = run_query(sql) -%}\n {%- set db_start_date = dr.columns[0].values()[0].strftime('%Y-%m-%d') -%}\n {%- set db_end_date = dr.columns[1].values()[0].strftime('%Y-%m-%d') -%}\n\n{% endif %}\n\n{% if not test_start_date %}\n{% set start_date = db_start_date %}\n{% else %}\n{% set start_date = test_start_date %}\n{% endif %}\n\n\n{% if not test_end_date %}\n{% set end_date = db_end_date %}\n{% else %}\n{% set end_date = test_end_date %}\n{% endif %}\nwith base_dates as (\n\n {{ dbt_date.get_base_dates(start_date=start_date, end_date=end_date, datepart=date_part) }}\n {% if interval %}\n {# \n Filter the date spine created above down to the interval granularity using a modulo operation.\n The number of date_parts after the start_date divided by the integer interval will produce no remainder for the desired intervals, \n e.g. for 2-day interval from a starting Jan 1, 2020:\n params: start_date = '2020-01-01', date_part = 'day', interval = 2\n date spine created above: [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-04, 2020-01-05, ...]\n The first parameter to the `mod` function would be the number of days between the start_date and the spine date, i.e. [0, 1, 2, 3, 4 ...]\n The second parameter to the `mod` function would be the integer interval, i.e. 2\n This modulo operation produces the following remainders: [0, 1, 0, 1, 0, ...]\n Filtering the spine only where this remainder == 0 will return a spine with every other day as desired, i.e. [2020-01-01, 2020-01-03, 2020-01-05, ...]\n #}\n where mod(\n cast({{ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", 'date_' ~ date_part, date_part) }} as {{ dbt_utils.type_int() }}),\n cast({{interval}} as {{ dbt_utils.type_int() }})\n ) = 0\n {% endif %}\n\n),\nmodel_data as (\n\n select\n {% if not interval %}\n\n cast({{ dbt_utils.date_trunc(date_part, date_col) }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n\n {% else %}\n {# \n Use a modulo operator to determine the number of intervals that a date_col is away from the interval-date spine \n and subtracts that amount to effectively slice each date_col record into its corresponding spine bucket,\n e.g. given a date_col of with records [2020-01-01, 2020-01-02, 2020-01-03, 2020-01-11, 2020-01-12]\n if we want to slice these dates into their 2-day buckets starting Jan 1, 2020 (start_date = '2020-01-01', date_part='day', interval=2),\n the modulo operation described above will produce these remainders: [0, 1, 0, 0, 1]\n subtracting that number of days from the observations will produce records [2020-01-01, 2020-01-01, 2020-01-03, 2020-01-11, 2020-01-11],\n all of which align with records from the interval-date spine\n #}\n {{dbt_utils.dateadd(\n date_part, \n \"mod(\n cast(\" ~ dbt_utils.datediff(\"'\" ~ start_date ~ \"'\", date_col, date_part) ~ \" as \" ~ dbt_utils.type_int() ~ \" ),\n cast(\" ~ interval ~ \" as \" ~ dbt_utils.type_int() ~ \" )\n ) * (-1)\", \n \"cast( \" ~ dbt_utils.date_trunc(date_part, date_col) ~ \" as \" ~ dbt_expectations.type_datetime() ~ \")\"\n )}} as date_{{ date_part }},\n \n {% endif %}\n \n count(*) as row_cnt\n from\n {{ model }} f\n {% if row_condition %}\n where {{ row_condition }}\n {% endif %}\n group by\n date_{{date_part}}\n\n),\n\nfinal as (\n\n select\n cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) as date_{{ date_part }},\n case when f.date_{{ date_part }} is null then true else false end as is_missing,\n coalesce(f.row_cnt, 0) as row_cnt\n from\n base_dates d\n left join\n model_data f on cast(d.date_{{ date_part }} as {{ dbt_expectations.type_datetime() }}) = f.date_{{ date_part }}\n)\nselect\n *\nfrom final\nwhere row_cnt = 0\n{% if exclusion_condition %}\n and {{ exclusion_condition }}\n{% endif %}\n{%- endtest -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt_date.get_base_dates", "macro.dbt_utils.datediff", "macro.dbt_utils.type_int", "macro.dbt_utils.date_trunc", "macro.dbt_expectations.type_datetime", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.394445}, "macro.dbt_expectations._get_metric_expression": {"unique_id": "macro.dbt_expectations._get_metric_expression", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "_get_metric_expression", "macro_sql": "{%- macro _get_metric_expression(metric_column, take_logs) -%}\n\n{%- if take_logs %}\n{%- set expr = \"nullif(\" ~ metric_column ~ \", 0)\" -%}\ncoalesce({{ dbt_expectations.log_natural(expr) }}, 0)\n{%- else -%}\ncoalesce({{ metric_column }}, 0)\n{%- endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.log_natural"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.397679}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period='day',\n lookback_periods=1,\n trend_periods=7,\n test_periods=14,\n sigma_threshold=3,\n sigma_threshold_upper=None,\n sigma_threshold_lower=None,\n take_diffs=true,\n take_logs=true\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_moving_stdevs', 'dbt_expectations') (model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3981912}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_moving_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_moving_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_moving_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_moving_stdevs(model,\n column_name,\n date_column_name,\n period,\n lookback_periods,\n trend_periods,\n test_periods,\n sigma_threshold,\n sigma_threshold_upper,\n sigma_threshold_lower,\n take_diffs,\n take_logs\n ) %}\n\n{%- set sigma_threshold_upper = sigma_threshold_upper if sigma_threshold_upper else sigma_threshold -%}\n{%- set sigma_threshold_lower = sigma_threshold_lower if sigma_threshold_lower else -1 * sigma_threshold -%}\n\nwith metric_values as (\n\n with grouped_metric_values as (\n\n select\n {{ dbt_utils.date_trunc(period, date_column_name) }} as metric_period,\n sum({{ column_name }}) as agg_metric_value\n from\n {{ model }}\n group by\n 1\n\n ),\n {%- if take_diffs %}\n grouped_metric_values_with_priors as (\n\n select\n *,\n lag(agg_metric_value, {{ lookback_periods }}) over(order by metric_period) as prior_agg_metric_value\n from\n grouped_metric_values d\n\n )\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n -\n {{ dbt_expectations._get_metric_expression(\"prior_agg_metric_value\", take_logs) }}\n as metric_test_value\n from\n grouped_metric_values_with_priors d\n\n {%- else %}\n\n select\n *,\n {{ dbt_expectations._get_metric_expression(\"agg_metric_value\", take_logs) }}\n from\n grouped_metric_values\n\n {%- endif %}\n\n),\nmetric_moving_calcs as (\n\n select\n *,\n avg(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_average,\n stddev(metric_test_value)\n over(order by metric_period rows\n between {{ trend_periods }} preceding and 1 preceding) as metric_test_rolling_stddev\n from\n metric_values\n\n),\nmetric_sigma as (\n\n select\n *,\n (metric_test_value - metric_test_rolling_average) as metric_test_delta,\n (metric_test_value - metric_test_rolling_average)/nullif(metric_test_rolling_stddev, 0) as metric_test_sigma\n from\n metric_moving_calcs\n\n)\nselect\n *\nfrom\n metric_sigma\nwhere\n\n metric_period >= cast(\n {{ dbt_utils.dateadd(period, -test_periods, dbt_utils.date_trunc(period, dbt_date.now())) }}\n as {{ dbt_utils.type_timestamp() }})\n and\n metric_period < {{ dbt_utils.date_trunc(period, dbt_date.now()) }}\n and\n\n not (\n metric_test_sigma >= {{ sigma_threshold_lower }} and\n metric_test_sigma <= {{ sigma_threshold_upper }}\n )\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_expectations._get_metric_expression", "macro.dbt_utils.dateadd", "macro.dbt_date.now", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.3992782}, "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% test expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by=None,\n sigma_threshold=3\n ) -%}\n {{ adapter.dispatch('test_expect_column_values_to_be_within_n_stdevs', 'dbt_expectations') (model, column_name, group_by, sigma_threshold) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.400199}, "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs": {"unique_id": "macro.dbt_expectations.default__test_expect_column_values_to_be_within_n_stdevs", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "original_file_path": "macros/schema_tests/distributional/expect_column_values_to_be_within_n_stdevs.sql", "name": "default__test_expect_column_values_to_be_within_n_stdevs", "macro_sql": "{% macro default__test_expect_column_values_to_be_within_n_stdevs(model,\n column_name,\n group_by,\n sigma_threshold\n ) %}\nwith metric_values as (\n\n {% if group_by -%}\n select\n {{ group_by }} as metric_date,\n sum({{ column_name }}) as {{ column_name }}\n from\n {{ model }}\n group by\n 1\n {%- else -%}\n select\n {{ column_name }} as {{ column_name }}\n from\n {{ model }}\n {%- endif %}\n\n),\nmetric_values_with_statistics as (\n\n select\n *,\n avg({{ column_name }}) over() as {{ column_name }}_average,\n stddev({{ column_name }}) over() as {{ column_name }}_stddev\n from\n metric_values\n\n),\nmetric_values_z_scores as (\n\n select\n *,\n ({{ column_name }} - {{ column_name }}_average)/{{ column_name }}_stddev as {{ column_name }}_sigma\n from\n metric_values_with_statistics\n\n)\nselect\n *\nfrom\n metric_values_z_scores\nwhere\n abs({{ column_name }}_sigma) > {{ sigma_threshold }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.400715}, "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% test expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) -%}\n {{ adapter.dispatch('test_expect_select_column_values_to_be_unique_within_record', 'dbt_expectations') (model, column_list, quote_columns, ignore_row_if, row_condition) }}\n{%- endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.4024398}, "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record": {"unique_id": "macro.dbt_expectations.default__test_expect_select_column_values_to_be_unique_within_record", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "original_file_path": "macros/schema_tests/multi-column/expect_select_column_values_to_be_unique_within_record.sql", "name": "default__test_expect_select_column_values_to_be_unique_within_record", "macro_sql": "{% macro default__test_expect_select_column_values_to_be_unique_within_record(model,\n column_list,\n quote_columns,\n ignore_row_if,\n row_condition\n ) %}\n\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\nwith column_values as (\n\n select\n row_number() over(order by 1) as row_index,\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where 1=1\n {% if row_condition %}\n and {{ row_condition }}\n {% endif %}\n {% if ignore_row_if == \"all_values_are_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {%- endfor %}\n )\n {% elif ignore_row_if == \"any_value_is_missing\" %}\n and\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {%- endfor %}\n )\n {% endif %}\n\n),\nunpivot_columns as (\n\n {% for column in columns %}\n select row_index, '{{ column }}' as column_name, {{ column }} as column_value from column_values\n {% if not loop.last %}union all{% endif %}\n {% endfor %}\n),\nvalidation_errors as (\n\n select\n row_index,\n count(distinct column_value) as column_values\n from unpivot_columns\n group by 1\n having count(distinct column_value) < {{ columns | length }}\n\n)\nselect * from validation_errors\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.403722}, "macro.dbt_expectations.test_expect_compound_columns_to_be_unique": {"unique_id": "macro.dbt_expectations.test_expect_compound_columns_to_be_unique", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "original_file_path": "macros/schema_tests/multi-column/expect_compound_columns_to_be_unique.sql", "name": "test_expect_compound_columns_to_be_unique", "macro_sql": "{% test expect_compound_columns_to_be_unique(model,\n column_list,\n quote_columns=False,\n ignore_row_if=\"all_values_are_missing\",\n row_condition=None\n ) %}\n{% if not column_list %}\n {{ exceptions.raise_compiler_error(\n \"`column_list` must be specified as a list of columns. Got: '\" ~ column_list ~\"'.'\"\n ) }}\n{% endif %}\n{% if not quote_columns %}\n {%- set columns=column_list %}\n{% elif quote_columns %}\n {%- set columns=[] %}\n {% for column in column_list -%}\n {% set columns = columns.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for expect_compound_columns_to_be_unique test must be one of [True, False] Got: '\" ~ quote_columns ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set row_condition_ext -%}\n\n{%- if row_condition %}\n {{ row_condition }} and\n{% endif -%}\n\n{%- if ignore_row_if == \"all_values_are_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} and {% endif %}\n {% endfor %}\n )\n{%- elif ignore_row_if == \"any_value_is_missing\" %}\n (\n {% for column in columns -%}\n {{ column }} is not null{% if not loop.last %} or {% endif %}\n {% endfor %}\n )\n{%- endif -%}\n{%- endset -%}\n\nwith validation_errors as (\n\n select\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n from {{ model }}\n where\n 1=1\n {%- if row_condition_ext %}\n and {{ row_condition_ext }}\n {% endif %}\n group by\n {% for column in columns -%}\n {{ column }}{% if not loop.last %},{% endif %}\n {%- endfor %}\n having count(*) > 1\n\n)\nselect * from validation_errors\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.4063601}, "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal": {"unique_id": "macro.dbt_expectations.test_expect_multicolumn_sum_to_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_multicolumn_sum_to_equal.sql", "name": "test_expect_multicolumn_sum_to_equal", "macro_sql": "{% test expect_multicolumn_sum_to_equal(model,\n column_list,\n sum_total,\n group_by=None,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for column in column_list %}\nsum({{ column }}){% if not loop.last %} + {% endif %}\n{% endfor %} = {{ sum_total }}\n{% endset %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=group_by,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.40726}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_equal", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_equal.sql", "name": "test_expect_column_pair_values_to_be_equal", "macro_sql": "{% test expect_column_pair_values_to_be_equal(model,\n column_A,\n column_B,\n row_condition=None\n ) %}\n\n{% set operator = \"=\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.407895}, "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_A_to_be_greater_than_B", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_A_to_be_greater_than_B.sql", "name": "test_expect_column_pair_values_A_to_be_greater_than_B", "macro_sql": "{% test expect_column_pair_values_A_to_be_greater_than_B(model,\n column_A,\n column_B,\n or_equal=False,\n row_condition=None\n ) %}\n\n{% set operator = \">=\" if or_equal else \">\" %}\n{% set expression = column_A ~ \" \" ~ operator ~ \" \" ~ column_B %}\n\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.408592}, "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set": {"unique_id": "macro.dbt_expectations.test_expect_column_pair_values_to_be_in_set", "package_name": "dbt_expectations", "root_path": "/Users/jackforgash/gh/flow-models/dbt_packages/dbt_expectations", "path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "original_file_path": "macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql", "name": "test_expect_column_pair_values_to_be_in_set", "macro_sql": "{% test expect_column_pair_values_to_be_in_set(model,\n column_A,\n column_B,\n value_pairs_set,\n row_condition=None\n ) %}\n\n{% set expression %}\n{% for pair in value_pairs_set %}\n{%- if (pair | length) == 2 %}\n({{ column_A }} = {{ pair[0] }} and {{ column_B }} = {{ pair[1] }}){% if not loop.last %} or {% endif %}\n{% else %}\n{{ exceptions.raise_compiler_error(\n \"`value_pairs_set` argument for expect_column_pair_values_to_be_in_set test cannot have more than 2 item per element.\n Got: '\" ~ pair ~ \"'.'\"\n ) }}\n{% endif %}\n{% endfor %}\n{% endset %}\n{{ dbt_expectations.expression_is_true(model,\n expression=expression,\n group_by_columns=None,\n row_condition=row_condition\n )\n }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_expectations.expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1653000028.4099462}}, "docs": {"flow_models.address_name": {"unique_id": "flow_models.address_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/address_name.md", "original_file_path": "models/descriptions/address_name.md", "name": "address_name", "block_contents": "The name for a specific address, like Kraken or Huobi for CEX, or consensus vs verification for validator."}, "flow_models.blockchain": {"unique_id": "flow_models.blockchain", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/blockchain.md", "original_file_path": "models/descriptions/blockchain.md", "name": "blockchain", "block_contents": "The name of the blockchain for this address."}, "flow_models.tx_count": {"unique_id": "flow_models.tx_count", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_count.md", "original_file_path": "models/descriptions/tx_count.md", "name": "tx_count", "block_contents": "The number of transactions in the block."}, "flow_models.count_authorizers": {"unique_id": "flow_models.count_authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/count_authorizers.md", "original_file_path": "models/descriptions/count_authorizers.md", "name": "count_authorizers", "block_contents": "Number of authorizers"}, "flow_models.tx_id": {"unique_id": "flow_models.tx_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_id.md", "original_file_path": "models/descriptions/tx_id.md", "name": "tx_id", "block_contents": "ID for the transaction."}, "flow_models.event_index": {"unique_id": "flow_models.event_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_index.md", "original_file_path": "models/descriptions/event_index.md", "name": "event_index", "block_contents": "The index of the event within the transaction, i.e. in what order the events occurred."}, "flow_models.network": {"unique_id": "flow_models.network", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/network.md", "original_file_path": "models/descriptions/network.md", "name": "network", "block_contents": "The blockchain network the block or transaction occurred on."}, "flow_models.proposer": {"unique_id": "flow_models.proposer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/proposer.md", "original_file_path": "models/descriptions/proposer.md", "name": "proposer", "block_contents": "Address of the transaction proposer."}, "flow_models.event_contract": {"unique_id": "flow_models.event_contract", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_contract.md", "original_file_path": "models/descriptions/event_contract.md", "name": "event_contract", "block_contents": "The contract called for this event. This is equivalent to the Contract column on Flowscan and is a concatenation of the contract's account address and primary name."}, "flow_models.tx_succeeded": {"unique_id": "flow_models.tx_succeeded", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/tx_succeeded.md", "original_file_path": "models/descriptions/tx_succeeded.md", "name": "tx_succeeded", "block_contents": "Transaction status, if it succeeded or failed."}, "flow_models.gas_limit": {"unique_id": "flow_models.gas_limit", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/gas_limit.md", "original_file_path": "models/descriptions/gas_limit.md", "name": "gas_limit", "block_contents": "Upper gas limit attached to the transaction."}, "flow_models.attribute_key": {"unique_id": "flow_models.attribute_key", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_key.md", "original_file_path": "models/descriptions/attribute_key.md", "name": "attribute_key", "block_contents": "The key of the attribute key-value pair. This is the label while attribute_value is the data."}, "flow_models.label_subtype": {"unique_id": "flow_models.label_subtype", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/label_subtype.md", "original_file_path": "models/descriptions/label_subtype.md", "name": "label_subtype", "block_contents": "The type of address, within the higher order label_type, such as hot wallet, deposit wallet, validator, etc."}, "flow_models.attribute_value": {"unique_id": "flow_models.attribute_value", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value.md", "original_file_path": "models/descriptions/attribute_value.md", "name": "attribute_value", "block_contents": "The value of the attribute key-value pair. This is the data that attribute_key labels."}, "flow_models._ingested_at": {"unique_id": "flow_models._ingested_at", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_ingested_at.md", "original_file_path": "models/descriptions/_ingested_at.md", "name": "_ingested_at", "block_contents": "When the record was ingested by the chainwalker."}, "flow_models.creator": {"unique_id": "flow_models.creator", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/creator.md", "original_file_path": "models/descriptions/creator.md", "name": "creator", "block_contents": "The source of the labeling information for the address."}, "flow_models.event_data": {"unique_id": "flow_models.event_data", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_data.md", "original_file_path": "models/descriptions/event_data.md", "name": "event_data", "block_contents": "The raw event data from the event."}, "flow_models.payer": {"unique_id": "flow_models.payer", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/payer.md", "original_file_path": "models/descriptions/payer.md", "name": "payer", "block_contents": "Address of the wallet paying for the transaction."}, "flow_models.decoded_address": {"unique_id": "flow_models.decoded_address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/decoded_address.md", "original_file_path": "models/descriptions/decoded_address.md", "name": "decoded_address", "block_contents": "The decoded address, if applicable, for the attribute_value."}, "flow_models.attribute_id": {"unique_id": "flow_models.attribute_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_id.md", "original_file_path": "models/descriptions/attribute_id.md", "name": "attribute_id", "block_contents": "ID for the attribute, which is a concatenation of tx_id-event_index-attribute_index."}, "flow_models.id": {"unique_id": "flow_models.id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/id.md", "original_file_path": "models/descriptions/id.md", "name": "id", "block_contents": "The block hash."}, "flow_models._event_data_type": {"unique_id": "flow_models._event_data_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_type.md", "original_file_path": "models/descriptions/_event_data_type.md", "name": "_event_data_type", "block_contents": "The type object from event_data."}, "flow_models.contract_name": {"unique_id": "flow_models.contract_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/contract_name.md", "original_file_path": "models/descriptions/contract_name.md", "name": "contract_name", "block_contents": "The primary name of the contract, derived from the full contract address."}, "flow_models.address": {"unique_id": "flow_models.address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/address.md", "original_file_path": "models/descriptions/address.md", "name": "address", "block_contents": "The on-chain address."}, "flow_models.attribute_index": {"unique_id": "flow_models.attribute_index", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_index.md", "original_file_path": "models/descriptions/attribute_index.md", "name": "attribute_index", "block_contents": "Index of the attribute within the event, corresponds with how the attributes are presented on the explorer."}, "flow_models._event_data_fields": {"unique_id": "flow_models._event_data_fields", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/_event_data_fields.md", "original_file_path": "models/descriptions/_event_data_fields.md", "name": "_event_data_fields", "block_contents": "The fields object from the event_data."}, "flow_models.attribute_value_adj": {"unique_id": "flow_models.attribute_value_adj", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/attribute_value_adj.md", "original_file_path": "models/descriptions/attribute_value_adj.md", "name": "attribute_value_adj", "block_contents": "The adjusted attribute_value where an address from decoded_address is used in place of the encoded binary string, where applicable."}, "flow_models.block_height": {"unique_id": "flow_models.block_height", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_height.md", "original_file_path": "models/descriptions/block_height.md", "name": "block_height", "block_contents": "The block height the block was recorded at."}, "flow_models.event_id": {"unique_id": "flow_models.event_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_id.md", "original_file_path": "models/descriptions/event_id.md", "name": "event_id", "block_contents": "The id for the event, which is a concatenation of tx_id-event_index."}, "flow_models.event_attributes": {"unique_id": "flow_models.event_attributes", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_attributes.md", "original_file_path": "models/descriptions/event_attributes.md", "name": "event_attributes", "block_contents": "The data passed to the event, in the form of key-value pairs."}, "flow_models.transaction_result": {"unique_id": "flow_models.transaction_result", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/transaction_result.md", "original_file_path": "models/descriptions/transaction_result.md", "name": "transaction_result", "block_contents": "Outcome of the transaction, including events that were called."}, "flow_models.account_address": {"unique_id": "flow_models.account_address", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/account_address.md", "original_file_path": "models/descriptions/account_address.md", "name": "account_address", "block_contents": "The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a."}, "flow_models.project_name": {"unique_id": "flow_models.project_name", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/project_name.md", "original_file_path": "models/descriptions/project_name.md", "name": "project_name", "block_contents": "The overarching project name, related to the address name. For example, Kraken (vs. Kraken Deposit Wallet for address_names)."}, "flow_models.label_type": {"unique_id": "flow_models.label_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/label_type.md", "original_file_path": "models/descriptions/label_type.md", "name": "label_type", "block_contents": "Predominant label categorization, such as CEX, Operator, NFT, etc."}, "flow_models.authorizers": {"unique_id": "flow_models.authorizers", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/authorizers.md", "original_file_path": "models/descriptions/authorizers.md", "name": "authorizers", "block_contents": "Address(es) authorizing the transaction."}, "flow_models.event_type": {"unique_id": "flow_models.event_type", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/event_type.md", "original_file_path": "models/descriptions/event_type.md", "name": "event_type", "block_contents": "The type of method called on the event_contract. This is equivalent to the Type column on Flowscan."}, "flow_models.parent_id": {"unique_id": "flow_models.parent_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/parent_id.md", "original_file_path": "models/descriptions/parent_id.md", "name": "parent_id", "block_contents": "The block hash for the parent block."}, "flow_models.chain_id": {"unique_id": "flow_models.chain_id", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/chain_id.md", "original_file_path": "models/descriptions/chain_id.md", "name": "chain_id", "block_contents": "The id for the chain of the network on which this block occurred."}, "flow_models.block_timestamp": {"unique_id": "flow_models.block_timestamp", "package_name": "flow_models", "root_path": "/Users/jackforgash/gh/flow-models", "path": "descriptions/block_timestamp.md", "original_file_path": "models/descriptions/block_timestamp.md", "name": "block_timestamp", "block_contents": "The date and time for when the block was written."}, "dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-snowflake/1.0.0_3/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"model.flow_models.core__fact_events": ["model.flow_models.gold__events"], "model.flow_models.core__fact_transactions": ["model.flow_models.gold__transactions"], "model.flow_models.core__fact_blocks": ["model.flow_models.gold__blocks"], "model.flow_models.bronze__labels": ["source.flow_models.crosschain.address_labels"], "model.flow_models.bronze__blocks": ["source.flow_models.prod.flow_blocks"], "model.flow_models.bronze__transactions": ["source.flow_models.prod.flow_txs"], "model.flow_models.silver__events": ["model.flow_models.silver__transactions"], "model.flow_models.silver__contract_labels": ["model.flow_models.silver__events"], "model.flow_models.silver__event_attributes": ["model.flow_models.silver__events"], "model.flow_models.silver__labels": ["model.flow_models.bronze__labels"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": ["model.flow_models.core__fact_blocks"], "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_id.88f5737541": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": ["model.flow_models.core__fact_blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": ["model.flow_models.core__fact_blocks"], "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": ["model.flow_models.core__fact_transactions"], "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": ["model.flow_models.core__fact_transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": ["model.flow_models.core__fact_transactions"], "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": ["model.flow_models.core__fact_events"], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": ["model.flow_models.core__fact_events"], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": ["model.flow_models.silver__events"], "test.flow_models.unique_silver__events_event_id.c34161972a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_block_height.7977589637": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_contract.d88483871a": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_type.db25419673": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": ["model.flow_models.silver__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": ["model.flow_models.silver__events"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": ["model.flow_models.silver__events"], "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": ["model.flow_models.silver__contract_labels"], "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": ["model.flow_models.silver__contract_labels"], "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": ["model.flow_models.silver__contract_labels"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": ["model.flow_models.silver__contract_labels"], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": ["model.flow_models.silver__event_attributes"], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": ["model.flow_models.silver__event_attributes"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": ["model.flow_models.silver__event_attributes"], "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": ["model.flow_models.silver__labels"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": ["model.flow_models.silver__labels"], "model.flow_models.gold__blocks": ["model.flow_models.silver__blocks"], "model.flow_models.gold__transactions": ["model.flow_models.silver__transactions"], "model.flow_models.silver__blocks": ["model.flow_models.bronze__blocks"], "model.flow_models.silver__transactions": ["model.flow_models.bronze__transactions"], "model.flow_models.gold__events": ["model.flow_models.silver__event_attributes", "model.flow_models.silver__events"], "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": ["model.flow_models.gold__blocks"], "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_network.1290e522fb": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_id.6c4c044819": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": ["model.flow_models.gold__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": ["model.flow_models.gold__blocks"], "test.flow_models.sequence_gaps_gold__blocks_block_height.57b7dba0ad": ["model.flow_models.gold__blocks"], "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": ["model.flow_models.gold__transactions"], "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": ["model.flow_models.gold__transactions"], "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6": ["model.flow_models.gold__transactions", "model.flow_models.silver__blocks"], "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_payer.efa8662752": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": ["model.flow_models.gold__transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": ["model.flow_models.gold__transactions"], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": ["model.flow_models.silver__blocks"], "test.flow_models.unique_silver__blocks_block_height.478ce02832": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_id.b40d544128": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": ["model.flow_models.silver__blocks"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": ["model.flow_models.silver__blocks"], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": ["model.flow_models.silver__transactions"], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": ["model.flow_models.silver__transactions"], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": ["model.flow_models.silver__transactions"], "test.flow_models.not_null_gold__events_tx_id.95926804a2": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_index.b152284f0b": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_contract.7794754732": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": ["model.flow_models.gold__events"], "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": ["model.flow_models.gold__events"], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": ["model.flow_models.gold__events"], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": ["model.flow_models.gold__events"], "source.flow_models.prod.flow_blocks": [], "source.flow_models.prod.flow_txs": [], "source.flow_models.crosschain.address_labels": []}, "child_map": {"model.flow_models.core__fact_events": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0", "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0", "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c", "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4", "test.flow_models.not_null_core__fact_events_event_contract.10b5644238", "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3", "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae", "test.flow_models.not_null_core__fact_events_event_type.d865a2b006", "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe", "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade"], "model.flow_models.core__fact_transactions": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2", "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1", "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd", "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7", "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2", "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e", "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a", "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710", "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749", "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21", "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e", "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382", "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e", "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757", "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c", "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522"], "model.flow_models.core__fact_blocks": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b", "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c", "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758", "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722", "test.flow_models.not_null_core__fact_blocks_id.88f5737541", "test.flow_models.not_null_core__fact_blocks_network.2708505a8a", "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8", "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174", "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d"], "model.flow_models.bronze__labels": ["model.flow_models.silver__labels"], "model.flow_models.bronze__blocks": ["model.flow_models.silver__blocks"], "model.flow_models.bronze__transactions": ["model.flow_models.silver__transactions"], "model.flow_models.silver__events": ["model.flow_models.gold__events", "model.flow_models.silver__contract_labels", "model.flow_models.silver__event_attributes", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b", "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c", "test.flow_models.not_null_silver__events__event_data_type.db25419673", "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea", "test.flow_models.not_null_silver__events_block_height.7977589637", "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9", "test.flow_models.not_null_silver__events_event_contract.d88483871a", "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b", "test.flow_models.not_null_silver__events_event_id.c5f00655c1", "test.flow_models.not_null_silver__events_event_index.4e05dcc574", "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf", "test.flow_models.not_null_silver__events_tx_id.2724c3889b", "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1", "test.flow_models.unique_silver__events_event_id.c34161972a"], "model.flow_models.silver__contract_labels": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29", "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1", "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e", "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b"], "model.flow_models.silver__event_attributes": ["model.flow_models.gold__events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292", "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97", "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764", "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25", "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450", "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f", "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266", "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09", "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a", "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92", "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe", "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19"], "model.flow_models.silver__labels": ["test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7", "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f"], "operation.flow_models.flow_models-on-run-start-0": [], "operation.flow_models.flow_models-on-run-start-1": [], "test.flow_models.not_null_core__fact_blocks_block_height.69ece9390c": [], "test.flow_models.unique_core__fact_blocks_block_height.cf41b05a2d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_height__NUMBER__FLOAT.c551ea53de": [], "test.flow_models.not_null_core__fact_blocks_block_timestamp.19853d3758": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_blocks_block_timestamp__day__1.5ba40a446b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_block_timestamp__TIMESTAMP_NTZ.d2fe6e451c": [], "test.flow_models.not_null_core__fact_blocks_network.2708505a8a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_network__STRING__VARCHAR.68dc7d044a": [], "test.flow_models.not_null_core__fact_blocks_chain_id.dda8c73722": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_chain_id__STRING__VARCHAR.ccd79281c7": [], "test.flow_models.not_null_core__fact_blocks_tx_count.168249e174": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_tx_count__NUMBER.7f70f6af70": [], "test.flow_models.not_null_core__fact_blocks_id.88f5737541": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_id__STRING__VARCHAR.b957f32491": [], "test.flow_models.not_null_core__fact_blocks_parent_id.a9c18dafa8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_blocks_parent_id__STRING__VARCHAR.9494ae2ff5": [], "test.flow_models.not_null_core__fact_transactions_tx_id.dd94c1ac9e": [], "test.flow_models.unique_core__fact_transactions_tx_id.211ea20522": [], "test.flow_models.not_null_core__fact_transactions_block_timestamp.32cc47fbb2": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_transactions_block_timestamp__day__1.7e1b77d1c2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_timestamp__TIMESTAMP_NTZ.4c087aa60b": [], "test.flow_models.not_null_core__fact_transactions_block_height.b73a6596e7": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_block_height__NUMBER__FLOAT.5fa2b2e8e3": [], "test.flow_models.not_null_core__fact_transactions_chain_id.e687eaeb3e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_chain_id__STRING__VARCHAR.5f1f4feacd": [], "test.flow_models.not_null_core__fact_transactions_tx_index.4b4bf18757": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_index__NUMBER.8612fa3af5": [], "test.flow_models.not_null_core__fact_transactions_proposer.990b43a37e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_proposer__STRING__VARCHAR.3162d546cc": [], "test.flow_models.not_null_core__fact_transactions_payer.ca8c699f21": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_payer__STRING__VARCHAR.7f4eda4774": [], "test.flow_models.not_null_core__fact_transactions_authorizers.1c6d0dc6dd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_authorizers__ARRAY.40cd40c72c": [], "test.flow_models.not_null_core__fact_transactions_count_authorizers.b2e0d7cb4a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_count_authorizers__NUMBER.56bac6ce9a": [], "test.flow_models.not_null_core__fact_transactions_gas_limit.c3fb97a749": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_gas_limit__NUMBER.86a8eb924d": [], "test.flow_models.not_null_core__fact_transactions_transaction_result.6b64c04382": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_transaction_result__VARIANT.24fe91c33c": [], "test.flow_models.not_null_core__fact_transactions_tx_succeeded.85fd90691c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_tx_succeeded__BOOLEAN.0243d3b703": [], "test.flow_models.not_null_core__fact_transactions_error_msg.63392f4710": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_transactions_error_msg__STRING__VARCHAR.e752ab1a51": [], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_transactions_tx_id__block_height.3964206ae1": [], "test.flow_models.not_null_core__fact_events_tx_id.a75802bdbe": [], "test.flow_models.not_null_core__fact_events_block_timestamp.d98411a5a4": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_core__fact_events_block_timestamp__day__1.964ce35cb0": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_timestamp__TIMESTAMP_NTZ.6ae335d7ec": [], "test.flow_models.not_null_core__fact_events_block_height.b32a201e7c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_block_height__NUMBER__FLOAT.fe6965678e": [], "test.flow_models.not_null_core__fact_events_tx_succeeded.a025fdaade": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_tx_succeeded__BOOLEAN.45ed5180fb": [], "test.flow_models.not_null_core__fact_events_event_index.6ef75550ae": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_index__NUMBER.97adfdc32e": [], "test.flow_models.not_null_core__fact_events_event_contract.10b5644238": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_contract__STRING__VARCHAR.71773095a7": [], "test.flow_models.not_null_core__fact_events_event_type.d865a2b006": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_type__STRING__VARCHAR.7f1b318eb5": [], "test.flow_models.not_null_core__fact_events_event_data.ed27e5dfa3": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_core__fact_events_event_data__OBJECT.e938d8505a": [], "test.flow_models.dbt_utils_unique_combination_of_columns_core__fact_events_tx_id__event_index.094fa0d9a0": [], "test.flow_models.not_null_silver__events_event_id.c5f00655c1": [], "test.flow_models.unique_silver__events_event_id.c34161972a": [], "test.flow_models.not_null_silver__events_tx_id.2724c3889b": [], "test.flow_models.not_null_silver__events_block_timestamp.0d672756c9": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__events_block_timestamp__day__1.e66863d1b6": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_timestamp__TIMESTAMP_NTZ.b8159b300f": [], "test.flow_models.not_null_silver__events_block_height.7977589637": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_block_height__NUMBER__FLOAT.638b29edb1": [], "test.flow_models.not_null_silver__events_tx_succeeded.ab918b04f1": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_tx_succeeded__BOOLEAN.eeaef620f9": [], "test.flow_models.not_null_silver__events_event_index.4e05dcc574": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_index__NUMBER.bb1ee7bb7a": [], "test.flow_models.not_null_silver__events_event_contract.d88483871a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_contract__STRING__VARCHAR.ed992b96f4": [], "test.flow_models.not_null_silver__events_event_type.e87e1cd6bf": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_type__STRING__VARCHAR.12fbcff915": [], "test.flow_models.not_null_silver__events_event_data.b8ca9adb1b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events_event_data__VARIANT.7e8a001808": [], "test.flow_models.not_null_silver__events__event_data_type.db25419673": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_type__VARIANT.6a1896af64": [], "test.flow_models.not_null_silver__events__event_data_fields.32c9e3af8c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__event_data_fields__VARIANT.8f36b05ba8": [], "test.flow_models.not_null_silver__events__ingested_at.0281fcdbea": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__events__ingested_at__TIMESTAMP_NTZ.0bf7d77559": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__events_tx_id__event_index.5975227b3b": [], "test.flow_models.not_null_silver__contract_labels_event_contract.7bbcf32a3b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_event_contract__STRING__VARCHAR.1566d40837": [], "test.flow_models.not_null_silver__contract_labels_contract_name.282cfdc77e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_contract_name__STRING__VARCHAR.45ed943358": [], "test.flow_models.not_null_silver__contract_labels_account_address.8ede8d9df1": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__contract_labels_account_address__STRING__VARCHAR.4870d7a714": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__contract_labels_event_contract__contract_name.5c036b1b29": [], "test.flow_models.not_null_silver__event_attributes_attribute_id.3ad9865764": [], "test.flow_models.unique_silver__event_attributes_attribute_id.4f30431d19": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_id__STRING__VARCHAR.705a0716b6": [], "test.flow_models.not_null_silver__event_attributes_event_id.47ecc4ec09": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_id__STRING__VARCHAR.c4817805e9": [], "test.flow_models.not_null_silver__event_attributes_tx_id.bdfb364abe": [], "test.flow_models.not_null_silver__event_attributes_block_timestamp.944b580d9f": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__event_attributes_block_timestamp__day__1.e4d1cd2bed": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_block_timestamp__TIMESTAMP_NTZ.04568fce2d": [], "test.flow_models.not_null_silver__event_attributes_event_index.fb0efb852a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_index__NUMBER.d18950f9c0": [], "test.flow_models.not_null_silver__event_attributes_attribute_index.2a6ba94c25": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_index__NUMBER.c6e1c155bb": [], "test.flow_models.not_null_silver__event_attributes_event_contract.2fd3336266": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_contract__STRING__VARCHAR.6f7dc2d420": [], "test.flow_models.not_null_silver__event_attributes_event_type.d082eb6e92": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_event_type__STRING__VARCHAR.09e85d8039": [], "test.flow_models.not_null_silver__event_attributes_attribute_key.6660426450": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes_attribute_key__STRING__VARCHAR.ad47f99c21": [], "test.flow_models.not_null_silver__event_attributes__ingested_at.b55be5fe97": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__event_attributes__ingested_at__TIMESTAMP_NTZ.65e90e3d1f": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__event_attributes_tx_id__event_index__attribute_index.a118550292": [], "test.flow_models.not_null_silver__labels__ingested_at.da68161b4f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels__ingested_at__TIMESTAMP_NTZ.8c74f58780": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_blockchain__STRING__VARCHAR.5fdfe8c7f8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address__STRING__VARCHAR.44f4101476": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_creator__STRING__VARCHAR.588aa5dd1b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_type__STRING__VARCHAR.6353b89b18": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_label_subtype__STRING__VARCHAR.bfa65fbefa": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_address_name__STRING__VARCHAR.1935202fe4": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__labels_project_name__STRING__VARCHAR.4a71a259a7": [], "model.flow_models.gold__blocks": ["model.flow_models.core__fact_blocks", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8", "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313", "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967", "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4", "test.flow_models.not_null_gold__blocks_id.6c4c044819", "test.flow_models.not_null_gold__blocks_network.1290e522fb", "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02", "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f", "test.flow_models.sequence_gaps_gold__blocks_block_height.57b7dba0ad", "test.flow_models.unique_gold__blocks_block_height.7c3e159f31"], "model.flow_models.gold__transactions": ["model.flow_models.core__fact_transactions", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185", "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8", "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073", "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906", "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d", "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd", "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2", "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d", "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd", "test.flow_models.not_null_gold__transactions_payer.efa8662752", "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134", "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f", "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14", "test.flow_models.not_null_gold__transactions_tx_index.78407db79c", "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49", "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6", "test.flow_models.unique_gold__transactions_tx_id.c038e1f494"], "model.flow_models.silver__blocks": ["model.flow_models.gold__blocks", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d", "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e", "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0", "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b", "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd", "test.flow_models.not_null_silver__blocks_id.b40d544128", "test.flow_models.not_null_silver__blocks_network.2020ad46b9", "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40", "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16", "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6", "test.flow_models.unique_silver__blocks_block_height.478ce02832"], "model.flow_models.silver__transactions": ["model.flow_models.gold__transactions", "model.flow_models.silver__events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00", "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a", "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8", "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d", "test.flow_models.not_null_silver__transactions_block_height.52f8623258", "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986", "test.flow_models.not_null_silver__transactions_chain_id.e843c29add", "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a", "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2", "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045", "test.flow_models.not_null_silver__transactions_payer.af7cfd0161", "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80", "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512", "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f", "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c", "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a", "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169"], "model.flow_models.gold__events": ["model.flow_models.core__fact_events", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0", "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83", "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326", "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5", "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc", "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120", "test.flow_models.not_null_gold__events_event_contract.7794754732", "test.flow_models.not_null_gold__events_event_data.c5e8d4c967", "test.flow_models.not_null_gold__events_event_index.b152284f0b", "test.flow_models.not_null_gold__events_event_type.f7e447ca7d", "test.flow_models.not_null_gold__events_tx_id.95926804a2", "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf"], "test.flow_models.not_null_gold__blocks_block_height.a4ddd42313": [], "test.flow_models.unique_gold__blocks_block_height.7c3e159f31": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_height__NUMBER__FLOAT.b4ad933972": [], "test.flow_models.not_null_gold__blocks_block_timestamp.7b3d20d967": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__blocks_block_timestamp__day__1.34d5f6a1d8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_block_timestamp__TIMESTAMP_NTZ.1c34247c2a": [], "test.flow_models.not_null_gold__blocks_network.1290e522fb": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_network__STRING__VARCHAR.b9a1e8ed08": [], "test.flow_models.not_null_gold__blocks_chain_id.56f62ea8d4": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_chain_id__STRING__VARCHAR.5c6c59f589": [], "test.flow_models.not_null_gold__blocks_tx_count.0ac41a407f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_tx_count__NUMBER.fed411c444": [], "test.flow_models.not_null_gold__blocks_id.6c4c044819": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_id__STRING__VARCHAR.976d79a911": [], "test.flow_models.not_null_gold__blocks_parent_id.22e66ffa02": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__blocks_parent_id__STRING__VARCHAR.5ade9fdaf7": [], "test.flow_models.sequence_gaps_gold__blocks_block_height.57b7dba0ad": [], "test.flow_models.not_null_gold__transactions_tx_id.cd9fce6e14": [], "test.flow_models.unique_gold__transactions_tx_id.c038e1f494": [], "test.flow_models.tx_gaps_gold__transactions_block_height__tx_id__tx_count.94ac0787a6": [], "test.flow_models.not_null_gold__transactions_block_timestamp.ead04bb43d": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__transactions_block_timestamp__day__1.0f3f99b185": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_timestamp__TIMESTAMP_NTZ.fd99e5a947": [], "test.flow_models.not_null_gold__transactions_block_height.e7ccac5906": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_block_height__NUMBER__FLOAT.c7c4f87629": [], "test.flow_models.not_null_gold__transactions_chain_id.a150808bdd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_chain_id__STRING__VARCHAR.2040f4a1b7": [], "test.flow_models.not_null_gold__transactions_tx_index.78407db79c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_index__NUMBER.819f55dfe8": [], "test.flow_models.not_null_gold__transactions_proposer.1b8f46e134": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_proposer__STRING__VARCHAR.779db46ba2": [], "test.flow_models.not_null_gold__transactions_payer.efa8662752": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_payer__STRING__VARCHAR.3e55ba3297": [], "test.flow_models.not_null_gold__transactions_authorizers.8dd4ed6073": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_authorizers__ARRAY.0ec3a9a656": [], "test.flow_models.not_null_gold__transactions_count_authorizers.aaa4409fa2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_count_authorizers__NUMBER.cb19f10281": [], "test.flow_models.not_null_gold__transactions_gas_limit.fc492b2dfd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_gas_limit__NUMBER.6e317a0dc5": [], "test.flow_models.not_null_gold__transactions_transaction_result.ae3aa5216f": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_transaction_result__VARIANT.64a0e190da": [], "test.flow_models.not_null_gold__transactions_tx_succeeded.8b7f157e49": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_tx_succeeded__BOOLEAN.6af1bc39c9": [], "test.flow_models.not_null_gold__transactions_error_msg.22f2de539d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__transactions_error_msg__STRING__VARCHAR.181329cdb3": [], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__transactions_tx_id__block_height.de99296ea8": [], "test.flow_models.not_null_silver__blocks_block_height.02ee14acf0": [], "test.flow_models.unique_silver__blocks_block_height.478ce02832": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_height__NUMBER__FLOAT.08d0d3007d": [], "test.flow_models.not_null_silver__blocks_block_timestamp.0920efa41b": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_block_timestamp__day__1.21cac2f295": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_block_timestamp__TIMESTAMP_NTZ.a690d9e325": [], "test.flow_models.not_null_silver__blocks_network.2020ad46b9": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_network__STRING__VARCHAR.26015d603d": [], "test.flow_models.not_null_silver__blocks_chain_id.e394116ffd": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_chain_id__STRING__VARCHAR.584a39c0cd": [], "test.flow_models.not_null_silver__blocks_tx_count.94a4655c16": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_tx_count__NUMBER.1cb989a05c": [], "test.flow_models.not_null_silver__blocks_id.b40d544128": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_id__STRING__VARCHAR.8bb956333b": [], "test.flow_models.not_null_silver__blocks_parent_id.af2d66dc40": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks_parent_id__STRING__VARCHAR.7766b9947a": [], "test.flow_models.not_null_silver__blocks__ingested_at.1c6c52802e": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__blocks__ingested_at__TIMESTAMP_NTZ.09b669eb41": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__blocks_block_height.856e4b724d": [], "test.flow_models.not_null_silver__transactions_tx_id.e15d9d9f4f": [], "test.flow_models.unique_silver__transactions_tx_id.dbbd06c169": [], "test.flow_models.not_null_silver__transactions_block_timestamp.1554985986": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_silver__transactions_block_timestamp__day__1.bdc2ddbf00": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_timestamp__TIMESTAMP_NTZ.f416456b03": [], "test.flow_models.not_null_silver__transactions_block_height.52f8623258": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_block_height__NUMBER__FLOAT.15ef7838a0": [], "test.flow_models.not_null_silver__transactions_chain_id.e843c29add": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_chain_id__STRING__VARCHAR.315ac9801c": [], "test.flow_models.not_null_silver__transactions_tx_index.60e196ac6c": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_index__NUMBER.67298552e6": [], "test.flow_models.not_null_silver__transactions_proposer.e5fd969e80": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_proposer__STRING__VARCHAR.1db13669d4": [], "test.flow_models.not_null_silver__transactions_payer.af7cfd0161": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_payer__STRING__VARCHAR.93acfcdcf9": [], "test.flow_models.not_null_silver__transactions_authorizers.10e420e01d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_authorizers__ARRAY.5bba01f26d": [], "test.flow_models.not_null_silver__transactions_count_authorizers.5865533a1a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_count_authorizers__NUMBER.52b7f94171": [], "test.flow_models.not_null_silver__transactions_gas_limit.3b80819045": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_gas_limit__NUMBER.e4dc03e938": [], "test.flow_models.not_null_silver__transactions_transaction_result.a6300f1512": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_transaction_result__VARIANT.58a529e183": [], "test.flow_models.not_null_silver__transactions_tx_succeeded.71f19b6d4a": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_tx_succeeded__BOOLEAN.b3ac73b814": [], "test.flow_models.not_null_silver__transactions_error_msg.e518b36eb2": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions_error_msg__STRING__VARCHAR.825ab1f029": [], "test.flow_models.not_null_silver__transactions__ingested_at.954d945cd8": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_silver__transactions__ingested_at__TIMESTAMP_NTZ.e7fa39cc53": [], "test.flow_models.dbt_utils_unique_combination_of_columns_silver__transactions_tx_id__block_height.0a9bd5af5a": [], "test.flow_models.not_null_gold__events_tx_id.95926804a2": [], "test.flow_models.not_null_gold__events_block_timestamp.9df6a2e120": [], "test.flow_models.dbt_expectations_expect_row_values_to_have_recent_data_gold__events_block_timestamp__day__1.f629955326": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_timestamp__TIMESTAMP_NTZ.a4866d5211": [], "test.flow_models.not_null_gold__events_block_height.f9fa45c7dc": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_block_height__NUMBER__FLOAT.b679c42581": [], "test.flow_models.not_null_gold__events_tx_succeeded.a81457fdcf": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_tx_succeeded__BOOLEAN.2dac8e9c83": [], "test.flow_models.not_null_gold__events_event_index.b152284f0b": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_index__NUMBER.42fc1cb63c": [], "test.flow_models.not_null_gold__events_event_contract.7794754732": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_contract__STRING__VARCHAR.d6af95460c": [], "test.flow_models.not_null_gold__events_event_type.f7e447ca7d": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_type__STRING__VARCHAR.06e91772b0": [], "test.flow_models.not_null_gold__events_event_data.c5e8d4c967": [], "test.flow_models.dbt_expectations_expect_column_values_to_be_in_type_list_gold__events_event_data__OBJECT.44c8a778d8": [], "test.flow_models.dbt_utils_unique_combination_of_columns_gold__events_tx_id__event_index.04901bf0d5": [], "source.flow_models.prod.flow_blocks": ["model.flow_models.bronze__blocks"], "source.flow_models.prod.flow_txs": ["model.flow_models.bronze__transactions"], "source.flow_models.crosschain.address_labels": ["model.flow_models.bronze__labels"]}} \ No newline at end of file