diff --git a/dev/dags/dbt/altered_jaffle_shop/.gitignore b/dev/dags/dbt/altered_jaffle_shop/.gitignore new file mode 100644 index 000000000..45d294b9a --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/.gitignore @@ -0,0 +1,5 @@ + +target/ +dbt_packages/ +logs/ +!target/manifest.json diff --git a/dev/dags/dbt/altered_jaffle_shop/LICENSE b/dev/dags/dbt/altered_jaffle_shop/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/dags/dbt/altered_jaffle_shop/README.md b/dev/dags/dbt/altered_jaffle_shop/README.md new file mode 100644 index 000000000..d4ce46446 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/README.md @@ -0,0 +1,11 @@ +## `jaffle_shop` + +`jaffle_shop` is a fictional ecommerce store. This dbt project transforms raw data from an app database into a customers and orders model ready for analytics. + +See [dbt's documentation](https://github.com/dbt-labs/jaffle_shop) for more info. + +### Modifications + +This project has been modified from the original to highlight some of the features of Cosmos. Namely: + +- tags have been added to the models diff --git a/dev/dags/dbt/altered_jaffle_shop/dbt_ls_models_staging.txt b/dev/dags/dbt/altered_jaffle_shop/dbt_ls_models_staging.txt new file mode 100644 index 000000000..b8cc902ec --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/dbt_ls_models_staging.txt @@ -0,0 +1,9 @@ +14:26:04 Running with dbt=1.6.9 +14:26:04 Registered adapter: exasol=1.6.2 +14:26:04 Found 5 models, 3 seeds, 20 tests, 0 sources, 0 exposures, 0 metrics, 366 macros, 0 groups, 0 semantic models +{"name": "stg_customers", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_customers.sql", "unique_id": "model.jaffle_shop.stg_customers", "alias": "stg_customers", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_customers"]}} +{"name": "stg_orders", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_orders.sql", "unique_id": "model.jaffle_shop.stg_orders", "alias": "stg_orders", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_orders"]}} +{"name": "stg_payments", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_payments.sql", "unique_id": "model.jaffle_shop.stg_payments", "alias": "stg_payments", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_payments"]}} +{"name": "raw_customers", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_customers.csv", "unique_id": "seed.jaffle_shop.raw_customers", "alias": "raw_customers", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} +{"name": "raw_orders", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_orders.csv", "unique_id": "seed.jaffle_shop.raw_orders", "alias": "raw_orders", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} +{"name": "raw_payments", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_payments.csv", "unique_id": "seed.jaffle_shop.raw_payments", "alias": "raw_payments", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} diff --git a/dev/dags/dbt/altered_jaffle_shop/dbt_project.yml b/dev/dags/dbt/altered_jaffle_shop/dbt_project.yml new file mode 100644 index 000000000..acdce4c57 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/dbt_project.yml @@ -0,0 +1,26 @@ +name: 'jaffle_shop' + +config-version: 2 +version: '0.1' + +profile: 'jaffle_shop' + +model-paths: ["models"] +seed-paths: ["seeds"] +test-paths: ["tests"] +analysis-paths: ["analysis"] +macro-paths: ["macros"] + +target-path: "target" +clean-targets: + - "target" + - "dbt_modules" + - "logs" + +require-dbt-version: [">=1.0.0", "<2.0.0"] + +models: + jaffle_shop: + materialized: table + staging: + materialized: view diff --git a/dev/dags/dbt/altered_jaffle_shop/macros/drop_table.sql b/dev/dags/dbt/altered_jaffle_shop/macros/drop_table.sql new file mode 100644 index 000000000..37a8b21d7 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/macros/drop_table.sql @@ -0,0 +1,6 @@ +{%- macro drop_table_by_name(table_name) -%} + {%- set drop_query -%} + DROP TABLE IF EXISTS {{ target.schema }}.{{ table_name }} CASCADE + {%- endset -%} + {% do run_query(drop_query) %} +{%- endmacro -%} diff --git a/dev/dags/dbt/altered_jaffle_shop/models/customers.sql b/dev/dags/dbt/altered_jaffle_shop/models/customers.sql new file mode 100644 index 000000000..e4bf27b0f --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/customers.sql @@ -0,0 +1,71 @@ +{{ config(tags=["customers"]) }} + +with customers as ( + + select * from {{ ref('stg_customers') }} + +), + +orders as ( + + select * from {{ ref('stg_orders') }} + +), + +payments as ( + + select * from {{ ref('stg_payments') }} + +), + +customer_orders as ( + + select + customer_id, + + min(order_date) as first_order, + max(order_date) as most_recent_order, + count(order_id) as number_of_orders + from orders + + group by customer_id + +), + +customer_payments as ( + + select + orders.customer_id, + sum(amount) as total_amount + + from payments + + left join orders on + payments.order_id = orders.order_id + + group by orders.customer_id + +), + +final as ( + + select + customers.customer_id, + customers.first_name, + customers.last_name, + customer_orders.first_order, + customer_orders.most_recent_order, + customer_orders.number_of_orders, + customer_payments.total_amount as customer_lifetime_value + + from customers + + left join customer_orders + on customers.customer_id = customer_orders.customer_id + + left join customer_payments + on customers.customer_id = customer_payments.customer_id + +) + +select * from final diff --git a/dev/dags/dbt/altered_jaffle_shop/models/docs.md b/dev/dags/dbt/altered_jaffle_shop/models/docs.md new file mode 100644 index 000000000..c6ae93be0 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/docs.md @@ -0,0 +1,14 @@ +{% docs orders_status %} + +Orders can be one of the following statuses: + +| status | description | +|----------------|------------------------------------------------------------------------------------------------------------------------| +| placed | The order has been placed but has not yet left the warehouse | +| shipped | The order has ben shipped to the customer and is currently in transit | +| completed | The order has been received by the customer | +| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse | +| returned | The order has been returned by the customer and received at the warehouse | + + +{% enddocs %} diff --git a/dev/dags/dbt/jaffle_shop/models/exposures.yml b/dev/dags/dbt/altered_jaffle_shop/models/exposures.yml similarity index 100% rename from dev/dags/dbt/jaffle_shop/models/exposures.yml rename to dev/dags/dbt/altered_jaffle_shop/models/exposures.yml diff --git a/dev/dags/dbt/altered_jaffle_shop/models/orders.sql b/dev/dags/dbt/altered_jaffle_shop/models/orders.sql new file mode 100644 index 000000000..11dfcf89b --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/orders.sql @@ -0,0 +1,62 @@ +{{ config( + materialized='view', + alias=var('orders_alias', 'orders') + ) +}} + +{% set payment_methods = ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] %} + +with orders as ( + + select * from {{ ref('stg_orders') }} + +), + +payments as ( + + select * from {{ ref('stg_payments') }} + +), + +order_payments as ( + + select + order_id, + + {% for payment_method in payment_methods -%} + sum(case when payment_method = '{{ payment_method }}' then amount else 0 end) as {{ payment_method }}_amount, + {% endfor -%} + + sum(amount) as total_amount + + from payments + + group by order_id + +), + +final as ( + + select + orders.order_id, + orders.customer_id, + orders.order_date, + orders.status, + + {% for payment_method in payment_methods -%} + + order_payments.{{ payment_method }}_amount, + + {% endfor -%} + + order_payments.total_amount as amount + + from orders + + + left join order_payments + on orders.order_id = order_payments.order_id + +) + +select * from final diff --git a/dev/dags/dbt/altered_jaffle_shop/models/overview.md b/dev/dags/dbt/altered_jaffle_shop/models/overview.md new file mode 100644 index 000000000..0544c42b1 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/overview.md @@ -0,0 +1,11 @@ +{% docs __overview__ %} + +## Data Documentation for Jaffle Shop + +`jaffle_shop` is a fictional ecommerce store. + +This [dbt](https://www.getdbt.com/) project is for testing out code. + +The source code can be found [here](https://github.com/clrcrl/jaffle_shop). + +{% enddocs %} diff --git a/dev/dags/dbt/altered_jaffle_shop/models/schema.yml b/dev/dags/dbt/altered_jaffle_shop/models/schema.yml new file mode 100644 index 000000000..381349cfd --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/schema.yml @@ -0,0 +1,82 @@ +version: 2 + +models: + - name: customers + description: This table has basic information about a customer, as well as some derived facts based on a customer's orders + + columns: + - name: customer_id + description: This is a unique identifier for a customer + tests: + - unique + - not_null + + - name: first_name + description: Customer's first name. PII. + + - name: last_name + description: Customer's last name. PII. + + - name: first_order + description: Date (UTC) of a customer's first order + + - name: most_recent_order + description: Date (UTC) of a customer's most recent order + + - name: number_of_orders + description: Count of the number of orders a customer has placed + + - name: total_order_amount + description: Total value (AUD) of a customer's orders + + - name: orders + description: This table has basic information about orders, as well as some derived facts based on payments + + columns: + - name: order_id + tests: + - unique + - not_null + description: This is a unique identifier for an order + + - name: customer_id + description: Foreign key to the customers table + tests: + - not_null + - relationships: + to: ref('customers') + field: customer_id + + - name: order_date + description: Date (UTC) that the order was placed + + - name: status + description: '{{ doc("orders_status") }}' + tests: + - accepted_values: + values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] + + - name: amount + description: Total amount (AUD) of the order + tests: + - not_null + + - name: credit_card_amount + description: Amount of the order (AUD) paid for by credit card + tests: + - not_null + + - name: coupon_amount + description: Amount of the order (AUD) paid for by coupon + tests: + - not_null + + - name: bank_transfer_amount + description: Amount of the order (AUD) paid for by bank transfer + tests: + - not_null + + - name: gift_card_amount + description: Amount of the order (AUD) paid for by gift card + tests: + - not_null diff --git a/dev/dags/dbt/altered_jaffle_shop/models/staging/schema.yml b/dev/dags/dbt/altered_jaffle_shop/models/staging/schema.yml new file mode 100644 index 000000000..c207e4cf5 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/staging/schema.yml @@ -0,0 +1,31 @@ +version: 2 + +models: + - name: stg_customers + columns: + - name: customer_id + tests: + - unique + - not_null + + - name: stg_orders + columns: + - name: order_id + tests: + - unique + - not_null + - name: status + tests: + - accepted_values: + values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] + + - name: stg_payments + columns: + - name: payment_id + tests: + - unique + - not_null + - name: payment_method + tests: + - accepted_values: + values: ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] diff --git a/dev/dags/dbt/jaffle_shop/models/staging/sources.yml b/dev/dags/dbt/altered_jaffle_shop/models/staging/sources.yml similarity index 100% rename from dev/dags/dbt/jaffle_shop/models/staging/sources.yml rename to dev/dags/dbt/altered_jaffle_shop/models/staging/sources.yml diff --git a/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_customers.sql b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_customers.sql new file mode 100644 index 000000000..71b6c7c0a --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_customers.sql @@ -0,0 +1,29 @@ +with source as ( + + {#- + Normally we would select from the table here, but we are using seeds to load + our data in this project + #} + select * from {{ source('postgres_db', 'raw_customers') }} + +), + +force_seed_dep as ( + {#- + This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none + #} + select * from {{ ref('raw_customers') }} +), + +renamed as ( + + select + id as customer_id, + first_name, + last_name + + from source + +) + +select * from renamed diff --git a/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_orders.sql b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_orders.sql new file mode 100644 index 000000000..b6c13a33f --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_orders.sql @@ -0,0 +1,30 @@ +with source as ( + + {#- + Normally we would select from the table here, but we are using seeds to load + our data in this project + #} + select * from {{ source('postgres_db', 'raw_orders') }} + +), + +force_seed_dep as ( + {#- + This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none + #} + select * from {{ ref('raw_customers') }} +), + +renamed as ( + + select + id as order_id, + user_id as customer_id, + order_date, + status + + from source + +) + +select * from renamed diff --git a/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_payments.sql b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_payments.sql new file mode 100644 index 000000000..3ff1fbece --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/models/staging/stg_payments.sql @@ -0,0 +1,28 @@ +with source as ( + + select * from {{ source('postgres_db', 'raw_payments') }} + +), + +force_seed_dep as ( + {#- + This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none + #} + select * from {{ ref('raw_customers') }} +), + +renamed as ( + + select + id as payment_id, + order_id, + payment_method, + + -- `amount` is currently stored in cents, so we convert it to dollars + amount / 100 as amount + + from source + +) + +select * from renamed diff --git "a/dev/dags/dbt/jaffle_shop/models/\357\275\215\357\275\225\357\275\214\357\275\224\357\275\211\357\275\202\357\275\231\357\275\224\357\275\205.sql" "b/dev/dags/dbt/altered_jaffle_shop/models/\357\275\215\357\275\225\357\275\214\357\275\224\357\275\211\357\275\202\357\275\231\357\275\224\357\275\205.sql" similarity index 100% rename from "dev/dags/dbt/jaffle_shop/models/\357\275\215\357\275\225\357\275\214\357\275\224\357\275\211\357\275\202\357\275\231\357\275\224\357\275\205.sql" rename to "dev/dags/dbt/altered_jaffle_shop/models/\357\275\215\357\275\225\357\275\214\357\275\224\357\275\211\357\275\202\357\275\231\357\275\224\357\275\205.sql" diff --git a/dev/dags/dbt/altered_jaffle_shop/package-lock.yml b/dev/dags/dbt/altered_jaffle_shop/package-lock.yml new file mode 100644 index 000000000..669f9637d --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/package-lock.yml @@ -0,0 +1,4 @@ +packages: + - package: dbt-labs/dbt_utils + version: 1.1.1 +sha1_hash: a158c48c59c2bb7d729d2a4e215aabe5bb4f3353 diff --git a/dev/dags/dbt/altered_jaffle_shop/packages.yml b/dev/dags/dbt/altered_jaffle_shop/packages.yml new file mode 100644 index 000000000..3af907c8a --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/packages.yml @@ -0,0 +1,3 @@ +packages: + - package: dbt-labs/dbt_utils + version: "1.1.1" diff --git a/dev/dags/dbt/altered_jaffle_shop/profiles.yml b/dev/dags/dbt/altered_jaffle_shop/profiles.yml new file mode 100644 index 000000000..de04db0fb --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/profiles.yml @@ -0,0 +1,24 @@ +default: + target: dev + outputs: + dev: + type: postgres + host: "{{ env_var('POSTGRES_HOST') }}" + user: "{{ env_var('POSTGRES_USER') }}" + password: "{{ env_var('POSTGRES_PASSWORD') }}" + port: "{{ env_var('POSTGRES_PORT') | int }}" + dbname: "{{ env_var('POSTGRES_DB') }}" + schema: "{{ env_var('POSTGRES_SCHEMA') }}" + threads: 4 + +postgres_profile: + target: dev + outputs: + dev: + type: postgres + dbname: "{{ env_var('POSTGRES_DB') }}" + host: "{{ env_var('POSTGRES_HOST') }}" + pass: "{{ env_var('POSTGRES_PASSWORD') }}" + port: 5432 # "{{ env_var('POSTGRES_PORT') | as_number }}" + schema: "{{ env_var('POSTGRES_SCHEMA') }}" + user: "{{ env_var('POSTGRES_USER') }}" diff --git a/dev/dags/dbt/altered_jaffle_shop/seeds/raw_customers.csv b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_customers.csv new file mode 100644 index 000000000..b3e6747d6 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_customers.csv @@ -0,0 +1,101 @@ +id,first_name,last_name +1,Michael,P. +2,Shawn,M. +3,Kathleen,P. +4,Jimmy,C. +5,Katherine,R. +6,Sarah,R. +7,Martin,M. +8,Frank,R. +9,Jennifer,F. +10,Henry,W. +11,Fred,S. +12,Amy,D. +13,Kathleen,M. +14,Steve,F. +15,Teresa,H. +16,Amanda,H. +17,Kimberly,R. +18,Johnny,K. +19,Virginia,F. +20,Anna,A. +21,Willie,H. +22,Sean,H. +23,Mildred,A. +24,David,G. +25,Victor,H. +26,Aaron,R. +27,Benjamin,B. +28,Lisa,W. +29,Benjamin,K. +30,Christina,W. +31,Jane,G. +32,Thomas,O. +33,Katherine,M. +34,Jennifer,S. +35,Sara,T. +36,Harold,O. +37,Shirley,J. +38,Dennis,J. +39,Louise,W. +40,Maria,A. +41,Gloria,C. +42,Diana,S. +43,Kelly,N. +44,Jane,R. +45,Scott,B. +46,Norma,C. +47,Marie,P. +48,Lillian,C. +49,Judy,N. +50,Billy,L. +51,Howard,R. +52,Laura,F. +53,Anne,B. +54,Rose,M. +55,Nicholas,R. +56,Joshua,K. +57,Paul,W. +58,Kathryn,K. +59,Adam,A. +60,Norma,W. +61,Timothy,R. +62,Elizabeth,P. +63,Edward,G. +64,David,C. +65,Brenda,W. +66,Adam,W. +67,Michael,H. +68,Jesse,E. +69,Janet,P. +70,Helen,F. +71,Gerald,C. +72,Kathryn,O. +73,Alan,B. +74,Harry,A. +75,Andrea,H. +76,Barbara,W. +77,Anne,W. +78,Harry,H. +79,Jack,R. +80,Phillip,H. +81,Shirley,H. +82,Arthur,D. +83,Virginia,R. +84,Christina,R. +85,Theresa,M. +86,Jason,C. +87,Phillip,B. +88,Adam,T. +89,Margaret,J. +90,Paul,P. +91,Todd,W. +92,Willie,O. +93,Frances,R. +94,Gregory,H. +95,Lisa,P. +96,Jacqueline,A. +97,Shirley,D. +98,Nicole,M. +99,Mary,G. +100,Jean,M. diff --git a/dev/dags/dbt/altered_jaffle_shop/seeds/raw_orders.csv b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_orders.csv new file mode 100644 index 000000000..c4870621b --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_orders.csv @@ -0,0 +1,100 @@ +id,user_id,order_date,status +1,1,2018-01-01,returned +2,3,2018-01-02,completed +3,94,2018-01-04,completed +4,50,2018-01-05,completed +5,64,2018-01-05,completed +6,54,2018-01-07,completed +7,88,2018-01-09,completed +8,2,2018-01-11,returned +9,53,2018-01-12,completed +10,7,2018-01-14,completed +11,99,2018-01-14,completed +12,59,2018-01-15,completed +13,84,2018-01-17,completed +14,40,2018-01-17,returned +15,25,2018-01-17,completed +16,39,2018-01-18,completed +17,71,2018-01-18,completed +18,64,2018-01-20,returned +19,54,2018-01-22,completed +20,20,2018-01-23,completed +21,71,2018-01-23,completed +22,86,2018-01-24,completed +23,22,2018-01-26,return_pending +24,3,2018-01-27,completed +25,51,2018-01-28,completed +26,32,2018-01-28,completed +27,94,2018-01-29,completed +28,8,2018-01-29,completed +29,57,2018-01-31,completed +30,69,2018-02-02,completed +31,16,2018-02-02,completed +32,28,2018-02-04,completed +33,42,2018-02-04,completed +34,38,2018-02-06,completed +35,80,2018-02-08,completed +36,85,2018-02-10,completed +37,1,2018-02-10,completed +38,51,2018-02-10,completed +39,26,2018-02-11,completed +40,33,2018-02-13,completed +41,99,2018-02-14,completed +42,92,2018-02-16,completed +43,31,2018-02-17,completed +44,66,2018-02-17,completed +45,22,2018-02-17,completed +46,6,2018-02-19,completed +47,50,2018-02-20,completed +48,27,2018-02-21,completed +49,35,2018-02-21,completed +50,51,2018-02-23,completed +51,71,2018-02-24,completed +52,54,2018-02-25,return_pending +53,34,2018-02-26,completed +54,54,2018-02-26,completed +55,18,2018-02-27,completed +56,79,2018-02-28,completed +57,93,2018-03-01,completed +58,22,2018-03-01,completed +59,30,2018-03-02,completed +60,12,2018-03-03,completed +61,63,2018-03-03,completed +62,57,2018-03-05,completed +63,70,2018-03-06,completed +64,13,2018-03-07,completed +65,26,2018-03-08,completed +66,36,2018-03-10,completed +67,79,2018-03-11,completed +68,53,2018-03-11,completed +69,3,2018-03-11,completed +70,8,2018-03-12,completed +71,42,2018-03-12,shipped +72,30,2018-03-14,shipped +73,19,2018-03-16,completed +74,9,2018-03-17,shipped +75,69,2018-03-18,completed +76,25,2018-03-20,completed +77,35,2018-03-21,shipped +78,90,2018-03-23,shipped +79,52,2018-03-23,shipped +80,11,2018-03-23,shipped +81,76,2018-03-23,shipped +82,46,2018-03-24,shipped +83,54,2018-03-24,shipped +84,70,2018-03-26,placed +85,47,2018-03-26,shipped +86,68,2018-03-26,placed +87,46,2018-03-27,placed +88,91,2018-03-27,shipped +89,21,2018-03-28,placed +90,66,2018-03-30,shipped +91,47,2018-03-31,placed +92,84,2018-04-02,placed +93,66,2018-04-03,placed +94,63,2018-04-03,placed +95,27,2018-04-04,placed +96,90,2018-04-06,placed +97,89,2018-04-07,placed +98,41,2018-04-07,placed +99,85,2018-04-09,placed diff --git a/dev/dags/dbt/altered_jaffle_shop/seeds/raw_payments.csv b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_payments.csv new file mode 100644 index 000000000..a587baab5 --- /dev/null +++ b/dev/dags/dbt/altered_jaffle_shop/seeds/raw_payments.csv @@ -0,0 +1,114 @@ +id,order_id,payment_method,amount +1,1,credit_card,1000 +2,2,credit_card,2000 +3,3,coupon,100 +4,4,coupon,2500 +5,5,bank_transfer,1700 +6,6,credit_card,600 +7,7,credit_card,1600 +8,8,credit_card,2300 +9,9,gift_card,2300 +10,9,bank_transfer,0 +11,10,bank_transfer,2600 +12,11,credit_card,2700 +13,12,credit_card,100 +14,13,credit_card,500 +15,13,bank_transfer,1400 +16,14,bank_transfer,300 +17,15,coupon,2200 +18,16,credit_card,1000 +19,17,bank_transfer,200 +20,18,credit_card,500 +21,18,credit_card,800 +22,19,gift_card,600 +23,20,bank_transfer,1500 +24,21,credit_card,1200 +25,22,bank_transfer,800 +26,23,gift_card,2300 +27,24,coupon,2600 +28,25,bank_transfer,2000 +29,25,credit_card,2200 +30,25,coupon,1600 +31,26,credit_card,3000 +32,27,credit_card,2300 +33,28,bank_transfer,1900 +34,29,bank_transfer,1200 +35,30,credit_card,1300 +36,31,credit_card,1200 +37,32,credit_card,300 +38,33,credit_card,2200 +39,34,bank_transfer,1500 +40,35,credit_card,2900 +41,36,bank_transfer,900 +42,37,credit_card,2300 +43,38,credit_card,1500 +44,39,bank_transfer,800 +45,40,credit_card,1400 +46,41,credit_card,1700 +47,42,coupon,1700 +48,43,gift_card,1800 +49,44,gift_card,1100 +50,45,bank_transfer,500 +51,46,bank_transfer,800 +52,47,credit_card,2200 +53,48,bank_transfer,300 +54,49,credit_card,600 +55,49,credit_card,900 +56,50,credit_card,2600 +57,51,credit_card,2900 +58,51,credit_card,100 +59,52,bank_transfer,1500 +60,53,credit_card,300 +61,54,credit_card,1800 +62,54,bank_transfer,1100 +63,55,credit_card,2900 +64,56,credit_card,400 +65,57,bank_transfer,200 +66,58,coupon,1800 +67,58,gift_card,600 +68,59,gift_card,2800 +69,60,credit_card,400 +70,61,bank_transfer,1600 +71,62,gift_card,1400 +72,63,credit_card,2900 +73,64,bank_transfer,2600 +74,65,credit_card,0 +75,66,credit_card,2800 +76,67,bank_transfer,400 +77,67,credit_card,1900 +78,68,credit_card,1600 +79,69,credit_card,1900 +80,70,credit_card,2600 +81,71,credit_card,500 +82,72,credit_card,2900 +83,73,bank_transfer,300 +84,74,credit_card,3000 +85,75,credit_card,1900 +86,76,coupon,200 +87,77,credit_card,0 +88,77,bank_transfer,1900 +89,78,bank_transfer,2600 +90,79,credit_card,1800 +91,79,credit_card,900 +92,80,gift_card,300 +93,81,coupon,200 +94,82,credit_card,800 +95,83,credit_card,100 +96,84,bank_transfer,2500 +97,85,bank_transfer,1700 +98,86,coupon,2300 +99,87,gift_card,3000 +100,87,credit_card,2600 +101,88,credit_card,2900 +102,89,bank_transfer,2200 +103,90,bank_transfer,200 +104,91,credit_card,1900 +105,92,bank_transfer,1500 +106,92,coupon,200 +107,93,gift_card,2600 +108,94,coupon,700 +109,95,coupon,2400 +110,96,gift_card,1700 +111,97,bank_transfer,1400 +112,98,bank_transfer,1000 +113,99,credit_card,2400 diff --git a/dev/dags/dbt/jaffle_shop/dbt_project.yml b/dev/dags/dbt/jaffle_shop/dbt_project.yml index acdce4c57..b1ca69440 100644 --- a/dev/dags/dbt/jaffle_shop/dbt_project.yml +++ b/dev/dags/dbt/jaffle_shop/dbt_project.yml @@ -3,7 +3,7 @@ name: 'jaffle_shop' config-version: 2 version: '0.1' -profile: 'jaffle_shop' +profile: 'default' model-paths: ["models"] seed-paths: ["seeds"] diff --git a/dev/dags/dbt/jaffle_shop/models/orders.sql b/dev/dags/dbt/jaffle_shop/models/orders.sql index 11dfcf89b..cbb293491 100644 --- a/dev/dags/dbt/jaffle_shop/models/orders.sql +++ b/dev/dags/dbt/jaffle_shop/models/orders.sql @@ -1,9 +1,3 @@ -{{ config( - materialized='view', - alias=var('orders_alias', 'orders') - ) -}} - {% set payment_methods = ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] %} with orders as ( diff --git a/dev/dags/dbt/jaffle_shop/models/staging/stg_customers.sql b/dev/dags/dbt/jaffle_shop/models/staging/stg_customers.sql index 71b6c7c0a..cad047269 100644 --- a/dev/dags/dbt/jaffle_shop/models/staging/stg_customers.sql +++ b/dev/dags/dbt/jaffle_shop/models/staging/stg_customers.sql @@ -4,15 +4,8 @@ with source as ( Normally we would select from the table here, but we are using seeds to load our data in this project #} - select * from {{ source('postgres_db', 'raw_customers') }} - -), - -force_seed_dep as ( - {#- - This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none - #} select * from {{ ref('raw_customers') }} + ), renamed as ( diff --git a/dev/dags/dbt/jaffle_shop/models/staging/stg_orders.sql b/dev/dags/dbt/jaffle_shop/models/staging/stg_orders.sql index b6c13a33f..a654dcb94 100644 --- a/dev/dags/dbt/jaffle_shop/models/staging/stg_orders.sql +++ b/dev/dags/dbt/jaffle_shop/models/staging/stg_orders.sql @@ -4,17 +4,10 @@ with source as ( Normally we would select from the table here, but we are using seeds to load our data in this project #} - select * from {{ source('postgres_db', 'raw_orders') }} + select * from {{ ref('raw_orders') }} ), -force_seed_dep as ( - {#- - This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none - #} - select * from {{ ref('raw_customers') }} -), - renamed as ( select diff --git a/dev/dags/dbt/jaffle_shop/models/staging/stg_payments.sql b/dev/dags/dbt/jaffle_shop/models/staging/stg_payments.sql index 3ff1fbece..f718596ad 100644 --- a/dev/dags/dbt/jaffle_shop/models/staging/stg_payments.sql +++ b/dev/dags/dbt/jaffle_shop/models/staging/stg_payments.sql @@ -1,14 +1,11 @@ with source as ( - select * from {{ source('postgres_db', 'raw_payments') }} - -), - -force_seed_dep as ( {#- - This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none + Normally we would select from the table here, but we are using seeds to load + our data in this project #} - select * from {{ ref('raw_customers') }} + select * from {{ ref('raw_payments') }} + ), renamed as ( diff --git a/dev/dags/dbt/jaffle_shop/packages_.yml b/dev/dags/dbt/jaffle_shop/packages_.yml new file mode 100644 index 000000000..3af907c8a --- /dev/null +++ b/dev/dags/dbt/jaffle_shop/packages_.yml @@ -0,0 +1,3 @@ +packages: + - package: dbt-labs/dbt_utils + version: "1.1.1" diff --git a/dev/dags/dbt/jaffle_shop/target/manifest.json b/dev/dags/dbt/jaffle_shop/target/manifest.json index 7004eb070..c8ba97554 100644 --- a/dev/dags/dbt/jaffle_shop/target/manifest.json +++ b/dev/dags/dbt/jaffle_shop/target/manifest.json @@ -1,8 +1,6 @@ { "child_map": { - "exposure.jaffle_shop.weekly_metrics": [], "model.jaffle_shop.customers": [ - "exposure.jaffle_shop.weekly_metrics", "test.jaffle_shop.not_null_customers_customer_id.5c9bf9911d", "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1" @@ -38,28 +36,14 @@ "test.jaffle_shop.not_null_stg_payments_payment_id.c19cc50075", "test.jaffle_shop.unique_stg_payments_payment_id.3744510712" ], - "model.jaffle_shop.\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45": [], "seed.jaffle_shop.raw_customers": [ - "model.jaffle_shop.stg_customers", - "model.jaffle_shop.stg_orders", - "model.jaffle_shop.stg_payments" - ], - "seed.jaffle_shop.raw_orders": [], - "seed.jaffle_shop.raw_payments": [], - "source.jaffle_shop.postgres_db.raw_customers": [ - "model.jaffle_shop.stg_customers", - "test.jaffle_shop.source_not_null_postgres_db_raw_customers_id.de3e9fff76", - "test.jaffle_shop.source_unique_postgres_db_raw_customers_id.6e5ad1d707" + "model.jaffle_shop.stg_customers" ], - "source.jaffle_shop.postgres_db.raw_orders": [ - "model.jaffle_shop.stg_orders", - "test.jaffle_shop.source_not_null_postgres_db_raw_orders_id.0dc5a4d454", - "test.jaffle_shop.source_unique_postgres_db_raw_orders_id.0bf2272247" + "seed.jaffle_shop.raw_orders": [ + "model.jaffle_shop.stg_orders" ], - "source.jaffle_shop.postgres_db.raw_payments": [ - "model.jaffle_shop.stg_payments", - "test.jaffle_shop.source_not_null_postgres_db_raw_payments_id.15f4f169e7", - "test.jaffle_shop.source_unique_postgres_db_raw_payments_id.a4bd02775f" + "seed.jaffle_shop.raw_payments": [ + "model.jaffle_shop.stg_payments" ], "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3": [], "test.jaffle_shop.accepted_values_stg_orders_status__placed__shipped__completed__return_pending__returned.080fb20aad": [], @@ -76,12 +60,6 @@ "test.jaffle_shop.not_null_stg_orders_order_id.81cfe2fe64": [], "test.jaffle_shop.not_null_stg_payments_payment_id.c19cc50075": [], "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2": [], - "test.jaffle_shop.source_not_null_postgres_db_raw_customers_id.de3e9fff76": [], - "test.jaffle_shop.source_not_null_postgres_db_raw_orders_id.0dc5a4d454": [], - "test.jaffle_shop.source_not_null_postgres_db_raw_payments_id.15f4f169e7": [], - "test.jaffle_shop.source_unique_postgres_db_raw_customers_id.6e5ad1d707": [], - "test.jaffle_shop.source_unique_postgres_db_raw_orders_id.0bf2272247": [], - "test.jaffle_shop.source_unique_postgres_db_raw_payments_id.a4bd02775f": [], "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1": [], "test.jaffle_shop.unique_orders_order_id.fed79b3a6e": [], "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada": [], @@ -118,57 +96,13 @@ "unique_id": "doc.jaffle_shop.orders_status" } }, - "exposures": { - "exposure.jaffle_shop.weekly_metrics": { - "config": { - "enabled": true - }, - "created_at": 1733768712.78008, - "depends_on": { - "macros": [], - "nodes": [ - "model.jaffle_shop.customers" - ] - }, - "description": "", - "fqn": [ - "jaffle_shop", - "weekly_metrics" - ], - "label": "Jaffle shop metrics", - "maturity": "high", - "meta": {}, - "metrics": [], - "name": "weekly_metrics", - "original_file_path": "models/exposures.yml", - "owner": { - "email": "team@astronomer-cosmos.org", - "name": "Cosmos Team" - }, - "package_name": "jaffle_shop", - "path": "exposures.yml", - "refs": [ - { - "name": "customers", - "package": null, - "version": null - } - ], - "resource_type": "exposure", - "sources": [], - "tags": [], - "type": "dashboard", - "unique_id": "exposure.jaffle_shop.weekly_metrics", - "unrendered_config": {}, - "url": null - } - }, + "exposures": {}, "group_map": {}, "groups": {}, "macros": { "macro.dbt._split_part_negative": { "arguments": [], - "created_at": 1733768712.099639, + "created_at": 1719485736.555134, "depends_on": { "macros": [] }, @@ -190,7 +124,7 @@ }, "macro.dbt.after_commit": { "arguments": [], - "created_at": 1733768711.9226398, + "created_at": 1719485736.337471, "depends_on": { "macros": [ "macro.dbt.make_hook_config" @@ -214,7 +148,7 @@ }, "macro.dbt.alter_column_comment": { "arguments": [], - "created_at": 1733768712.119901, + "created_at": 1719485736.583679, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__alter_column_comment" @@ -238,7 +172,7 @@ }, "macro.dbt.alter_column_type": { "arguments": [], - "created_at": 1733768712.133354, + "created_at": 1719485736.599694, "depends_on": { "macros": [ "macro.dbt.default__alter_column_type" @@ -262,7 +196,7 @@ }, "macro.dbt.alter_relation_add_remove_columns": { "arguments": [], - "created_at": 1733768712.134187, + "created_at": 1719485736.600589, "depends_on": { "macros": [ "macro.dbt.default__alter_relation_add_remove_columns" @@ -286,7 +220,7 @@ }, "macro.dbt.alter_relation_comment": { "arguments": [], - "created_at": 1733768712.120249, + "created_at": 1719485736.585442, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__alter_relation_comment" @@ -310,7 +244,7 @@ }, "macro.dbt.any_value": { "arguments": [], - "created_at": 1733768712.093523, + "created_at": 1719485736.542892, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__any_value" @@ -334,7 +268,7 @@ }, "macro.dbt.apply_grants": { "arguments": [], - "created_at": 1733768712.117336, + "created_at": 1719485736.577766, "depends_on": { "macros": [ "macro.dbt.default__apply_grants" @@ -358,7 +292,7 @@ }, "macro.dbt.array_append": { "arguments": [], - "created_at": 1733768712.100876, + "created_at": 1719485736.5569642, "depends_on": { "macros": [ "macro.dbt.default__array_append" @@ -382,7 +316,7 @@ }, "macro.dbt.array_concat": { "arguments": [], - "created_at": 1733768712.09752, + "created_at": 1719485736.5521111, "depends_on": { "macros": [ "macro.dbt.default__array_concat" @@ -406,7 +340,7 @@ }, "macro.dbt.array_construct": { "arguments": [], - "created_at": 1733768712.100371, + "created_at": 1719485736.556025, "depends_on": { "macros": [ "macro.dbt.default__array_construct" @@ -430,7 +364,7 @@ }, "macro.dbt.assert_columns_equivalent": { "arguments": [], - "created_at": 1733768712.065886, + "created_at": 1719485736.5031989, "depends_on": { "macros": [ "macro.dbt.get_column_schema_from_query", @@ -456,7 +390,7 @@ }, "macro.dbt.before_begin": { "arguments": [], - "created_at": 1733768711.9220648, + "created_at": 1719485736.336732, "depends_on": { "macros": [ "macro.dbt.make_hook_config" @@ -480,7 +414,7 @@ }, "macro.dbt.bool_or": { "arguments": [], - "created_at": 1733768712.0979562, + "created_at": 1719485736.5525389, "depends_on": { "macros": [ "macro.dbt.default__bool_or" @@ -504,7 +438,7 @@ }, "macro.dbt.build_config_dict": { "arguments": [], - "created_at": 1733768712.14355, + "created_at": 1719485736.617571, "depends_on": { "macros": [] }, @@ -526,7 +460,7 @@ }, "macro.dbt.build_ref_function": { "arguments": [], - "created_at": 1733768712.142638, + "created_at": 1719485736.616483, "depends_on": { "macros": [ "macro.dbt.resolve_model_name" @@ -550,7 +484,7 @@ }, "macro.dbt.build_snapshot_staging_table": { "arguments": [], - "created_at": 1733768711.9419231, + "created_at": 1719485736.358976, "depends_on": { "macros": [ "macro.dbt.make_temp_relation", @@ -577,7 +511,7 @@ }, "macro.dbt.build_snapshot_table": { "arguments": [], - "created_at": 1733768711.9411252, + "created_at": 1719485736.3569238, "depends_on": { "macros": [ "macro.dbt.default__build_snapshot_table" @@ -601,7 +535,7 @@ }, "macro.dbt.build_source_function": { "arguments": [], - "created_at": 1733768712.143021, + "created_at": 1719485736.616947, "depends_on": { "macros": [ "macro.dbt.resolve_model_name" @@ -625,7 +559,7 @@ }, "macro.dbt.call_dcl_statements": { "arguments": [], - "created_at": 1733768712.1169028, + "created_at": 1719485736.576986, "depends_on": { "macros": [ "macro.dbt.default__call_dcl_statements" @@ -649,7 +583,7 @@ }, "macro.dbt.can_clone_table": { "arguments": [], - "created_at": 1733768712.000415, + "created_at": 1719485736.4429, "depends_on": { "macros": [ "macro.dbt.default__can_clone_table" @@ -673,7 +607,7 @@ }, "macro.dbt.cast": { "arguments": [], - "created_at": 1733768712.0931609, + "created_at": 1719485736.542182, "depends_on": { "macros": [ "macro.dbt.default__cast" @@ -697,7 +631,7 @@ }, "macro.dbt.cast_bool_to_text": { "arguments": [], - "created_at": 1733768712.092747, + "created_at": 1719485736.541704, "depends_on": { "macros": [ "macro.dbt.default__cast_bool_to_text" @@ -721,7 +655,7 @@ }, "macro.dbt.check_for_schema_changes": { "arguments": [], - "created_at": 1733768711.9982378, + "created_at": 1719485736.43984, "depends_on": { "macros": [ "macro.dbt.diff_columns", @@ -746,7 +680,7 @@ }, "macro.dbt.check_schema_exists": { "arguments": [], - "created_at": 1733768712.126227, + "created_at": 1719485736.591485, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__check_schema_exists" @@ -768,34 +702,9 @@ "supported_languages": null, "unique_id": "macro.dbt.check_schema_exists" }, - "macro.dbt.check_time_data_types": { - "arguments": [], - "created_at": 1733768711.942948, - "depends_on": { - "macros": [ - "macro.dbt.get_updated_at_column_data_type", - "macro.dbt.get_snapshot_get_time_data_type" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro check_time_data_types(sql) %}\n {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n {% if exceptions.warn_snapshot_timestamp_data_types %}\n {{ exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n {% endif %}\n {% endif %}\n{% endmacro %}", - "meta": {}, - "name": "check_time_data_types", - "original_file_path": "macros/materializations/snapshots/helpers.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/materializations/snapshots/helpers.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.check_time_data_types" - }, "macro.dbt.collect_freshness": { "arguments": [], - "created_at": 1733768712.111316, + "created_at": 1719485736.569225, "depends_on": { "macros": [ "macro.dbt.default__collect_freshness" @@ -819,7 +728,7 @@ }, "macro.dbt.concat": { "arguments": [], - "created_at": 1733768712.0856168, + "created_at": 1719485736.533403, "depends_on": { "macros": [ "macro.dbt.default__concat" @@ -843,7 +752,7 @@ }, "macro.dbt.convert_datetime": { "arguments": [], - "created_at": 1733768712.08024, + "created_at": 1719485736.522349, "depends_on": { "macros": [] }, @@ -865,7 +774,7 @@ }, "macro.dbt.copy_grants": { "arguments": [], - "created_at": 1733768712.1137989, + "created_at": 1719485736.5725539, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__copy_grants" @@ -889,7 +798,7 @@ }, "macro.dbt.create_columns": { "arguments": [], - "created_at": 1733768711.93854, + "created_at": 1719485736.354676, "depends_on": { "macros": [ "macro.dbt.default__create_columns" @@ -913,7 +822,7 @@ }, "macro.dbt.create_csv_table": { "arguments": [], - "created_at": 1733768712.043387, + "created_at": 1719485736.45865, "depends_on": { "macros": [ "macro.dbt.default__create_csv_table" @@ -937,7 +846,7 @@ }, "macro.dbt.create_indexes": { "arguments": [], - "created_at": 1733768712.104935, + "created_at": 1719485736.561525, "depends_on": { "macros": [ "macro.dbt.default__create_indexes" @@ -961,7 +870,7 @@ }, "macro.dbt.create_or_replace_clone": { "arguments": [], - "created_at": 1733768712.000809, + "created_at": 1719485736.443349, "depends_on": { "macros": [ "macro.dbt.default__create_or_replace_clone" @@ -985,7 +894,7 @@ }, "macro.dbt.create_or_replace_view": { "arguments": [], - "created_at": 1733768712.07297, + "created_at": 1719485736.513715, "depends_on": { "macros": [ "macro.dbt.run_hooks", @@ -1015,7 +924,7 @@ }, "macro.dbt.create_schema": { "arguments": [], - "created_at": 1733768712.101356, + "created_at": 1719485736.558099, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__create_schema" @@ -1039,7 +948,7 @@ }, "macro.dbt.create_table_as": { "arguments": [], - "created_at": 1733768712.069162, + "created_at": 1719485736.508673, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__create_table_as" @@ -1063,7 +972,7 @@ }, "macro.dbt.create_view_as": { "arguments": [], - "created_at": 1733768712.0744681, + "created_at": 1719485736.515506, "depends_on": { "macros": [ "macro.dbt.default__create_view_as" @@ -1087,7 +996,7 @@ }, "macro.dbt.current_timestamp": { "arguments": [], - "created_at": 1733768712.1024861, + "created_at": 1719485736.55921, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__current_timestamp" @@ -1111,7 +1020,7 @@ }, "macro.dbt.current_timestamp_backcompat": { "arguments": [], - "created_at": 1733768712.103471, + "created_at": 1719485736.559824, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__current_timestamp_backcompat" @@ -1135,7 +1044,7 @@ }, "macro.dbt.current_timestamp_in_utc_backcompat": { "arguments": [], - "created_at": 1733768712.10371, + "created_at": 1719485736.5600908, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat" @@ -1159,7 +1068,7 @@ }, "macro.dbt.date": { "arguments": [], - "created_at": 1733768712.084675, + "created_at": 1719485736.531044, "depends_on": { "macros": [ "macro.dbt.default__date" @@ -1183,7 +1092,7 @@ }, "macro.dbt.date_spine": { "arguments": [], - "created_at": 1733768712.084023, + "created_at": 1719485736.529869, "depends_on": { "macros": [ "macro.dbt.default__date_spine" @@ -1207,7 +1116,7 @@ }, "macro.dbt.date_trunc": { "arguments": [], - "created_at": 1733768712.099894, + "created_at": 1719485736.55547, "depends_on": { "macros": [ "macro.dbt.default__date_trunc" @@ -1231,7 +1140,7 @@ }, "macro.dbt.dateadd": { "arguments": [], - "created_at": 1733768712.088691, + "created_at": 1719485736.5368361, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__dateadd" @@ -1255,7 +1164,7 @@ }, "macro.dbt.datediff": { "arguments": [], - "created_at": 1733768712.09153, + "created_at": 1719485736.5402482, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__datediff" @@ -1279,7 +1188,7 @@ }, "macro.dbt.dates_in_range": { "arguments": [], - "created_at": 1733768712.081387, + "created_at": 1719485736.524234, "depends_on": { "macros": [ "macro.dbt.convert_datetime" @@ -1303,7 +1212,7 @@ }, "macro.dbt.default__alter_column_comment": { "arguments": [], - "created_at": 1733768712.120061, + "created_at": 1719485736.5851688, "depends_on": { "macros": [] }, @@ -1325,7 +1234,7 @@ }, "macro.dbt.default__alter_column_type": { "arguments": [], - "created_at": 1733768712.13395, + "created_at": 1719485736.6003149, "depends_on": { "macros": [ "macro.dbt.statement" @@ -1336,7 +1245,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__alter_column_type", "original_file_path": "macros/adapters/columns.sql", @@ -1349,7 +1258,7 @@ }, "macro.dbt.default__alter_relation_add_remove_columns": { "arguments": [], - "created_at": 1733768712.134961, + "created_at": 1719485736.601542, "depends_on": { "macros": [ "macro.dbt.run_query" @@ -1360,7 +1269,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation.render() }}\n\n {% for column in add_columns %}\n add column {{ column.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 %}", + "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 %}", "meta": {}, "name": "default__alter_relation_add_remove_columns", "original_file_path": "macros/adapters/columns.sql", @@ -1373,7 +1282,7 @@ }, "macro.dbt.default__alter_relation_comment": { "arguments": [], - "created_at": 1733768712.120404, + "created_at": 1719485736.585629, "depends_on": { "macros": [] }, @@ -1395,7 +1304,7 @@ }, "macro.dbt.default__any_value": { "arguments": [], - "created_at": 1733768712.093714, + "created_at": 1719485736.5430348, "depends_on": { "macros": [] }, @@ -1417,7 +1326,7 @@ }, "macro.dbt.default__apply_grants": { "arguments": [], - "created_at": 1733768712.118434, + "created_at": 1719485736.580575, "depends_on": { "macros": [ "macro.dbt.run_query", @@ -1431,7 +1340,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", + "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "meta": {}, "name": "default__apply_grants", "original_file_path": "macros/adapters/apply_grants.sql", @@ -1444,7 +1353,7 @@ }, "macro.dbt.default__array_append": { "arguments": [], - "created_at": 1733768712.101006, + "created_at": 1719485736.557557, "depends_on": { "macros": [] }, @@ -1466,7 +1375,7 @@ }, "macro.dbt.default__array_concat": { "arguments": [], - "created_at": 1733768712.097717, + "created_at": 1719485736.552268, "depends_on": { "macros": [] }, @@ -1488,7 +1397,7 @@ }, "macro.dbt.default__array_construct": { "arguments": [], - "created_at": 1733768712.1006138, + "created_at": 1719485736.556629, "depends_on": { "macros": [] }, @@ -1510,7 +1419,7 @@ }, "macro.dbt.default__bool_or": { "arguments": [], - "created_at": 1733768712.098058, + "created_at": 1719485736.552653, "depends_on": { "macros": [] }, @@ -1532,18 +1441,16 @@ }, "macro.dbt.default__build_snapshot_table": { "arguments": [], - "created_at": 1733768711.941532, + "created_at": 1719485736.3577101, "depends_on": { - "macros": [ - "macro.dbt.get_snapshot_table_column_names" - ] + "macros": [] }, "description": "", "docs": { "node_color": null, "show": true }, - "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n select *,\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as {{ columns.dbt_valid_to }}\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__build_snapshot_table", "original_file_path": "macros/materializations/snapshots/helpers.sql", @@ -1556,7 +1463,7 @@ }, "macro.dbt.default__call_dcl_statements": { "arguments": [], - "created_at": 1733768712.117127, + "created_at": 1719485736.577475, "depends_on": { "macros": [ "macro.dbt.statement" @@ -1580,7 +1487,7 @@ }, "macro.dbt.default__can_clone_table": { "arguments": [], - "created_at": 1733768712.00053, + "created_at": 1719485736.443028, "depends_on": { "macros": [] }, @@ -1602,7 +1509,7 @@ }, "macro.dbt.default__cast": { "arguments": [], - "created_at": 1733768712.093292, + "created_at": 1719485736.5423732, "depends_on": { "macros": [] }, @@ -1624,7 +1531,7 @@ }, "macro.dbt.default__cast_bool_to_text": { "arguments": [], - "created_at": 1733768712.0929, + "created_at": 1719485736.541875, "depends_on": { "macros": [] }, @@ -1646,7 +1553,7 @@ }, "macro.dbt.default__check_schema_exists": { "arguments": [], - "created_at": 1733768712.1265018, + "created_at": 1719485736.591805, "depends_on": { "macros": [ "macro.dbt.replace", @@ -1671,7 +1578,7 @@ }, "macro.dbt.default__collect_freshness": { "arguments": [], - "created_at": 1733768712.111687, + "created_at": 1719485736.569667, "depends_on": { "macros": [ "macro.dbt.statement", @@ -1696,7 +1603,7 @@ }, "macro.dbt.default__concat": { "arguments": [], - "created_at": 1733768712.0857332, + "created_at": 1719485736.5335412, "depends_on": { "macros": [] }, @@ -1718,7 +1625,7 @@ }, "macro.dbt.default__copy_grants": { "arguments": [], - "created_at": 1733768712.11391, + "created_at": 1719485736.5727968, "depends_on": { "macros": [] }, @@ -1740,7 +1647,7 @@ }, "macro.dbt.default__create_columns": { "arguments": [], - "created_at": 1733768711.938824, + "created_at": 1719485736.354986, "depends_on": { "macros": [ "macro.dbt.statement" @@ -1751,7 +1658,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation.render() }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__create_columns", "original_file_path": "macros/materializations/snapshots/helpers.sql", @@ -1764,7 +1671,7 @@ }, "macro.dbt.default__create_csv_table": { "arguments": [], - "created_at": 1733768712.044342, + "created_at": 1719485736.4600089, "depends_on": { "macros": [ "macro.dbt.statement" @@ -1788,7 +1695,7 @@ }, "macro.dbt.default__create_indexes": { "arguments": [], - "created_at": 1733768712.105481, + "created_at": 1719485736.562071, "depends_on": { "macros": [ "macro.dbt.get_create_index_sql", @@ -1813,7 +1720,7 @@ }, "macro.dbt.default__create_or_replace_clone": { "arguments": [], - "created_at": 1733768712.0009642, + "created_at": 1719485736.4434948, "depends_on": { "macros": [] }, @@ -1822,7 +1729,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", + "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation }} clone {{ defer_relation }}\n{% endmacro %}", "meta": {}, "name": "default__create_or_replace_clone", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", @@ -1835,7 +1742,7 @@ }, "macro.dbt.default__create_schema": { "arguments": [], - "created_at": 1733768712.10153, + "created_at": 1719485736.5583, "depends_on": { "macros": [ "macro.dbt.statement" @@ -1859,7 +1766,7 @@ }, "macro.dbt.default__create_table_as": { "arguments": [], - "created_at": 1733768712.069799, + "created_at": 1719485736.509567, "depends_on": { "macros": [ "macro.dbt.get_assert_columns_equivalent", @@ -1885,7 +1792,7 @@ }, "macro.dbt.default__create_view_as": { "arguments": [], - "created_at": 1733768712.074867, + "created_at": 1719485736.515955, "depends_on": { "macros": [ "macro.dbt.get_assert_columns_equivalent" @@ -1896,7 +1803,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation.render() }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", + "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "meta": {}, "name": "default__create_view_as", "original_file_path": "macros/relations/view/create.sql", @@ -1909,7 +1816,7 @@ }, "macro.dbt.default__current_timestamp": { "arguments": [], - "created_at": 1733768712.1026921, + "created_at": 1719485736.5593758, "depends_on": { "macros": [] }, @@ -1931,7 +1838,7 @@ }, "macro.dbt.default__current_timestamp_backcompat": { "arguments": [], - "created_at": 1733768712.1035452, + "created_at": 1719485736.559911, "depends_on": { "macros": [] }, @@ -1953,7 +1860,7 @@ }, "macro.dbt.default__current_timestamp_in_utc_backcompat": { "arguments": [], - "created_at": 1733768712.103866, + "created_at": 1719485736.560272, "depends_on": { "macros": [ "macro.dbt.current_timestamp_backcompat", @@ -1978,7 +1885,7 @@ }, "macro.dbt.default__date": { "arguments": [], - "created_at": 1733768712.084935, + "created_at": 1719485736.531544, "depends_on": { "macros": [] }, @@ -2000,7 +1907,7 @@ }, "macro.dbt.default__date_spine": { "arguments": [], - "created_at": 1733768712.0843651, + "created_at": 1719485736.53054, "depends_on": { "macros": [ "macro.dbt.generate_series", @@ -2026,7 +1933,7 @@ }, "macro.dbt.default__date_trunc": { "arguments": [], - "created_at": 1733768712.1000252, + "created_at": 1719485736.555618, "depends_on": { "macros": [] }, @@ -2048,7 +1955,7 @@ }, "macro.dbt.default__dateadd": { "arguments": [], - "created_at": 1733768712.088952, + "created_at": 1719485736.537018, "depends_on": { "macros": [] }, @@ -2070,7 +1977,7 @@ }, "macro.dbt.default__datediff": { "arguments": [], - "created_at": 1733768712.091698, + "created_at": 1719485736.540429, "depends_on": { "macros": [] }, @@ -2092,7 +1999,7 @@ }, "macro.dbt.default__drop_materialized_view": { "arguments": [], - "created_at": 1733768712.0595782, + "created_at": 1719485736.4865391, "depends_on": { "macros": [] }, @@ -2101,7 +2008,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", + "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "meta": {}, "name": "default__drop_materialized_view", "original_file_path": "macros/relations/materialized_view/drop.sql", @@ -2114,7 +2021,7 @@ }, "macro.dbt.default__drop_relation": { "arguments": [], - "created_at": 1733768712.051782, + "created_at": 1719485736.4714549, "depends_on": { "macros": [ "macro.dbt.statement", @@ -2139,7 +2046,7 @@ }, "macro.dbt.default__drop_schema": { "arguments": [], - "created_at": 1733768712.101855, + "created_at": 1719485736.558672, "depends_on": { "macros": [ "macro.dbt.statement" @@ -2163,7 +2070,7 @@ }, "macro.dbt.default__drop_schema_named": { "arguments": [], - "created_at": 1733768712.0549572, + "created_at": 1719485736.476362, "depends_on": { "macros": [] }, @@ -2185,7 +2092,7 @@ }, "macro.dbt.default__drop_table": { "arguments": [], - "created_at": 1733768712.066952, + "created_at": 1719485736.505599, "depends_on": { "macros": [] }, @@ -2194,7 +2101,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", + "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "meta": {}, "name": "default__drop_table", "original_file_path": "macros/relations/table/drop.sql", @@ -2207,7 +2114,7 @@ }, "macro.dbt.default__drop_view": { "arguments": [], - "created_at": 1733768712.070913, + "created_at": 1719485736.511198, "depends_on": { "macros": [] }, @@ -2216,7 +2123,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", + "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "meta": {}, "name": "default__drop_view", "original_file_path": "macros/relations/view/drop.sql", @@ -2229,7 +2136,7 @@ }, "macro.dbt.default__escape_single_quotes": { "arguments": [], - "created_at": 1733768712.0896618, + "created_at": 1719485736.538025, "depends_on": { "macros": [] }, @@ -2251,7 +2158,7 @@ }, "macro.dbt.default__except": { "arguments": [], - "created_at": 1733768712.0825658, + "created_at": 1719485736.526438, "depends_on": { "macros": [] }, @@ -2273,7 +2180,7 @@ }, "macro.dbt.default__format_column": { "arguments": [], - "created_at": 1733768712.066566, + "created_at": 1719485736.504833, "depends_on": { "macros": [] }, @@ -2295,7 +2202,7 @@ }, "macro.dbt.default__generate_alias_name": { "arguments": [], - "created_at": 1733768712.048756, + "created_at": 1719485736.466625, "depends_on": { "macros": [] }, @@ -2317,7 +2224,7 @@ }, "macro.dbt.default__generate_database_name": { "arguments": [], - "created_at": 1733768712.050381, + "created_at": 1719485736.469049, "depends_on": { "macros": [] }, @@ -2339,7 +2246,7 @@ }, "macro.dbt.default__generate_schema_name": { "arguments": [], - "created_at": 1733768712.049511, + "created_at": 1719485736.4677172, "depends_on": { "macros": [] }, @@ -2361,7 +2268,7 @@ }, "macro.dbt.default__generate_series": { "arguments": [], - "created_at": 1733768712.0877252, + "created_at": 1719485736.535907, "depends_on": { "macros": [ "macro.dbt.get_powers_of_two" @@ -2385,7 +2292,7 @@ }, "macro.dbt.default__get_alter_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768712.061863, + "created_at": 1719485736.4936142, "depends_on": { "macros": [] }, @@ -2407,7 +2314,7 @@ }, "macro.dbt.default__get_assert_columns_equivalent": { "arguments": [], - "created_at": 1733768712.0645802, + "created_at": 1719485736.501285, "depends_on": { "macros": [ "macro.dbt.assert_columns_equivalent" @@ -2431,7 +2338,7 @@ }, "macro.dbt.default__get_batch_size": { "arguments": [], - "created_at": 1733768712.0459452, + "created_at": 1719485736.4618182, "depends_on": { "macros": [] }, @@ -2453,7 +2360,7 @@ }, "macro.dbt.default__get_binding_char": { "arguments": [], - "created_at": 1733768712.045675, + "created_at": 1719485736.461474, "depends_on": { "macros": [] }, @@ -2475,7 +2382,7 @@ }, "macro.dbt.default__get_catalog": { "arguments": [], - "created_at": 1733768712.125313, + "created_at": 1719485736.590454, "depends_on": { "macros": [] }, @@ -2495,31 +2402,9 @@ "supported_languages": null, "unique_id": "macro.dbt.default__get_catalog" }, - "macro.dbt.default__get_catalog_for_single_relation": { - "arguments": [], - "created_at": 1733768712.127157, - "depends_on": { - "macros": [] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n {{ exceptions.raise_not_implemented(\n 'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", - "meta": {}, - "name": "default__get_catalog_for_single_relation", - "original_file_path": "macros/adapters/metadata.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/adapters/metadata.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.default__get_catalog_for_single_relation" - }, "macro.dbt.default__get_catalog_relations": { "arguments": [], - "created_at": 1733768712.124882, + "created_at": 1719485736.589964, "depends_on": { "macros": [] }, @@ -2541,7 +2426,7 @@ }, "macro.dbt.default__get_column_names": { "arguments": [], - "created_at": 1733768712.0702238, + "created_at": 1719485736.5100741, "depends_on": { "macros": [] }, @@ -2563,7 +2448,7 @@ }, "macro.dbt.default__get_columns_in_query": { "arguments": [], - "created_at": 1733768712.13314, + "created_at": 1719485736.599448, "depends_on": { "macros": [ "macro.dbt.statement", @@ -2588,7 +2473,7 @@ }, "macro.dbt.default__get_columns_in_relation": { "arguments": [], - "created_at": 1733768712.130395, + "created_at": 1719485736.59628, "depends_on": { "macros": [] }, @@ -2610,7 +2495,7 @@ }, "macro.dbt.default__get_create_backup_sql": { "arguments": [], - "created_at": 1733768712.057784, + "created_at": 1719485736.47981, "depends_on": { "macros": [ "macro.dbt.make_backup_relation", @@ -2636,7 +2521,7 @@ }, "macro.dbt.default__get_create_index_sql": { "arguments": [], - "created_at": 1733768712.104789, + "created_at": 1719485736.561354, "depends_on": { "macros": [] }, @@ -2658,7 +2543,7 @@ }, "macro.dbt.default__get_create_intermediate_sql": { "arguments": [], - "created_at": 1733768712.054506, + "created_at": 1719485736.475838, "depends_on": { "macros": [ "macro.dbt.make_intermediate_relation", @@ -2684,7 +2569,7 @@ }, "macro.dbt.default__get_create_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768712.062708, + "created_at": 1719485736.494792, "depends_on": { "macros": [] }, @@ -2706,7 +2591,7 @@ }, "macro.dbt.default__get_create_sql": { "arguments": [], - "created_at": 1733768712.058648, + "created_at": 1719485736.483476, "depends_on": { "macros": [ "macro.dbt.get_create_view_as_sql", @@ -2732,7 +2617,7 @@ }, "macro.dbt.default__get_create_table_as_sql": { "arguments": [], - "created_at": 1733768712.068762, + "created_at": 1719485736.508211, "depends_on": { "macros": [ "macro.dbt.create_table_as" @@ -2756,7 +2641,7 @@ }, "macro.dbt.default__get_create_view_as_sql": { "arguments": [], - "created_at": 1733768712.074301, + "created_at": 1719485736.515317, "depends_on": { "macros": [ "macro.dbt.create_view_as" @@ -2780,7 +2665,7 @@ }, "macro.dbt.default__get_csv_sql": { "arguments": [], - "created_at": 1733768712.0454211, + "created_at": 1719485736.461133, "depends_on": { "macros": [] }, @@ -2802,7 +2687,7 @@ }, "macro.dbt.default__get_dcl_statement_list": { "arguments": [], - "created_at": 1733768712.116728, + "created_at": 1719485736.5756311, "depends_on": { "macros": [ "macro.dbt.support_multiple_grantees_per_dcl_statement" @@ -2826,7 +2711,7 @@ }, "macro.dbt.default__get_delete_insert_merge_sql": { "arguments": [], - "created_at": 1733768711.981184, + "created_at": 1719485736.415282, "depends_on": { "macros": [ "macro.dbt.get_quoted_csv" @@ -2850,7 +2735,7 @@ }, "macro.dbt.default__get_drop_backup_sql": { "arguments": [], - "created_at": 1733768712.055574, + "created_at": 1719485736.476908, "depends_on": { "macros": [ "macro.dbt.make_backup_relation", @@ -2875,7 +2760,7 @@ }, "macro.dbt.default__get_drop_index_sql": { "arguments": [], - "created_at": 1733768712.105823, + "created_at": 1719485736.562772, "depends_on": { "macros": [] }, @@ -2897,7 +2782,7 @@ }, "macro.dbt.default__get_drop_sql": { "arguments": [], - "created_at": 1733768712.051417, + "created_at": 1719485736.471034, "depends_on": { "macros": [ "macro.dbt.drop_view", @@ -2910,7 +2795,7 @@ "node_color": null, "show": true }, - "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", + "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "meta": {}, "name": "default__get_drop_sql", "original_file_path": "macros/relations/drop.sql", @@ -2923,7 +2808,7 @@ }, "macro.dbt.default__get_empty_schema_sql": { "arguments": [], - "created_at": 1733768712.132318, + "created_at": 1719485736.5985012, "depends_on": { "macros": [ "macro.dbt.cast" @@ -2947,7 +2832,7 @@ }, "macro.dbt.default__get_empty_subquery_sql": { "arguments": [], - "created_at": 1733768712.131079, + "created_at": 1719485736.597066, "depends_on": { "macros": [] }, @@ -2969,7 +2854,7 @@ }, "macro.dbt.default__get_grant_sql": { "arguments": [], - "created_at": 1733768712.115499, + "created_at": 1719485736.5742211, "depends_on": { "macros": [] }, @@ -2978,7 +2863,7 @@ "node_color": null, "show": true }, - "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", + "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "meta": {}, "name": "default__get_grant_sql", "original_file_path": "macros/adapters/apply_grants.sql", @@ -2991,7 +2876,7 @@ }, "macro.dbt.default__get_incremental_append_sql": { "arguments": [], - "created_at": 1733768711.9839628, + "created_at": 1719485736.418623, "depends_on": { "macros": [ "macro.dbt.get_insert_into_sql" @@ -3015,7 +2900,7 @@ }, "macro.dbt.default__get_incremental_default_sql": { "arguments": [], - "created_at": 1733768711.98561, + "created_at": 1719485736.4215739, "depends_on": { "macros": [ "macro.dbt.get_incremental_append_sql" @@ -3039,7 +2924,7 @@ }, "macro.dbt.default__get_incremental_delete_insert_sql": { "arguments": [], - "created_at": 1733768711.984427, + "created_at": 1719485736.419171, "depends_on": { "macros": [ "macro.dbt.get_delete_insert_merge_sql" @@ -3063,7 +2948,7 @@ }, "macro.dbt.default__get_incremental_insert_overwrite_sql": { "arguments": [], - "created_at": 1733768711.9853, + "created_at": 1719485736.421212, "depends_on": { "macros": [ "macro.dbt.get_insert_overwrite_merge_sql" @@ -3087,7 +2972,7 @@ }, "macro.dbt.default__get_incremental_merge_sql": { "arguments": [], - "created_at": 1733768711.984875, + "created_at": 1719485736.420272, "depends_on": { "macros": [ "macro.dbt.get_merge_sql" @@ -3109,31 +2994,9 @@ "supported_languages": null, "unique_id": "macro.dbt.default__get_incremental_merge_sql" }, - "macro.dbt.default__get_incremental_microbatch_sql": { - "arguments": [], - "created_at": 1733768711.985931, - "depends_on": { - "macros": [] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", - "meta": {}, - "name": "default__get_incremental_microbatch_sql", - "original_file_path": "macros/materializations/models/incremental/strategies.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/materializations/models/incremental/strategies.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.default__get_incremental_microbatch_sql" - }, "macro.dbt.default__get_insert_overwrite_merge_sql": { "arguments": [], - "created_at": 1733768711.9820359, + "created_at": 1719485736.416304, "depends_on": { "macros": [ "macro.dbt.get_quoted_csv" @@ -3157,7 +3020,7 @@ }, "macro.dbt.default__get_intervals_between": { "arguments": [], - "created_at": 1733768712.08381, + "created_at": 1719485736.5290911, "depends_on": { "macros": [ "macro.dbt.statement", @@ -3180,9 +3043,9 @@ "supported_languages": null, "unique_id": "macro.dbt.default__get_intervals_between" }, - "macro.dbt.default__get_limit_sql": { + "macro.dbt.default__get_limit_subquery_sql": { "arguments": [], - "created_at": 1733768712.119213, + "created_at": 1719485736.581942, "depends_on": { "macros": [] }, @@ -3191,20 +3054,20 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n {{ compiled_code }}\n {% if limit is not none %}\n limit {{ limit }}\n {%- endif -%}\n{% endmacro %}", + "macro_sql": "{% macro default__get_limit_subquery_sql(sql, limit) %}\n select *\n from (\n {{ sql }}\n ) as model_limit_subq\n limit {{ limit }}\n{% endmacro %}", "meta": {}, - "name": "default__get_limit_sql", + "name": "default__get_limit_subquery_sql", "original_file_path": "macros/adapters/show.sql", "package_name": "dbt", "patch_path": null, "path": "macros/adapters/show.sql", "resource_type": "macro", "supported_languages": null, - "unique_id": "macro.dbt.default__get_limit_sql" + "unique_id": "macro.dbt.default__get_limit_subquery_sql" }, "macro.dbt.default__get_materialized_view_configuration_changes": { "arguments": [], - "created_at": 1733768712.062294, + "created_at": 1719485736.4943428, "depends_on": { "macros": [] }, @@ -3226,7 +3089,7 @@ }, "macro.dbt.default__get_merge_sql": { "arguments": [], - "created_at": 1733768711.980005, + "created_at": 1719485736.413476, "depends_on": { "macros": [ "macro.dbt.get_quoted_csv", @@ -3251,7 +3114,7 @@ }, "macro.dbt.default__get_merge_update_columns": { "arguments": [], - "created_at": 1733768711.97191, + "created_at": 1719485736.399054, "depends_on": { "macros": [] }, @@ -3273,7 +3136,7 @@ }, "macro.dbt.default__get_or_create_relation": { "arguments": [], - "created_at": 1733768712.110579, + "created_at": 1719485736.568331, "depends_on": { "macros": [] }, @@ -3295,7 +3158,7 @@ }, "macro.dbt.default__get_powers_of_two": { "arguments": [], - "created_at": 1733768712.086991, + "created_at": 1719485736.534994, "depends_on": { "macros": [] }, @@ -3317,7 +3180,7 @@ }, "macro.dbt.default__get_relation_last_modified": { "arguments": [], - "created_at": 1733768712.1280901, + "created_at": 1719485736.5935519, "depends_on": { "macros": [] }, @@ -3339,7 +3202,7 @@ }, "macro.dbt.default__get_relations": { "arguments": [], - "created_at": 1733768712.1276422, + "created_at": 1719485736.592618, "depends_on": { "macros": [] }, @@ -3361,7 +3224,7 @@ }, "macro.dbt.default__get_rename_intermediate_sql": { "arguments": [], - "created_at": 1733768712.059212, + "created_at": 1719485736.485399, "depends_on": { "macros": [ "macro.dbt.make_intermediate_relation", @@ -3386,7 +3249,7 @@ }, "macro.dbt.default__get_rename_materialized_view_sql": { "arguments": [], - "created_at": 1733768712.060888, + "created_at": 1719485736.491203, "depends_on": { "macros": [] }, @@ -3408,7 +3271,7 @@ }, "macro.dbt.default__get_rename_sql": { "arguments": [], - "created_at": 1733768712.056698, + "created_at": 1719485736.4781098, "depends_on": { "macros": [ "macro.dbt.get_rename_view_sql", @@ -3434,7 +3297,7 @@ }, "macro.dbt.default__get_rename_table_sql": { "arguments": [], - "created_at": 1733768712.067787, + "created_at": 1719485736.507071, "depends_on": { "macros": [] }, @@ -3456,7 +3319,7 @@ }, "macro.dbt.default__get_rename_view_sql": { "arguments": [], - "created_at": 1733768712.073762, + "created_at": 1719485736.514697, "depends_on": { "macros": [] }, @@ -3478,7 +3341,7 @@ }, "macro.dbt.default__get_replace_materialized_view_sql": { "arguments": [], - "created_at": 1733768712.060069, + "created_at": 1719485736.4885828, "depends_on": { "macros": [] }, @@ -3500,7 +3363,7 @@ }, "macro.dbt.default__get_replace_sql": { "arguments": [], - "created_at": 1733768712.0539079, + "created_at": 1719485736.475151, "depends_on": { "macros": [ "macro.dbt.get_replace_view_sql", @@ -3532,7 +3395,7 @@ }, "macro.dbt.default__get_replace_table_sql": { "arguments": [], - "created_at": 1733768712.0673852, + "created_at": 1719485736.506342, "depends_on": { "macros": [] }, @@ -3554,7 +3417,7 @@ }, "macro.dbt.default__get_replace_view_sql": { "arguments": [], - "created_at": 1733768712.07186, + "created_at": 1719485736.512308, "depends_on": { "macros": [] }, @@ -3576,7 +3439,7 @@ }, "macro.dbt.default__get_revoke_sql": { "arguments": [], - "created_at": 1733768712.115904, + "created_at": 1719485736.574667, "depends_on": { "macros": [] }, @@ -3585,7 +3448,7 @@ "node_color": null, "show": true }, - "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation.render() }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", + "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "meta": {}, "name": "default__get_revoke_sql", "original_file_path": "macros/adapters/apply_grants.sql", @@ -3598,7 +3461,7 @@ }, "macro.dbt.default__get_select_subquery": { "arguments": [], - "created_at": 1733768712.070566, + "created_at": 1719485736.510467, "depends_on": { "macros": [ "macro.dbt.default__get_column_names" @@ -3622,7 +3485,7 @@ }, "macro.dbt.default__get_show_grant_sql": { "arguments": [], - "created_at": 1733768712.1147678, + "created_at": 1719485736.573777, "depends_on": { "macros": [] }, @@ -3631,7 +3494,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation.render() }}\n{% endmacro %}", + "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "meta": {}, "name": "default__get_show_grant_sql", "original_file_path": "macros/adapters/apply_grants.sql", @@ -3644,7 +3507,7 @@ }, "macro.dbt.default__get_show_indexes_sql": { "arguments": [], - "created_at": 1733768712.106099, + "created_at": 1719485736.563092, "depends_on": { "macros": [] }, @@ -3666,7 +3529,7 @@ }, "macro.dbt.default__get_table_columns_and_constraints": { "arguments": [], - "created_at": 1733768712.063787, + "created_at": 1719485736.497637, "depends_on": { "macros": [ "macro.dbt.table_columns_and_constraints" @@ -3690,7 +3553,7 @@ }, "macro.dbt.default__get_test_sql": { "arguments": [], - "created_at": 1733768711.952368, + "created_at": 1719485736.372639, "depends_on": { "macros": [] }, @@ -3712,7 +3575,7 @@ }, "macro.dbt.default__get_true_sql": { "arguments": [], - "created_at": 1733768711.939322, + "created_at": 1719485736.3555431, "depends_on": { "macros": [] }, @@ -3734,7 +3597,7 @@ }, "macro.dbt.default__get_unit_test_sql": { "arguments": [], - "created_at": 1733768711.953221, + "created_at": 1719485736.3736708, "depends_on": { "macros": [ "macro.dbt.string_literal" @@ -3758,7 +3621,7 @@ }, "macro.dbt.default__get_where_subquery": { "arguments": [], - "created_at": 1733768711.953933, + "created_at": 1719485736.374502, "depends_on": { "macros": [] }, @@ -3780,7 +3643,7 @@ }, "macro.dbt.default__handle_existing_table": { "arguments": [], - "created_at": 1733768712.0733728, + "created_at": 1719485736.514176, "depends_on": { "macros": [] }, @@ -3789,7 +3652,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__handle_existing_table", "original_file_path": "macros/relations/view/replace.sql", @@ -3802,7 +3665,7 @@ }, "macro.dbt.default__hash": { "arguments": [], - "created_at": 1733768712.092513, + "created_at": 1719485736.541434, "depends_on": { "macros": [] }, @@ -3824,7 +3687,7 @@ }, "macro.dbt.default__information_schema_name": { "arguments": [], - "created_at": 1733768712.1256452, + "created_at": 1719485736.590823, "depends_on": { "macros": [] }, @@ -3846,7 +3709,7 @@ }, "macro.dbt.default__intersect": { "arguments": [], - "created_at": 1733768712.089279, + "created_at": 1719485736.537451, "depends_on": { "macros": [] }, @@ -3868,7 +3731,7 @@ }, "macro.dbt.default__last_day": { "arguments": [], - "created_at": 1733768712.098767, + "created_at": 1719485736.55349, "depends_on": { "macros": [ "macro.dbt.default_last_day" @@ -3892,7 +3755,7 @@ }, "macro.dbt.default__length": { "arguments": [], - "created_at": 1733768712.0880818, + "created_at": 1719485736.536426, "depends_on": { "macros": [] }, @@ -3914,7 +3777,7 @@ }, "macro.dbt.default__list_relations_without_caching": { "arguments": [], - "created_at": 1733768712.126833, + "created_at": 1719485736.592287, "depends_on": { "macros": [] }, @@ -3936,7 +3799,7 @@ }, "macro.dbt.default__list_schemas": { "arguments": [], - "created_at": 1733768712.12604, + "created_at": 1719485736.591269, "depends_on": { "macros": [ "macro.dbt.information_schema_name", @@ -3961,7 +3824,7 @@ }, "macro.dbt.default__listagg": { "arguments": [], - "created_at": 1733768712.0910652, + "created_at": 1719485736.539655, "depends_on": { "macros": [] }, @@ -3983,7 +3846,7 @@ }, "macro.dbt.default__load_csv_rows": { "arguments": [], - "created_at": 1733768712.047956, + "created_at": 1719485736.465408, "depends_on": { "macros": [ "macro.dbt.get_batch_size", @@ -4009,7 +3872,7 @@ }, "macro.dbt.default__make_backup_relation": { "arguments": [], - "created_at": 1733768712.109487, + "created_at": 1719485736.5670989, "depends_on": { "macros": [] }, @@ -4031,7 +3894,7 @@ }, "macro.dbt.default__make_intermediate_relation": { "arguments": [], - "created_at": 1733768712.108427, + "created_at": 1719485736.56591, "depends_on": { "macros": [ "macro.dbt.default__make_temp_relation" @@ -4055,7 +3918,7 @@ }, "macro.dbt.default__make_temp_relation": { "arguments": [], - "created_at": 1733768712.108973, + "created_at": 1719485736.566462, "depends_on": { "macros": [] }, @@ -4077,7 +3940,7 @@ }, "macro.dbt.default__persist_docs": { "arguments": [], - "created_at": 1733768712.121331, + "created_at": 1719485736.586432, "depends_on": { "macros": [ "macro.dbt.run_query", @@ -4103,7 +3966,7 @@ }, "macro.dbt.default__position": { "arguments": [], - "created_at": 1733768712.094113, + "created_at": 1719485736.543534, "depends_on": { "macros": [] }, @@ -4125,7 +3988,7 @@ }, "macro.dbt.default__post_snapshot": { "arguments": [], - "created_at": 1733768711.939072, + "created_at": 1719485736.3552608, "depends_on": { "macros": [] }, @@ -4147,7 +4010,7 @@ }, "macro.dbt.default__refresh_materialized_view": { "arguments": [], - "created_at": 1733768712.0604951, + "created_at": 1719485736.49013, "depends_on": { "macros": [] }, @@ -4169,7 +4032,7 @@ }, "macro.dbt.default__rename_relation": { "arguments": [], - "created_at": 1733768712.0571961, + "created_at": 1719485736.4786189, "depends_on": { "macros": [ "macro.dbt.statement" @@ -4180,7 +4043,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation.render() }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__rename_relation", "original_file_path": "macros/relations/rename.sql", @@ -4193,7 +4056,7 @@ }, "macro.dbt.default__replace": { "arguments": [], - "created_at": 1733768712.085391, + "created_at": 1719485736.533091, "depends_on": { "macros": [] }, @@ -4215,7 +4078,7 @@ }, "macro.dbt.default__reset_csv_table": { "arguments": [], - "created_at": 1733768712.045103, + "created_at": 1719485736.460783, "depends_on": { "macros": [ "macro.dbt.create_csv_table" @@ -4226,7 +4089,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation.render() %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__reset_csv_table", "original_file_path": "macros/materializations/seeds/helpers.sql", @@ -4239,7 +4102,7 @@ }, "macro.dbt.default__resolve_model_name": { "arguments": [], - "created_at": 1733768712.141831, + "created_at": 1719485736.615371, "depends_on": { "macros": [] }, @@ -4261,7 +4124,7 @@ }, "macro.dbt.default__right": { "arguments": [], - "created_at": 1733768712.090067, + "created_at": 1719485736.538501, "depends_on": { "macros": [] }, @@ -4283,7 +4146,7 @@ }, "macro.dbt.default__safe_cast": { "arguments": [], - "created_at": 1733768712.092109, + "created_at": 1719485736.540907, "depends_on": { "macros": [] }, @@ -4305,7 +4168,7 @@ }, "macro.dbt.default__snapshot_get_time": { "arguments": [], - "created_at": 1733768712.102928, + "created_at": 1719485736.559646, "depends_on": { "macros": [ "macro.dbt.current_timestamp" @@ -4329,7 +4192,7 @@ }, "macro.dbt.default__snapshot_hash_arguments": { "arguments": [], - "created_at": 1733768711.928189, + "created_at": 1719485736.345648, "depends_on": { "macros": [] }, @@ -4351,18 +4214,16 @@ }, "macro.dbt.default__snapshot_merge_sql": { "arguments": [], - "created_at": 1733768711.924642, + "created_at": 1719485736.340331, "depends_on": { - "macros": [ - "macro.dbt.get_snapshot_table_column_names" - ] + "macros": [] }, "description": "", "docs": { "node_color": null, "show": true }, - "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n merge into {{ target.render() }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n when matched\n and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", + "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 %}", "meta": {}, "name": "default__snapshot_merge_sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", @@ -4375,10 +4236,9 @@ }, "macro.dbt.default__snapshot_staging_table": { "arguments": [], - "created_at": 1733768711.940938, + "created_at": 1719485736.356719, "depends_on": { "macros": [ - "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_get_time" ] }, @@ -4387,7 +4247,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\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 {{ columns.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 {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as {{ columns.dbt_valid_to }},\n {{ strategy.scd_id }} as {{ columns.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 {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n from snapshot_query\n ),\n\n {%- if strategy.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.{{ columns.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 {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n snapshotted_data.{{ columns.dbt_scd_id }}\n\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 %}", + "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 %}", "meta": {}, "name": "default__snapshot_staging_table", "original_file_path": "macros/materializations/snapshots/helpers.sql", @@ -4400,7 +4260,7 @@ }, "macro.dbt.default__snapshot_string_as_time": { "arguments": [], - "created_at": 1733768711.9292958, + "created_at": 1719485736.346766, "depends_on": { "macros": [] }, @@ -4422,7 +4282,7 @@ }, "macro.dbt.default__split_part": { "arguments": [], - "created_at": 1733768712.099427, + "created_at": 1719485736.554402, "depends_on": { "macros": [] }, @@ -4444,7 +4304,7 @@ }, "macro.dbt.default__string_literal": { "arguments": [], - "created_at": 1733768712.094439, + "created_at": 1719485736.544776, "depends_on": { "macros": [] }, @@ -4466,7 +4326,7 @@ }, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": { "arguments": [], - "created_at": 1733768712.11417, + "created_at": 1719485736.573099, "depends_on": { "macros": [] }, @@ -4488,7 +4348,7 @@ }, "macro.dbt.default__test_accepted_values": { "arguments": [], - "created_at": 1733768712.076216, + "created_at": 1719485736.517527, "depends_on": { "macros": [] }, @@ -4510,7 +4370,7 @@ }, "macro.dbt.default__test_not_null": { "arguments": [], - "created_at": 1733768712.075467, + "created_at": 1719485736.516648, "depends_on": { "macros": [ "macro.dbt.should_store_failures" @@ -4534,7 +4394,7 @@ }, "macro.dbt.default__test_relationships": { "arguments": [], - "created_at": 1733768712.0751932, + "created_at": 1719485736.516331, "depends_on": { "macros": [] }, @@ -4556,7 +4416,7 @@ }, "macro.dbt.default__test_unique": { "arguments": [], - "created_at": 1733768712.075694, + "created_at": 1719485736.5169122, "depends_on": { "macros": [] }, @@ -4578,7 +4438,7 @@ }, "macro.dbt.default__truncate_relation": { "arguments": [], - "created_at": 1733768712.10983, + "created_at": 1719485736.5674748, "depends_on": { "macros": [ "macro.dbt.statement" @@ -4589,7 +4449,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation.render() }}\n {%- endcall %}\n{% endmacro %}", + "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "meta": {}, "name": "default__truncate_relation", "original_file_path": "macros/adapters/relation.sql", @@ -4602,7 +4462,7 @@ }, "macro.dbt.default__type_bigint": { "arguments": [], - "created_at": 1733768712.096638, + "created_at": 1719485736.5486028, "depends_on": { "macros": [] }, @@ -4624,7 +4484,7 @@ }, "macro.dbt.default__type_boolean": { "arguments": [], - "created_at": 1733768712.097211, + "created_at": 1719485736.550734, "depends_on": { "macros": [] }, @@ -4646,7 +4506,7 @@ }, "macro.dbt.default__type_float": { "arguments": [], - "created_at": 1733768712.0960279, + "created_at": 1719485736.5472598, "depends_on": { "macros": [] }, @@ -4668,7 +4528,7 @@ }, "macro.dbt.default__type_int": { "arguments": [], - "created_at": 1733768712.0969238, + "created_at": 1719485736.549174, "depends_on": { "macros": [] }, @@ -4690,7 +4550,7 @@ }, "macro.dbt.default__type_numeric": { "arguments": [], - "created_at": 1733768712.0963368, + "created_at": 1719485736.547792, "depends_on": { "macros": [] }, @@ -4712,7 +4572,7 @@ }, "macro.dbt.default__type_string": { "arguments": [], - "created_at": 1733768712.095437, + "created_at": 1719485736.5461628, "depends_on": { "macros": [] }, @@ -4734,7 +4594,7 @@ }, "macro.dbt.default__type_timestamp": { "arguments": [], - "created_at": 1733768712.095736, + "created_at": 1719485736.5468001, "depends_on": { "macros": [] }, @@ -4754,31 +4614,9 @@ "supported_languages": null, "unique_id": "macro.dbt.default__type_timestamp" }, - "macro.dbt.default__validate_fixture_rows": { - "arguments": [], - "created_at": 1733768712.14012, - "depends_on": { - "macros": [] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", - "meta": {}, - "name": "default__validate_fixture_rows", - "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/unit_test_sql/get_fixture_sql.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.default__validate_fixture_rows" - }, "macro.dbt.default__validate_sql": { "arguments": [], - "created_at": 1733768712.112152, + "created_at": 1719485736.570561, "depends_on": { "macros": [ "macro.dbt.statement" @@ -4802,7 +4640,7 @@ }, "macro.dbt.default_last_day": { "arguments": [], - "created_at": 1733768712.098628, + "created_at": 1719485736.5533261, "depends_on": { "macros": [ "macro.dbt.dateadd", @@ -4827,7 +4665,7 @@ }, "macro.dbt.diff_column_data_types": { "arguments": [], - "created_at": 1733768711.971037, + "created_at": 1719485736.397441, "depends_on": { "macros": [] }, @@ -4849,7 +4687,7 @@ }, "macro.dbt.diff_columns": { "arguments": [], - "created_at": 1733768711.970446, + "created_at": 1719485736.396736, "depends_on": { "macros": [] }, @@ -4871,7 +4709,7 @@ }, "macro.dbt.drop_materialized_view": { "arguments": [], - "created_at": 1733768712.059457, + "created_at": 1719485736.486141, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__drop_materialized_view" @@ -4895,7 +4733,7 @@ }, "macro.dbt.drop_relation": { "arguments": [], - "created_at": 1733768712.051589, + "created_at": 1719485736.471232, "depends_on": { "macros": [ "macro.dbt.default__drop_relation" @@ -4919,7 +4757,7 @@ }, "macro.dbt.drop_relation_if_exists": { "arguments": [], - "created_at": 1733768712.051958, + "created_at": 1719485736.471669, "depends_on": { "macros": [] }, @@ -4941,7 +4779,7 @@ }, "macro.dbt.drop_schema": { "arguments": [], - "created_at": 1733768712.101682, + "created_at": 1719485736.558478, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__drop_schema" @@ -4965,7 +4803,7 @@ }, "macro.dbt.drop_schema_named": { "arguments": [], - "created_at": 1733768712.054762, + "created_at": 1719485736.4761379, "depends_on": { "macros": [ "macro.dbt.default__drop_schema_named" @@ -4989,7 +4827,7 @@ }, "macro.dbt.drop_table": { "arguments": [], - "created_at": 1733768712.066834, + "created_at": 1719485736.505447, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__drop_table" @@ -5013,7 +4851,7 @@ }, "macro.dbt.drop_view": { "arguments": [], - "created_at": 1733768712.0707982, + "created_at": 1719485736.511067, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__drop_view" @@ -5037,7 +4875,7 @@ }, "macro.dbt.escape_single_quotes": { "arguments": [], - "created_at": 1733768712.0895271, + "created_at": 1719485736.537864, "depends_on": { "macros": [ "macro.dbt.default__escape_single_quotes" @@ -5061,7 +4899,7 @@ }, "macro.dbt.except": { "arguments": [], - "created_at": 1733768712.0824928, + "created_at": 1719485736.5260952, "depends_on": { "macros": [ "macro.dbt.default__except" @@ -5085,7 +4923,7 @@ }, "macro.dbt.format_columns": { "arguments": [], - "created_at": 1733768712.066251, + "created_at": 1719485736.504094, "depends_on": { "macros": [ "macro.dbt.default__format_column" @@ -5109,7 +4947,7 @@ }, "macro.dbt.format_row": { "arguments": [], - "created_at": 1733768712.139827, + "created_at": 1719485736.611443, "depends_on": { "macros": [ "macro.dbt.string_literal", @@ -5122,7 +4960,7 @@ "node_color": null, "show": true }, - "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", + "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}", "meta": {}, "name": "format_row", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", @@ -5135,7 +4973,7 @@ }, "macro.dbt.generate_alias_name": { "arguments": [], - "created_at": 1733768712.048397, + "created_at": 1719485736.466082, "depends_on": { "macros": [ "macro.dbt.default__generate_alias_name" @@ -5159,7 +4997,7 @@ }, "macro.dbt.generate_database_name": { "arguments": [], - "created_at": 1733768712.050146, + "created_at": 1719485736.468485, "depends_on": { "macros": [ "macro.dbt.default__generate_database_name" @@ -5183,7 +5021,7 @@ }, "macro.dbt.generate_schema_name": { "arguments": [], - "created_at": 1733768712.049263, + "created_at": 1719485736.467374, "depends_on": { "macros": [ "macro.dbt.default__generate_schema_name" @@ -5207,7 +5045,7 @@ }, "macro.dbt.generate_schema_name_for_env": { "arguments": [], - "created_at": 1733768712.0497751, + "created_at": 1719485736.46803, "depends_on": { "macros": [] }, @@ -5229,7 +5067,7 @@ }, "macro.dbt.generate_series": { "arguments": [], - "created_at": 1733768712.087168, + "created_at": 1719485736.5352, "depends_on": { "macros": [ "macro.dbt.default__generate_series" @@ -5253,7 +5091,7 @@ }, "macro.dbt.get_alter_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768712.0616388, + "created_at": 1719485736.492841, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql" @@ -5277,7 +5115,7 @@ }, "macro.dbt.get_assert_columns_equivalent": { "arguments": [], - "created_at": 1733768712.064451, + "created_at": 1719485736.5009642, "depends_on": { "macros": [ "macro.dbt.default__get_assert_columns_equivalent" @@ -5301,7 +5139,7 @@ }, "macro.dbt.get_batch_size": { "arguments": [], - "created_at": 1733768712.045829, + "created_at": 1719485736.461688, "depends_on": { "macros": [ "macro.dbt.default__get_batch_size" @@ -5325,7 +5163,7 @@ }, "macro.dbt.get_binding_char": { "arguments": [], - "created_at": 1733768712.045561, + "created_at": 1719485736.461306, "depends_on": { "macros": [ "macro.dbt.default__get_binding_char" @@ -5349,7 +5187,7 @@ }, "macro.dbt.get_catalog": { "arguments": [], - "created_at": 1733768712.125071, + "created_at": 1719485736.590185, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_catalog" @@ -5371,33 +5209,9 @@ "supported_languages": null, "unique_id": "macro.dbt.get_catalog" }, - "macro.dbt.get_catalog_for_single_relation": { - "arguments": [], - "created_at": 1733768712.127008, - "depends_on": { - "macros": [ - "macro.dbt.default__get_catalog_for_single_relation" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", - "meta": {}, - "name": "get_catalog_for_single_relation", - "original_file_path": "macros/adapters/metadata.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/adapters/metadata.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.get_catalog_for_single_relation" - }, "macro.dbt.get_catalog_relations": { "arguments": [], - "created_at": 1733768712.12464, + "created_at": 1719485736.5896802, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_catalog_relations" @@ -5421,7 +5235,7 @@ }, "macro.dbt.get_column_schema_from_query": { "arguments": [], - "created_at": 1733768712.132643, + "created_at": 1719485736.598866, "depends_on": { "macros": [ "macro.dbt.get_empty_subquery_sql" @@ -5445,7 +5259,7 @@ }, "macro.dbt.get_columns_in_query": { "arguments": [], - "created_at": 1733768712.132813, + "created_at": 1719485736.5990841, "depends_on": { "macros": [ "macro.dbt.default__get_columns_in_query" @@ -5469,7 +5283,7 @@ }, "macro.dbt.get_columns_in_relation": { "arguments": [], - "created_at": 1733768712.130246, + "created_at": 1719485736.596093, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_columns_in_relation" @@ -5493,7 +5307,7 @@ }, "macro.dbt.get_create_backup_sql": { "arguments": [], - "created_at": 1733768712.0575302, + "created_at": 1719485736.478982, "depends_on": { "macros": [ "macro.dbt.default__get_create_backup_sql" @@ -5517,7 +5331,7 @@ }, "macro.dbt.get_create_index_sql": { "arguments": [], - "created_at": 1733768712.1046588, + "created_at": 1719485736.561203, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_create_index_sql" @@ -5541,7 +5355,7 @@ }, "macro.dbt.get_create_intermediate_sql": { "arguments": [], - "created_at": 1733768712.05427, + "created_at": 1719485736.4755762, "depends_on": { "macros": [ "macro.dbt.default__get_create_intermediate_sql" @@ -5565,7 +5379,7 @@ }, "macro.dbt.get_create_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768712.062571, + "created_at": 1719485736.4946408, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql" @@ -5589,7 +5403,7 @@ }, "macro.dbt.get_create_sql": { "arguments": [], - "created_at": 1733768712.058231, + "created_at": 1719485736.481704, "depends_on": { "macros": [ "macro.dbt.default__get_create_sql" @@ -5613,7 +5427,7 @@ }, "macro.dbt.get_create_table_as_sql": { "arguments": [], - "created_at": 1733768712.068589, + "created_at": 1719485736.50801, "depends_on": { "macros": [ "macro.dbt.default__get_create_table_as_sql" @@ -5637,7 +5451,7 @@ }, "macro.dbt.get_create_view_as_sql": { "arguments": [], - "created_at": 1733768712.0741491, + "created_at": 1719485736.515145, "depends_on": { "macros": [ "macro.dbt.default__get_create_view_as_sql" @@ -5661,7 +5475,7 @@ }, "macro.dbt.get_csv_sql": { "arguments": [], - "created_at": 1733768712.0452921, + "created_at": 1719485736.460989, "depends_on": { "macros": [ "macro.dbt.default__get_csv_sql" @@ -5685,7 +5499,7 @@ }, "macro.dbt.get_dcl_statement_list": { "arguments": [], - "created_at": 1733768712.116114, + "created_at": 1719485736.574908, "depends_on": { "macros": [ "macro.dbt.default__get_dcl_statement_list" @@ -5709,7 +5523,7 @@ }, "macro.dbt.get_delete_insert_merge_sql": { "arguments": [], - "created_at": 1733768711.980267, + "created_at": 1719485736.414207, "depends_on": { "macros": [ "macro.dbt.default__get_delete_insert_merge_sql" @@ -5733,7 +5547,7 @@ }, "macro.dbt.get_drop_backup_sql": { "arguments": [], - "created_at": 1733768712.055254, + "created_at": 1719485736.476695, "depends_on": { "macros": [ "macro.dbt.default__get_drop_backup_sql" @@ -5757,7 +5571,7 @@ }, "macro.dbt.get_drop_index_sql": { "arguments": [], - "created_at": 1733768712.105682, + "created_at": 1719485736.562388, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_drop_index_sql" @@ -5781,7 +5595,7 @@ }, "macro.dbt.get_drop_sql": { "arguments": [], - "created_at": 1733768712.05106, + "created_at": 1719485736.470603, "depends_on": { "macros": [ "macro.dbt.default__get_drop_sql" @@ -5805,7 +5619,7 @@ }, "macro.dbt.get_empty_schema_sql": { "arguments": [], - "created_at": 1733768712.131246, + "created_at": 1719485736.597257, "depends_on": { "macros": [ "macro.dbt.default__get_empty_schema_sql" @@ -5829,7 +5643,7 @@ }, "macro.dbt.get_empty_subquery_sql": { "arguments": [], - "created_at": 1733768712.130889, + "created_at": 1719485736.596842, "depends_on": { "macros": [ "macro.dbt.default__get_empty_subquery_sql" @@ -5853,7 +5667,7 @@ }, "macro.dbt.get_expected_sql": { "arguments": [], - "created_at": 1733768712.138807, + "created_at": 1719485736.608841, "depends_on": { "macros": [ "macro.dbt.format_row" @@ -5877,12 +5691,11 @@ }, "macro.dbt.get_fixture_sql": { "arguments": [], - "created_at": 1733768712.138287, + "created_at": 1719485736.607797, "depends_on": { "macros": [ "macro.dbt.load_relation", "macro.dbt.safe_cast", - "macro.dbt.validate_fixture_rows", "macro.dbt.format_row" ] }, @@ -5891,7 +5704,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- for column in columns_in_relation -%}\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", + "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- for column in columns_in_relation -%}\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", "meta": {}, "name": "get_fixture_sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", @@ -5904,7 +5717,7 @@ }, "macro.dbt.get_grant_sql": { "arguments": [], - "created_at": 1733768712.115305, + "created_at": 1719485736.574021, "depends_on": { "macros": [ "macro.dbt.default__get_grant_sql" @@ -5928,7 +5741,7 @@ }, "macro.dbt.get_incremental_append_sql": { "arguments": [], - "created_at": 1733768711.9837089, + "created_at": 1719485736.418218, "depends_on": { "macros": [ "macro.dbt.default__get_incremental_append_sql" @@ -5952,7 +5765,7 @@ }, "macro.dbt.get_incremental_default_sql": { "arguments": [], - "created_at": 1733768711.985472, + "created_at": 1719485736.421412, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_incremental_default_sql" @@ -5976,7 +5789,7 @@ }, "macro.dbt.get_incremental_delete_insert_sql": { "arguments": [], - "created_at": 1733768711.984149, + "created_at": 1719485736.4188569, "depends_on": { "macros": [ "macro.dbt.default__get_incremental_delete_insert_sql" @@ -6000,7 +5813,7 @@ }, "macro.dbt.get_incremental_insert_overwrite_sql": { "arguments": [], - "created_at": 1733768711.9850519, + "created_at": 1719485736.420912, "depends_on": { "macros": [ "macro.dbt.default__get_incremental_insert_overwrite_sql" @@ -6024,7 +5837,7 @@ }, "macro.dbt.get_incremental_merge_sql": { "arguments": [], - "created_at": 1733768711.984603, + "created_at": 1719485736.419648, "depends_on": { "macros": [ "macro.dbt.default__get_incremental_merge_sql" @@ -6046,33 +5859,9 @@ "supported_languages": null, "unique_id": "macro.dbt.get_incremental_merge_sql" }, - "macro.dbt.get_incremental_microbatch_sql": { - "arguments": [], - "created_at": 1733768711.985783, - "depends_on": { - "macros": [ - "macro.dbt.default__get_incremental_microbatch_sql" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", - "meta": {}, - "name": "get_incremental_microbatch_sql", - "original_file_path": "macros/materializations/models/incremental/strategies.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/materializations/models/incremental/strategies.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.get_incremental_microbatch_sql" - }, "macro.dbt.get_insert_into_sql": { "arguments": [], - "created_at": 1733768711.986187, + "created_at": 1719485736.4218738, "depends_on": { "macros": [ "macro.dbt.get_quoted_csv" @@ -6096,7 +5885,7 @@ }, "macro.dbt.get_insert_overwrite_merge_sql": { "arguments": [], - "created_at": 1733768711.9814389, + "created_at": 1719485736.415607, "depends_on": { "macros": [ "macro.dbt.default__get_insert_overwrite_merge_sql" @@ -6120,7 +5909,7 @@ }, "macro.dbt.get_intervals_between": { "arguments": [], - "created_at": 1733768712.0832698, + "created_at": 1719485736.527589, "depends_on": { "macros": [ "macro.dbt.default__get_intervals_between" @@ -6144,10 +5933,10 @@ }, "macro.dbt.get_limit_subquery_sql": { "arguments": [], - "created_at": 1733768712.119031, + "created_at": 1719485736.58177, "depends_on": { "macros": [ - "macro.dbt.default__get_limit_sql" + "macro.dbt.default__get_limit_subquery_sql" ] }, "description": "", @@ -6155,7 +5944,7 @@ "node_color": null, "show": true }, - "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", + "macro_sql": "{% macro get_limit_subquery_sql(sql, limit) %}\n {{ adapter.dispatch('get_limit_subquery_sql', 'dbt')(sql, limit) }}\n{% endmacro %}", "meta": {}, "name": "get_limit_subquery_sql", "original_file_path": "macros/adapters/show.sql", @@ -6168,7 +5957,7 @@ }, "macro.dbt.get_materialized_view_configuration_changes": { "arguments": [], - "created_at": 1733768712.062151, + "created_at": 1719485736.494153, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes" @@ -6192,7 +5981,7 @@ }, "macro.dbt.get_merge_sql": { "arguments": [], - "created_at": 1733768711.978434, + "created_at": 1719485736.410901, "depends_on": { "macros": [ "macro.dbt.default__get_merge_sql" @@ -6216,7 +6005,7 @@ }, "macro.dbt.get_merge_update_columns": { "arguments": [], - "created_at": 1733768711.971263, + "created_at": 1719485736.397727, "depends_on": { "macros": [ "macro.dbt.default__get_merge_update_columns" @@ -6240,7 +6029,7 @@ }, "macro.dbt.get_or_create_relation": { "arguments": [], - "created_at": 1733768712.110068, + "created_at": 1719485736.567741, "depends_on": { "macros": [ "macro.dbt.default__get_or_create_relation" @@ -6264,7 +6053,7 @@ }, "macro.dbt.get_powers_of_two": { "arguments": [], - "created_at": 1733768712.086598, + "created_at": 1719485736.534465, "depends_on": { "macros": [ "macro.dbt.default__get_powers_of_two" @@ -6288,7 +6077,7 @@ }, "macro.dbt.get_quoted_csv": { "arguments": [], - "created_at": 1733768711.969949, + "created_at": 1719485736.395989, "depends_on": { "macros": [] }, @@ -6310,7 +6099,7 @@ }, "macro.dbt.get_relation_last_modified": { "arguments": [], - "created_at": 1733768712.127856, + "created_at": 1719485736.593024, "depends_on": { "macros": [ "macro.dbt.default__get_relation_last_modified" @@ -6334,7 +6123,7 @@ }, "macro.dbt.get_relations": { "arguments": [], - "created_at": 1733768712.127313, + "created_at": 1719485736.592459, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_relations" @@ -6358,7 +6147,7 @@ }, "macro.dbt.get_rename_intermediate_sql": { "arguments": [], - "created_at": 1733768712.058996, + "created_at": 1719485736.484606, "depends_on": { "macros": [ "macro.dbt.default__get_rename_intermediate_sql" @@ -6382,7 +6171,7 @@ }, "macro.dbt.get_rename_materialized_view_sql": { "arguments": [], - "created_at": 1733768712.060749, + "created_at": 1719485736.4909282, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_rename_materialized_view_sql" @@ -6406,7 +6195,7 @@ }, "macro.dbt.get_rename_sql": { "arguments": [], - "created_at": 1733768712.0562859, + "created_at": 1719485736.47766, "depends_on": { "macros": [ "macro.dbt.default__get_rename_sql" @@ -6430,7 +6219,7 @@ }, "macro.dbt.get_rename_table_sql": { "arguments": [], - "created_at": 1733768712.067647, + "created_at": 1719485736.5068932, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_rename_table_sql" @@ -6454,7 +6243,7 @@ }, "macro.dbt.get_rename_view_sql": { "arguments": [], - "created_at": 1733768712.073626, + "created_at": 1719485736.5145411, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_rename_view_sql" @@ -6478,7 +6267,7 @@ }, "macro.dbt.get_replace_materialized_view_sql": { "arguments": [], - "created_at": 1733768712.0598369, + "created_at": 1719485736.487545, "depends_on": { "macros": [ "macro.dbt.default__get_replace_materialized_view_sql" @@ -6502,7 +6291,7 @@ }, "macro.dbt.get_replace_sql": { "arguments": [], - "created_at": 1733768712.052743, + "created_at": 1719485736.4724941, "depends_on": { "macros": [ "macro.dbt.default__get_replace_sql" @@ -6526,7 +6315,7 @@ }, "macro.dbt.get_replace_table_sql": { "arguments": [], - "created_at": 1733768712.0672388, + "created_at": 1719485736.506175, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_replace_table_sql" @@ -6550,7 +6339,7 @@ }, "macro.dbt.get_replace_view_sql": { "arguments": [], - "created_at": 1733768712.071723, + "created_at": 1719485736.5121448, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_replace_view_sql" @@ -6574,7 +6363,7 @@ }, "macro.dbt.get_revoke_sql": { "arguments": [], - "created_at": 1733768712.1157131, + "created_at": 1719485736.574466, "depends_on": { "macros": [ "macro.dbt.default__get_revoke_sql" @@ -6598,7 +6387,7 @@ }, "macro.dbt.get_seed_column_quoted_csv": { "arguments": [], - "created_at": 1733768712.046391, + "created_at": 1719485736.462852, "depends_on": { "macros": [] }, @@ -6620,7 +6409,7 @@ }, "macro.dbt.get_select_subquery": { "arguments": [], - "created_at": 1733768712.070401, + "created_at": 1719485736.510276, "depends_on": { "macros": [ "macro.dbt.default__get_select_subquery" @@ -6644,7 +6433,7 @@ }, "macro.dbt.get_show_grant_sql": { "arguments": [], - "created_at": 1733768712.1146529, + "created_at": 1719485736.573664, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_show_grant_sql" @@ -6668,7 +6457,7 @@ }, "macro.dbt.get_show_indexes_sql": { "arguments": [], - "created_at": 1733768712.105977, + "created_at": 1719485736.562955, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_show_indexes_sql" @@ -6692,7 +6481,7 @@ }, "macro.dbt.get_show_sql": { "arguments": [], - "created_at": 1733768712.118849, + "created_at": 1719485736.581328, "depends_on": { "macros": [ "macro.dbt.get_limit_subquery_sql" @@ -6703,7 +6492,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header is not none -%}\n {{ sql_header }}\n {%- endif %}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", + "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header -%}\n {{ sql_header }}\n {%- endif -%}\n {%- if limit is not none -%}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n {%- else -%}\n {{ compiled_code }}\n {%- endif -%}\n{% endmacro %}", "meta": {}, "name": "get_show_sql", "original_file_path": "macros/adapters/show.sql", @@ -6714,57 +6503,9 @@ "supported_languages": null, "unique_id": "macro.dbt.get_show_sql" }, - "macro.dbt.get_snapshot_get_time_data_type": { - "arguments": [], - "created_at": 1733768712.1033092, - "depends_on": { - "macros": [ - "macro.dbt.snapshot_get_time", - "macro.dbt_postgres.postgres__snapshot_get_time", - "macro.dbt.get_column_schema_from_query" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n {{ return(time_data_type or none) }}\n{% endmacro %}", - "meta": {}, - "name": "get_snapshot_get_time_data_type", - "original_file_path": "macros/adapters/timestamps.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/adapters/timestamps.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.get_snapshot_get_time_data_type" - }, - "macro.dbt.get_snapshot_table_column_names": { - "arguments": [], - "created_at": 1733768711.939744, - "depends_on": { - "macros": [] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro get_snapshot_table_column_names() %}\n {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at'}) }}\n{% endmacro %}", - "meta": {}, - "name": "get_snapshot_table_column_names", - "original_file_path": "macros/materializations/snapshots/helpers.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/materializations/snapshots/helpers.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.get_snapshot_table_column_names" - }, "macro.dbt.get_table_columns_and_constraints": { "arguments": [], - "created_at": 1733768712.063669, + "created_at": 1719485736.497471, "depends_on": { "macros": [ "macro.dbt.default__get_table_columns_and_constraints" @@ -6788,7 +6529,7 @@ }, "macro.dbt.get_test_sql": { "arguments": [], - "created_at": 1733768711.952082, + "created_at": 1719485736.37231, "depends_on": { "macros": [ "macro.dbt.default__get_test_sql" @@ -6812,7 +6553,7 @@ }, "macro.dbt.get_true_sql": { "arguments": [], - "created_at": 1733768711.939211, + "created_at": 1719485736.355415, "depends_on": { "macros": [ "macro.dbt.default__get_true_sql" @@ -6836,7 +6577,7 @@ }, "macro.dbt.get_unit_test_sql": { "arguments": [], - "created_at": 1733768711.952619, + "created_at": 1719485736.3730109, "depends_on": { "macros": [ "macro.dbt.default__get_unit_test_sql" @@ -6858,33 +6599,9 @@ "supported_languages": null, "unique_id": "macro.dbt.get_unit_test_sql" }, - "macro.dbt.get_updated_at_column_data_type": { - "arguments": [], - "created_at": 1733768711.942471, - "depends_on": { - "macros": [ - "macro.dbt.get_column_schema_from_query" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n {% set dbt_updated_at_data_type = null %}\n {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {% set ns.dbt_updated_at_data_type = null -%}\n {% for column in snapshot_sql_column_schema %}\n {% if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n {% set ns.dbt_updated_at_data_type = column.dtype %}\n {% endif %}\n {% endfor %}\n {{ return(ns.dbt_updated_at_data_type or none) }}\n{% endmacro %}", - "meta": {}, - "name": "get_updated_at_column_data_type", - "original_file_path": "macros/materializations/snapshots/helpers.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/materializations/snapshots/helpers.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.get_updated_at_column_data_type" - }, "macro.dbt.get_where_subquery": { "arguments": [], - "created_at": 1733768711.953578, + "created_at": 1719485736.3740978, "depends_on": { "macros": [ "macro.dbt.default__get_where_subquery" @@ -6908,7 +6625,7 @@ }, "macro.dbt.handle_existing_table": { "arguments": [], - "created_at": 1733768712.073157, + "created_at": 1719485736.513942, "depends_on": { "macros": [ "macro.dbt.default__handle_existing_table" @@ -6932,7 +6649,7 @@ }, "macro.dbt.hash": { "arguments": [], - "created_at": 1733768712.0923588, + "created_at": 1719485736.5412428, "depends_on": { "macros": [ "macro.dbt.default__hash" @@ -6956,7 +6673,7 @@ }, "macro.dbt.in_transaction": { "arguments": [], - "created_at": 1733768711.922199, + "created_at": 1719485736.336884, "depends_on": { "macros": [ "macro.dbt.make_hook_config" @@ -6980,7 +6697,7 @@ }, "macro.dbt.incremental_validate_on_schema_change": { "arguments": [], - "created_at": 1733768711.9970958, + "created_at": 1719485736.437581, "depends_on": { "macros": [] }, @@ -7002,7 +6719,7 @@ }, "macro.dbt.information_schema_name": { "arguments": [], - "created_at": 1733768712.1254919, + "created_at": 1719485736.590652, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__information_schema_name" @@ -7026,7 +6743,7 @@ }, "macro.dbt.intersect": { "arguments": [], - "created_at": 1733768712.0892, + "created_at": 1719485736.537264, "depends_on": { "macros": [ "macro.dbt.default__intersect" @@ -7050,7 +6767,7 @@ }, "macro.dbt.is_incremental": { "arguments": [], - "created_at": 1733768711.982646, + "created_at": 1719485736.417088, "depends_on": { "macros": [ "macro.dbt.should_full_refresh" @@ -7074,7 +6791,7 @@ }, "macro.dbt.last_day": { "arguments": [], - "created_at": 1733768712.098379, + "created_at": 1719485736.553028, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__last_day" @@ -7098,7 +6815,7 @@ }, "macro.dbt.length": { "arguments": [], - "created_at": 1733768712.087976, + "created_at": 1719485736.536302, "depends_on": { "macros": [ "macro.dbt.default__length" @@ -7122,7 +6839,7 @@ }, "macro.dbt.list_relations_without_caching": { "arguments": [], - "created_at": 1733768712.126682, + "created_at": 1719485736.592111, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__list_relations_without_caching" @@ -7146,7 +6863,7 @@ }, "macro.dbt.list_schemas": { "arguments": [], - "created_at": 1733768712.125814, + "created_at": 1719485736.591011, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__list_schemas" @@ -7170,7 +6887,7 @@ }, "macro.dbt.listagg": { "arguments": [], - "created_at": 1733768712.0906901, + "created_at": 1719485736.5392041, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__listagg" @@ -7194,7 +6911,7 @@ }, "macro.dbt.load_cached_relation": { "arguments": [], - "created_at": 1733768712.1107929, + "created_at": 1719485736.568574, "depends_on": { "macros": [] }, @@ -7216,7 +6933,7 @@ }, "macro.dbt.load_csv_rows": { "arguments": [], - "created_at": 1733768712.046595, + "created_at": 1719485736.4631271, "depends_on": { "macros": [ "macro.dbt.default__load_csv_rows" @@ -7240,7 +6957,7 @@ }, "macro.dbt.load_relation": { "arguments": [], - "created_at": 1733768712.1109262, + "created_at": 1719485736.568728, "depends_on": { "macros": [ "macro.dbt.load_cached_relation" @@ -7264,7 +6981,7 @@ }, "macro.dbt.make_backup_relation": { "arguments": [], - "created_at": 1733768712.109196, + "created_at": 1719485736.566729, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_backup_relation" @@ -7288,7 +7005,7 @@ }, "macro.dbt.make_hook_config": { "arguments": [], - "created_at": 1733768711.921931, + "created_at": 1719485736.336577, "depends_on": { "macros": [] }, @@ -7310,7 +7027,7 @@ }, "macro.dbt.make_intermediate_relation": { "arguments": [], - "created_at": 1733768712.108265, + "created_at": 1719485736.565727, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_intermediate_relation" @@ -7334,7 +7051,7 @@ }, "macro.dbt.make_temp_relation": { "arguments": [], - "created_at": 1733768712.108624, + "created_at": 1719485736.5661461, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_temp_relation" @@ -7358,7 +7075,7 @@ }, "macro.dbt.materialization_clone_default": { "arguments": [], - "created_at": 1733768712.033293, + "created_at": 1719485736.448061, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7376,7 +7093,7 @@ "node_color": null, "show": true }, - "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% call statement('main') %}\n {% if target_relation and defer_relation and target_relation == defer_relation %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n {% else %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endif %}\n\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", + "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% call statement('main') %}\n {% if target_relation and defer_relation and target_relation == defer_relation %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation) }}\n {% else %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endif %}\n\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "meta": {}, "name": "materialization_clone_default", "original_file_path": "macros/materializations/models/clone/clone.sql", @@ -7391,7 +7108,7 @@ }, "macro.dbt.materialization_incremental_default": { "arguments": [], - "created_at": 1733768711.991256, + "created_at": 1719485736.4306219, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7417,7 +7134,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% set contract_config = config.get('contract') %}\n {% if not contract_config or not contract_config.enforced %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {% endif %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", + "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "meta": {}, "name": "materialization_incremental_default", "original_file_path": "macros/materializations/models/incremental/incremental.sql", @@ -7432,7 +7149,7 @@ }, "macro.dbt.materialization_materialized_view_default": { "arguments": [], - "created_at": 1733768711.960275, + "created_at": 1719485736.383056, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7465,7 +7182,7 @@ }, "macro.dbt.materialization_seed_default": { "arguments": [], - "created_at": 1733768712.036364, + "created_at": 1719485736.4520829, "depends_on": { "macros": [ "macro.dbt.should_full_refresh", @@ -7486,7 +7203,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", + "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "meta": {}, "name": "materialization_seed_default", "original_file_path": "macros/materializations/seeds/seed.sql", @@ -7501,7 +7218,7 @@ }, "macro.dbt.materialization_snapshot_default": { "arguments": [], - "created_at": 1733768711.948396, + "created_at": 1719485736.3679821, "depends_on": { "macros": [ "macro.dbt.get_or_create_relation", @@ -7509,12 +7226,9 @@ "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", - "macro.dbt.get_snapshot_table_column_names", - "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", - "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", @@ -7528,7 +7242,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% materialization snapshot, default %}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n {# It was a dictionary of config, instead of the config object from the context #}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set build_or_select_sql = build_sql %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {{ adapter.valid_snapshot_target(target_relation, columns) }}\n\n {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set 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\n {{ check_time_data_types(build_or_select_sql) }}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", + "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "meta": {}, "name": "materialization_snapshot_default", "original_file_path": "macros/materializations/snapshots/snapshot.sql", @@ -7543,7 +7257,7 @@ }, "macro.dbt.materialization_table_default": { "arguments": [], - "created_at": 1733768711.968425, + "created_at": 1719485736.3933172, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7579,7 +7293,7 @@ }, "macro.dbt.materialization_test_default": { "arguments": [], - "created_at": 1733768711.950998, + "created_at": 1719485736.370986, "depends_on": { "macros": [ "macro.dbt.should_store_failures", @@ -7608,7 +7322,7 @@ }, "macro.dbt.materialization_unit_default": { "arguments": [], - "created_at": 1733768711.9555762, + "created_at": 1719485736.3763871, "depends_on": { "macros": [ "macro.dbt.get_columns_in_query", @@ -7641,7 +7355,7 @@ }, "macro.dbt.materialization_view_default": { "arguments": [], - "created_at": 1733768711.9657469, + "created_at": 1719485736.390083, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7676,7 +7390,7 @@ }, "macro.dbt.materialized_view_execute_build_sql": { "arguments": [], - "created_at": 1733768711.962951, + "created_at": 1719485736.386875, "depends_on": { "macros": [ "macro.dbt.run_hooks", @@ -7704,7 +7418,7 @@ }, "macro.dbt.materialized_view_execute_no_op": { "arguments": [], - "created_at": 1733768711.962357, + "created_at": 1719485736.385866, "depends_on": { "macros": [] }, @@ -7726,7 +7440,7 @@ }, "macro.dbt.materialized_view_get_build_sql": { "arguments": [], - "created_at": 1733768711.962139, + "created_at": 1719485736.385609, "depends_on": { "macros": [ "macro.dbt.should_full_refresh", @@ -7742,7 +7456,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", + "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "meta": {}, "name": "materialized_view_get_build_sql", "original_file_path": "macros/materializations/models/materialized_view.sql", @@ -7755,7 +7469,7 @@ }, "macro.dbt.materialized_view_setup": { "arguments": [], - "created_at": 1733768711.960649, + "created_at": 1719485736.3838332, "depends_on": { "macros": [ "macro.dbt.load_cached_relation", @@ -7781,7 +7495,7 @@ }, "macro.dbt.materialized_view_teardown": { "arguments": [], - "created_at": 1733768711.960883, + "created_at": 1719485736.384107, "depends_on": { "macros": [ "macro.dbt.drop_relation_if_exists", @@ -7806,7 +7520,7 @@ }, "macro.dbt.noop_statement": { "arguments": [], - "created_at": 1733768712.078182, + "created_at": 1719485736.5199249, "depends_on": { "macros": [] }, @@ -7828,7 +7542,7 @@ }, "macro.dbt.partition_range": { "arguments": [], - "created_at": 1733768712.0820658, + "created_at": 1719485736.5252612, "depends_on": { "macros": [ "macro.dbt.dates_in_range" @@ -7852,7 +7566,7 @@ }, "macro.dbt.persist_docs": { "arguments": [], - "created_at": 1733768712.1206532, + "created_at": 1719485736.585922, "depends_on": { "macros": [ "macro.dbt.default__persist_docs" @@ -7876,7 +7590,7 @@ }, "macro.dbt.position": { "arguments": [], - "created_at": 1733768712.093984, + "created_at": 1719485736.543356, "depends_on": { "macros": [ "macro.dbt.default__position" @@ -7900,7 +7614,7 @@ }, "macro.dbt.post_snapshot": { "arguments": [], - "created_at": 1733768711.9389849, + "created_at": 1719485736.355165, "depends_on": { "macros": [ "macro.dbt.default__post_snapshot" @@ -7924,7 +7638,7 @@ }, "macro.dbt.process_schema_changes": { "arguments": [], - "created_at": 1733768712.000155, + "created_at": 1719485736.44261, "depends_on": { "macros": [ "macro.dbt.check_for_schema_changes", @@ -7949,7 +7663,7 @@ }, "macro.dbt.py_current_timestring": { "arguments": [], - "created_at": 1733768712.082279, + "created_at": 1719485736.5255191, "depends_on": { "macros": [] }, @@ -7971,7 +7685,7 @@ }, "macro.dbt.py_script_comment": { "arguments": [], - "created_at": 1733768712.1440609, + "created_at": 1719485736.6181471, "depends_on": { "macros": [] }, @@ -7993,7 +7707,7 @@ }, "macro.dbt.py_script_postfix": { "arguments": [], - "created_at": 1733768712.143991, + "created_at": 1719485736.618067, "depends_on": { "macros": [ "macro.dbt.build_ref_function", @@ -8022,7 +7736,7 @@ }, "macro.dbt.refresh_materialized_view": { "arguments": [], - "created_at": 1733768712.060362, + "created_at": 1719485736.489407, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__refresh_materialized_view" @@ -8046,7 +7760,7 @@ }, "macro.dbt.rename_relation": { "arguments": [], - "created_at": 1733768712.056898, + "created_at": 1719485736.478327, "depends_on": { "macros": [ "macro.dbt.default__rename_relation" @@ -8070,7 +7784,7 @@ }, "macro.dbt.replace": { "arguments": [], - "created_at": 1733768712.0852401, + "created_at": 1719485736.532748, "depends_on": { "macros": [ "macro.dbt.default__replace" @@ -8094,7 +7808,7 @@ }, "macro.dbt.reset_csv_table": { "arguments": [], - "created_at": 1733768712.044626, + "created_at": 1719485736.460277, "depends_on": { "macros": [ "macro.dbt.default__reset_csv_table" @@ -8118,7 +7832,7 @@ }, "macro.dbt.resolve_model_name": { "arguments": [], - "created_at": 1733768712.141689, + "created_at": 1719485736.614536, "depends_on": { "macros": [ "macro.dbt.default__resolve_model_name" @@ -8142,7 +7856,7 @@ }, "macro.dbt.right": { "arguments": [], - "created_at": 1733768712.089935, + "created_at": 1719485736.538353, "depends_on": { "macros": [ "macro.dbt.default__right" @@ -8166,7 +7880,7 @@ }, "macro.dbt.run_hooks": { "arguments": [], - "created_at": 1733768711.9217432, + "created_at": 1719485736.336357, "depends_on": { "macros": [ "macro.dbt.statement" @@ -8190,7 +7904,7 @@ }, "macro.dbt.run_query": { "arguments": [], - "created_at": 1733768712.078449, + "created_at": 1719485736.5202482, "depends_on": { "macros": [ "macro.dbt.statement" @@ -8214,7 +7928,7 @@ }, "macro.dbt.safe_cast": { "arguments": [], - "created_at": 1733768712.091973, + "created_at": 1719485736.540742, "depends_on": { "macros": [ "macro.dbt.default__safe_cast" @@ -8238,7 +7952,7 @@ }, "macro.dbt.set_sql_header": { "arguments": [], - "created_at": 1733768711.923061, + "created_at": 1719485736.338798, "depends_on": { "macros": [] }, @@ -8260,7 +7974,7 @@ }, "macro.dbt.should_full_refresh": { "arguments": [], - "created_at": 1733768711.9233458, + "created_at": 1719485736.339242, "depends_on": { "macros": [] }, @@ -8282,7 +7996,7 @@ }, "macro.dbt.should_revoke": { "arguments": [], - "created_at": 1733768712.114482, + "created_at": 1719485736.573465, "depends_on": { "macros": [ "macro.dbt.copy_grants" @@ -8306,7 +8020,7 @@ }, "macro.dbt.should_store_failures": { "arguments": [], - "created_at": 1733768711.923622, + "created_at": 1719485736.339565, "depends_on": { "macros": [] }, @@ -8328,7 +8042,7 @@ }, "macro.dbt.snapshot_check_all_get_existing_columns": { "arguments": [], - "created_at": 1733768711.930589, + "created_at": 1719485736.3482602, "depends_on": { "macros": [ "macro.dbt.get_columns_in_query" @@ -8352,7 +8066,7 @@ }, "macro.dbt.snapshot_check_strategy": { "arguments": [], - "created_at": 1733768711.931838, + "created_at": 1719485736.3500328, "depends_on": { "macros": [ "macro.dbt.snapshot_get_time", @@ -8366,7 +8080,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set check_cols_config = config.get('check_cols') %}\n {% set primary_key = config.get('unique_key') %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes') or false %}\n {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_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 %}", + "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "meta": {}, "name": "snapshot_check_strategy", "original_file_path": "macros/materializations/snapshots/strategies.sql", @@ -8379,7 +8093,7 @@ }, "macro.dbt.snapshot_get_time": { "arguments": [], - "created_at": 1733768712.1028302, + "created_at": 1719485736.55953, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__snapshot_get_time" @@ -8403,7 +8117,7 @@ }, "macro.dbt.snapshot_hash_arguments": { "arguments": [], - "created_at": 1733768711.9279811, + "created_at": 1719485736.3454158, "depends_on": { "macros": [ "macro.dbt.default__snapshot_hash_arguments" @@ -8427,7 +8141,7 @@ }, "macro.dbt.snapshot_merge_sql": { "arguments": [], - "created_at": 1733768711.924176, + "created_at": 1719485736.3400362, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__snapshot_merge_sql" @@ -8451,7 +8165,7 @@ }, "macro.dbt.snapshot_staging_table": { "arguments": [], - "created_at": 1733768711.93952, + "created_at": 1719485736.355765, "depends_on": { "macros": [ "macro.dbt.default__snapshot_staging_table" @@ -8475,7 +8189,7 @@ }, "macro.dbt.snapshot_string_as_time": { "arguments": [], - "created_at": 1733768711.929135, + "created_at": 1719485736.3465831, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__snapshot_string_as_time" @@ -8499,10 +8213,9 @@ }, "macro.dbt.snapshot_timestamp_strategy": { "arguments": [], - "created_at": 1733768711.9289758, + "created_at": 1719485736.346405, "depends_on": { "macros": [ - "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments" ] }, @@ -8511,7 +8224,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set primary_key = config.get('unique_key') %}\n {% set updated_at = config.get('updated_at') %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes') or false %}\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_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 %}", + "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 %}", "meta": {}, "name": "snapshot_timestamp_strategy", "original_file_path": "macros/materializations/snapshots/strategies.sql", @@ -8524,7 +8237,7 @@ }, "macro.dbt.split_part": { "arguments": [], - "created_at": 1733768712.099272, + "created_at": 1719485736.55408, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__split_part" @@ -8548,7 +8261,7 @@ }, "macro.dbt.sql_convert_columns_in_relation": { "arguments": [], - "created_at": 1733768712.130684, + "created_at": 1719485736.59661, "depends_on": { "macros": [] }, @@ -8570,7 +8283,7 @@ }, "macro.dbt.statement": { "arguments": [], - "created_at": 1733768712.077638, + "created_at": 1719485736.51912, "depends_on": { "macros": [] }, @@ -8592,7 +8305,7 @@ }, "macro.dbt.strategy_dispatch": { "arguments": [], - "created_at": 1733768711.92782, + "created_at": 1719485736.345131, "depends_on": { "macros": [] }, @@ -8614,7 +8327,7 @@ }, "macro.dbt.string_literal": { "arguments": [], - "created_at": 1733768712.094341, + "created_at": 1719485736.543961, "depends_on": { "macros": [ "macro.dbt.default__string_literal" @@ -8638,7 +8351,7 @@ }, "macro.dbt.support_multiple_grantees_per_dcl_statement": { "arguments": [], - "created_at": 1733768712.114064, + "created_at": 1719485736.572978, "depends_on": { "macros": [ "macro.dbt.default__support_multiple_grantees_per_dcl_statement" @@ -8662,7 +8375,7 @@ }, "macro.dbt.sync_column_schemas": { "arguments": [], - "created_at": 1733768711.9993448, + "created_at": 1719485736.4416761, "depends_on": { "macros": [ "macro.dbt.alter_relation_add_remove_columns", @@ -8687,7 +8400,7 @@ }, "macro.dbt.table_columns_and_constraints": { "arguments": [], - "created_at": 1733768712.0642922, + "created_at": 1719485736.500673, "depends_on": { "macros": [] }, @@ -8709,7 +8422,7 @@ }, "macro.dbt.test_accepted_values": { "arguments": [], - "created_at": 1733768712.145065, + "created_at": 1719485736.6202009, "depends_on": { "macros": [ "macro.dbt.default__test_accepted_values" @@ -8733,7 +8446,7 @@ }, "macro.dbt.test_not_null": { "arguments": [], - "created_at": 1733768712.144783, + "created_at": 1719485736.619859, "depends_on": { "macros": [ "macro.dbt.default__test_not_null" @@ -8757,7 +8470,7 @@ }, "macro.dbt.test_relationships": { "arguments": [], - "created_at": 1733768712.1453419, + "created_at": 1719485736.620512, "depends_on": { "macros": [ "macro.dbt.default__test_relationships" @@ -8781,7 +8494,7 @@ }, "macro.dbt.test_unique": { "arguments": [], - "created_at": 1733768712.144553, + "created_at": 1719485736.619491, "depends_on": { "macros": [ "macro.dbt.default__test_unique" @@ -8805,7 +8518,7 @@ }, "macro.dbt.truncate_relation": { "arguments": [], - "created_at": 1733768712.109659, + "created_at": 1719485736.567298, "depends_on": { "macros": [ "macro.dbt.default__truncate_relation" @@ -8829,7 +8542,7 @@ }, "macro.dbt.type_bigint": { "arguments": [], - "created_at": 1733768712.096499, + "created_at": 1719485736.548424, "depends_on": { "macros": [ "macro.dbt.default__type_bigint" @@ -8853,7 +8566,7 @@ }, "macro.dbt.type_boolean": { "arguments": [], - "created_at": 1733768712.097076, + "created_at": 1719485736.55002, "depends_on": { "macros": [ "macro.dbt.default__type_boolean" @@ -8877,7 +8590,7 @@ }, "macro.dbt.type_float": { "arguments": [], - "created_at": 1733768712.095885, + "created_at": 1719485736.547037, "depends_on": { "macros": [ "macro.dbt.default__type_float" @@ -8901,7 +8614,7 @@ }, "macro.dbt.type_int": { "arguments": [], - "created_at": 1733768712.096789, + "created_at": 1719485736.54878, "depends_on": { "macros": [ "macro.dbt.default__type_int" @@ -8925,7 +8638,7 @@ }, "macro.dbt.type_numeric": { "arguments": [], - "created_at": 1733768712.0961752, + "created_at": 1719485736.547442, "depends_on": { "macros": [ "macro.dbt.default__type_numeric" @@ -8949,7 +8662,7 @@ }, "macro.dbt.type_string": { "arguments": [], - "created_at": 1733768712.095295, + "created_at": 1719485736.545998, "depends_on": { "macros": [ "macro.dbt.default__type_string" @@ -8973,7 +8686,7 @@ }, "macro.dbt.type_timestamp": { "arguments": [], - "created_at": 1733768712.095593, + "created_at": 1719485736.546634, "depends_on": { "macros": [ "macro.dbt.default__type_timestamp" @@ -8995,33 +8708,9 @@ "supported_languages": null, "unique_id": "macro.dbt.type_timestamp" }, - "macro.dbt.validate_fixture_rows": { - "arguments": [], - "created_at": 1733768712.1400268, - "depends_on": { - "macros": [ - "macro.dbt.default__validate_fixture_rows" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", - "meta": {}, - "name": "validate_fixture_rows", - "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", - "package_name": "dbt", - "patch_path": null, - "path": "macros/unit_test_sql/get_fixture_sql.sql", - "resource_type": "macro", - "supported_languages": null, - "unique_id": "macro.dbt.validate_fixture_rows" - }, "macro.dbt.validate_sql": { "arguments": [], - "created_at": 1733768712.1119502, + "created_at": 1719485736.5702772, "depends_on": { "macros": [ "macro.dbt.default__validate_sql" @@ -9045,7 +8734,7 @@ }, "macro.dbt_postgres.postgres__alter_column_comment": { "arguments": [], - "created_at": 1733768711.9090261, + "created_at": 1719485736.314291, "depends_on": { "macros": [ "macro.dbt_postgres.postgres_escape_comment" @@ -9069,7 +8758,7 @@ }, "macro.dbt_postgres.postgres__alter_relation_comment": { "arguments": [], - "created_at": 1733768711.9084852, + "created_at": 1719485736.312385, "depends_on": { "macros": [ "macro.dbt_postgres.postgres_escape_comment" @@ -9093,7 +8782,7 @@ }, "macro.dbt_postgres.postgres__any_value": { "arguments": [], - "created_at": 1733768711.9198349, + "created_at": 1719485736.332639, "depends_on": { "macros": [] }, @@ -9115,7 +8804,7 @@ }, "macro.dbt_postgres.postgres__check_schema_exists": { "arguments": [], - "created_at": 1733768711.906323, + "created_at": 1719485736.309761, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9139,7 +8828,7 @@ }, "macro.dbt_postgres.postgres__copy_grants": { "arguments": [], - "created_at": 1733768711.909328, + "created_at": 1719485736.3146439, "depends_on": { "macros": [] }, @@ -9161,7 +8850,7 @@ }, "macro.dbt_postgres.postgres__create_schema": { "arguments": [], - "created_at": 1733768711.9043221, + "created_at": 1719485736.306344, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9185,7 +8874,7 @@ }, "macro.dbt_postgres.postgres__create_table_as": { "arguments": [], - "created_at": 1733768711.903402, + "created_at": 1719485736.3053398, "depends_on": { "macros": [ "macro.dbt.get_assert_columns_equivalent", @@ -9212,7 +8901,7 @@ }, "macro.dbt_postgres.postgres__current_timestamp": { "arguments": [], - "created_at": 1733768711.8904068, + "created_at": 1719485736.2888992, "depends_on": { "macros": [] }, @@ -9234,7 +8923,7 @@ }, "macro.dbt_postgres.postgres__current_timestamp_backcompat": { "arguments": [], - "created_at": 1733768711.890817, + "created_at": 1719485736.289357, "depends_on": { "macros": [ "macro.dbt.type_timestamp" @@ -9258,7 +8947,7 @@ }, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": { "arguments": [], - "created_at": 1733768711.890965, + "created_at": 1719485736.289477, "depends_on": { "macros": [ "macro.dbt.type_timestamp" @@ -9282,7 +8971,7 @@ }, "macro.dbt_postgres.postgres__dateadd": { "arguments": [], - "created_at": 1733768711.9158762, + "created_at": 1719485736.328303, "depends_on": { "macros": [] }, @@ -9304,7 +8993,7 @@ }, "macro.dbt_postgres.postgres__datediff": { "arguments": [], - "created_at": 1733768711.919659, + "created_at": 1719485736.332466, "depends_on": { "macros": [ "macro.dbt.datediff" @@ -9328,7 +9017,7 @@ }, "macro.dbt_postgres.postgres__describe_materialized_view": { "arguments": [], - "created_at": 1733768711.9112089, + "created_at": 1719485736.320213, "depends_on": { "macros": [ "macro.dbt.run_query", @@ -9353,7 +9042,7 @@ }, "macro.dbt_postgres.postgres__drop_materialized_view": { "arguments": [], - "created_at": 1733768711.910935, + "created_at": 1719485736.319324, "depends_on": { "macros": [] }, @@ -9375,7 +9064,7 @@ }, "macro.dbt_postgres.postgres__drop_schema": { "arguments": [], - "created_at": 1733768711.904623, + "created_at": 1719485736.307206, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9399,7 +9088,7 @@ }, "macro.dbt_postgres.postgres__drop_table": { "arguments": [], - "created_at": 1733768711.9140658, + "created_at": 1719485736.3256729, "depends_on": { "macros": [] }, @@ -9421,7 +9110,7 @@ }, "macro.dbt_postgres.postgres__drop_view": { "arguments": [], - "created_at": 1733768711.9150012, + "created_at": 1719485736.327039, "depends_on": { "macros": [] }, @@ -9443,7 +9132,7 @@ }, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768711.9124951, + "created_at": 1719485736.3214989, "depends_on": { "macros": [ "macro.dbt.get_replace_sql", @@ -9468,7 +9157,7 @@ }, "macro.dbt_postgres.postgres__get_catalog": { "arguments": [], - "created_at": 1733768711.892891, + "created_at": 1719485736.292309, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_catalog_relations" @@ -9492,7 +9181,7 @@ }, "macro.dbt_postgres.postgres__get_catalog_relations": { "arguments": [], - "created_at": 1733768711.892511, + "created_at": 1719485736.2918808, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9516,7 +9205,7 @@ }, "macro.dbt_postgres.postgres__get_columns_in_relation": { "arguments": [], - "created_at": 1733768711.905069, + "created_at": 1719485736.308002, "depends_on": { "macros": [ "macro.dbt.statement", @@ -9541,7 +9230,7 @@ }, "macro.dbt_postgres.postgres__get_create_index_sql": { "arguments": [], - "created_at": 1733768711.904011, + "created_at": 1719485736.30595, "depends_on": { "macros": [] }, @@ -9563,7 +9252,7 @@ }, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": { "arguments": [], - "created_at": 1733768711.913934, + "created_at": 1719485736.3255181, "depends_on": { "macros": [ "macro.dbt.get_create_index_sql" @@ -9574,7 +9263,7 @@ "node_color": null, "show": true }, - "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n {%- endfor -%}\n\n{% endmacro %}", + "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}\n {%- endfor -%}\n\n{% endmacro %}", "meta": {}, "name": "postgres__get_create_materialized_view_as_sql", "original_file_path": "macros/relations/materialized_view/create.sql", @@ -9587,7 +9276,7 @@ }, "macro.dbt_postgres.postgres__get_drop_index_sql": { "arguments": [], - "created_at": 1733768711.909704, + "created_at": 1719485736.3150148, "depends_on": { "macros": [] }, @@ -9609,7 +9298,7 @@ }, "macro.dbt_postgres.postgres__get_incremental_default_sql": { "arguments": [], - "created_at": 1733768711.910105, + "created_at": 1719485736.316301, "depends_on": { "macros": [ "macro.dbt.get_incremental_delete_insert_sql", @@ -9634,7 +9323,7 @@ }, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": { "arguments": [], - "created_at": 1733768711.913514, + "created_at": 1719485736.324945, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__describe_materialized_view" @@ -9658,7 +9347,7 @@ }, "macro.dbt_postgres.postgres__get_relations": { "arguments": [], - "created_at": 1733768711.8935528, + "created_at": 1719485736.293338, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9682,7 +9371,7 @@ }, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": { "arguments": [], - "created_at": 1733768711.911511, + "created_at": 1719485736.3205602, "depends_on": { "macros": [] }, @@ -9704,7 +9393,7 @@ }, "macro.dbt_postgres.postgres__get_rename_table_sql": { "arguments": [], - "created_at": 1733768711.9148731, + "created_at": 1719485736.326884, "depends_on": { "macros": [] }, @@ -9726,7 +9415,7 @@ }, "macro.dbt_postgres.postgres__get_rename_view_sql": { "arguments": [], - "created_at": 1733768711.9156768, + "created_at": 1719485736.32807, "depends_on": { "macros": [] }, @@ -9748,7 +9437,7 @@ }, "macro.dbt_postgres.postgres__get_replace_table_sql": { "arguments": [], - "created_at": 1733768711.914708, + "created_at": 1719485736.326431, "depends_on": { "macros": [ "macro.dbt.get_assert_columns_equivalent", @@ -9774,7 +9463,7 @@ }, "macro.dbt_postgres.postgres__get_replace_view_sql": { "arguments": [], - "created_at": 1733768711.915513, + "created_at": 1719485736.327884, "depends_on": { "macros": [ "macro.dbt.get_assert_columns_equivalent" @@ -9798,7 +9487,7 @@ }, "macro.dbt_postgres.postgres__get_show_grant_sql": { "arguments": [], - "created_at": 1733768711.9092171, + "created_at": 1719485736.314513, "depends_on": { "macros": [] }, @@ -9820,7 +9509,7 @@ }, "macro.dbt_postgres.postgres__get_show_indexes_sql": { "arguments": [], - "created_at": 1733768711.909507, + "created_at": 1719485736.31486, "depends_on": { "macros": [] }, @@ -9842,7 +9531,7 @@ }, "macro.dbt_postgres.postgres__information_schema_name": { "arguments": [], - "created_at": 1733768711.905647, + "created_at": 1719485736.308933, "depends_on": { "macros": [] }, @@ -9864,7 +9553,7 @@ }, "macro.dbt_postgres.postgres__last_day": { "arguments": [], - "created_at": 1733768711.9203148, + "created_at": 1719485736.333154, "depends_on": { "macros": [ "macro.dbt.dateadd", @@ -9890,7 +9579,7 @@ }, "macro.dbt_postgres.postgres__list_relations_without_caching": { "arguments": [], - "created_at": 1733768711.905483, + "created_at": 1719485736.308728, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9914,7 +9603,7 @@ }, "macro.dbt_postgres.postgres__list_schemas": { "arguments": [], - "created_at": 1733768711.9059682, + "created_at": 1719485736.309331, "depends_on": { "macros": [ "macro.dbt.statement" @@ -9938,7 +9627,7 @@ }, "macro.dbt_postgres.postgres__listagg": { "arguments": [], - "created_at": 1733768711.916457, + "created_at": 1719485736.329083, "depends_on": { "macros": [] }, @@ -9960,7 +9649,7 @@ }, "macro.dbt_postgres.postgres__make_backup_relation": { "arguments": [], - "created_at": 1733768711.9078882, + "created_at": 1719485736.311583, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_relation_with_suffix" @@ -9984,7 +9673,7 @@ }, "macro.dbt_postgres.postgres__make_intermediate_relation": { "arguments": [], - "created_at": 1733768711.907339, + "created_at": 1719485736.3109372, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_relation_with_suffix" @@ -10008,7 +9697,7 @@ }, "macro.dbt_postgres.postgres__make_relation_with_suffix": { "arguments": [], - "created_at": 1733768711.90715, + "created_at": 1719485736.31072, "depends_on": { "macros": [] }, @@ -10030,7 +9719,7 @@ }, "macro.dbt_postgres.postgres__make_temp_relation": { "arguments": [], - "created_at": 1733768711.907634, + "created_at": 1719485736.31129, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__make_relation_with_suffix" @@ -10054,7 +9743,7 @@ }, "macro.dbt_postgres.postgres__refresh_materialized_view": { "arguments": [], - "created_at": 1733768711.911341, + "created_at": 1719485736.32038, "depends_on": { "macros": [] }, @@ -10076,7 +9765,7 @@ }, "macro.dbt_postgres.postgres__snapshot_get_time": { "arguments": [], - "created_at": 1733768711.89071, + "created_at": 1719485736.289238, "depends_on": { "macros": [ "macro.dbt.current_timestamp" @@ -10100,7 +9789,7 @@ }, "macro.dbt_postgres.postgres__snapshot_merge_sql": { "arguments": [], - "created_at": 1733768711.910793, + "created_at": 1719485736.318985, "depends_on": { "macros": [] }, @@ -10122,7 +9811,7 @@ }, "macro.dbt_postgres.postgres__snapshot_string_as_time": { "arguments": [], - "created_at": 1733768711.890605, + "created_at": 1719485736.289119, "depends_on": { "macros": [] }, @@ -10144,7 +9833,7 @@ }, "macro.dbt_postgres.postgres__split_part": { "arguments": [], - "created_at": 1733768711.920707, + "created_at": 1719485736.334007, "depends_on": { "macros": [ "macro.dbt.default__split_part", @@ -10169,7 +9858,7 @@ }, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": { "arguments": [], - "created_at": 1733768711.913155, + "created_at": 1719485736.3239639, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_drop_index_sql", @@ -10181,7 +9870,7 @@ "node_color": null, "show": true }, - "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", + "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }};\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "meta": {}, "name": "postgres__update_indexes_on_materialized_view", "original_file_path": "macros/relations/materialized_view/alter.sql", @@ -10194,7 +9883,7 @@ }, "macro.dbt_postgres.postgres_escape_comment": { "arguments": [], - "created_at": 1733768711.908277, + "created_at": 1719485736.3121421, "depends_on": { "macros": [] }, @@ -10216,7 +9905,7 @@ }, "macro.dbt_postgres.postgres_get_relations": { "arguments": [], - "created_at": 1733768711.893682, + "created_at": 1719485736.2934961, "depends_on": { "macros": [ "macro.dbt_postgres.postgres__get_relations" @@ -10240,7 +9929,7 @@ }, "macro.dbt_utils._bigquery__get_matching_schemata": { "arguments": [], - "created_at": 1733768712.202956, + "created_at": 1719485736.7140338, "depends_on": { "macros": [ "macro.dbt.run_query" @@ -10264,7 +9953,7 @@ }, "macro.dbt_utils._is_ephemeral": { "arguments": [], - "created_at": 1733768712.174357, + "created_at": 1719485736.667329, "depends_on": { "macros": [] }, @@ -10286,7 +9975,7 @@ }, "macro.dbt_utils._is_relation": { "arguments": [], - "created_at": 1733768712.172193, + "created_at": 1719485736.6636631, "depends_on": { "macros": [] }, @@ -10308,7 +9997,7 @@ }, "macro.dbt_utils.bigquery__deduplicate": { "arguments": [], - "created_at": 1733768712.197666, + "created_at": 1719485736.703784, "depends_on": { "macros": [] }, @@ -10330,7 +10019,7 @@ }, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": { "arguments": [], - "created_at": 1733768712.202496, + "created_at": 1719485736.713356, "depends_on": { "macros": [ "macro.dbt_utils._bigquery__get_matching_schemata", @@ -10355,7 +10044,7 @@ }, "macro.dbt_utils.bigquery__haversine_distance": { "arguments": [], - "created_at": 1733768712.216371, + "created_at": 1719485736.73806, "depends_on": { "macros": [ "macro.dbt_utils.degrees_to_radians" @@ -10379,7 +10068,7 @@ }, "macro.dbt_utils.databricks__get_table_types_sql": { "arguments": [], - "created_at": 1733768712.212539, + "created_at": 1719485736.73151, "depends_on": { "macros": [] }, @@ -10401,7 +10090,7 @@ }, "macro.dbt_utils.date_spine": { "arguments": [], - "created_at": 1733768712.17577, + "created_at": 1719485736.669255, "depends_on": { "macros": [ "macro.dbt_utils.default__date_spine" @@ -10425,7 +10114,7 @@ }, "macro.dbt_utils.deduplicate": { "arguments": [], - "created_at": 1733768712.1967769, + "created_at": 1719485736.7012029, "depends_on": { "macros": [ "macro.dbt_utils.postgres__deduplicate" @@ -10449,7 +10138,7 @@ }, "macro.dbt_utils.default__date_spine": { "arguments": [], - "created_at": 1733768712.1761112, + "created_at": 1719485736.669651, "depends_on": { "macros": [ "macro.dbt_utils.generate_series", @@ -10475,7 +10164,7 @@ }, "macro.dbt_utils.default__deduplicate": { "arguments": [], - "created_at": 1733768712.196984, + "created_at": 1719485736.701886, "depends_on": { "macros": [] }, @@ -10497,7 +10186,7 @@ }, "macro.dbt_utils.default__generate_series": { "arguments": [], - "created_at": 1733768712.1810062, + "created_at": 1719485736.678598, "depends_on": { "macros": [ "macro.dbt_utils.get_powers_of_two" @@ -10521,7 +10210,7 @@ }, "macro.dbt_utils.default__generate_surrogate_key": { "arguments": [], - "created_at": 1733768712.2115998, + "created_at": 1719485736.730099, "depends_on": { "macros": [ "macro.dbt.type_string", @@ -10547,7 +10236,7 @@ }, "macro.dbt_utils.default__get_column_values": { "arguments": [], - "created_at": 1733768712.205406, + "created_at": 1719485736.717495, "depends_on": { "macros": [ "macro.dbt_utils._is_ephemeral", @@ -10573,7 +10262,7 @@ }, "macro.dbt_utils.default__get_filtered_columns_in_relation": { "arguments": [], - "created_at": 1733768712.208271, + "created_at": 1719485736.722564, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -10598,7 +10287,7 @@ }, "macro.dbt_utils.default__get_intervals_between": { "arguments": [], - "created_at": 1733768712.1755588, + "created_at": 1719485736.668746, "depends_on": { "macros": [ "macro.dbt.statement", @@ -10623,7 +10312,7 @@ }, "macro.dbt_utils.default__get_powers_of_two": { "arguments": [], - "created_at": 1733768712.1803598, + "created_at": 1719485736.677862, "depends_on": { "macros": [] }, @@ -10645,7 +10334,7 @@ }, "macro.dbt_utils.default__get_query_results_as_dict": { "arguments": [], - "created_at": 1733768712.210588, + "created_at": 1719485736.727696, "depends_on": { "macros": [ "macro.dbt.statement" @@ -10669,7 +10358,7 @@ }, "macro.dbt_utils.default__get_relations_by_pattern": { "arguments": [], - "created_at": 1733768712.179136, + "created_at": 1719485736.674046, "depends_on": { "macros": [ "macro.dbt.statement", @@ -10694,7 +10383,7 @@ }, "macro.dbt_utils.default__get_relations_by_prefix": { "arguments": [], - "created_at": 1733768712.182445, + "created_at": 1719485736.680293, "depends_on": { "macros": [ "macro.dbt.statement", @@ -10719,7 +10408,7 @@ }, "macro.dbt_utils.default__get_single_value": { "arguments": [], - "created_at": 1733768712.2137752, + "created_at": 1719485736.7332969, "depends_on": { "macros": [ "macro.dbt.statement" @@ -10743,7 +10432,7 @@ }, "macro.dbt_utils.default__get_table_types_sql": { "arguments": [], - "created_at": 1733768712.212277, + "created_at": 1719485736.73105, "depends_on": { "macros": [] }, @@ -10765,7 +10454,7 @@ }, "macro.dbt_utils.default__get_tables_by_pattern_sql": { "arguments": [], - "created_at": 1733768712.201783, + "created_at": 1719485736.7122319, "depends_on": { "macros": [ "macro.dbt_utils.get_table_types_sql" @@ -10789,7 +10478,7 @@ }, "macro.dbt_utils.default__get_tables_by_prefix_sql": { "arguments": [], - "created_at": 1733768712.1830761, + "created_at": 1719485736.681414, "depends_on": { "macros": [ "macro.dbt_utils.get_tables_by_pattern_sql" @@ -10813,7 +10502,7 @@ }, "macro.dbt_utils.default__get_url_host": { "arguments": [], - "created_at": 1733768712.146198, + "created_at": 1719485736.621399, "depends_on": { "macros": [ "macro.dbt.split_part", @@ -10840,7 +10529,7 @@ }, "macro.dbt_utils.default__get_url_parameter": { "arguments": [], - "created_at": 1733768712.1479151, + "created_at": 1719485736.624197, "depends_on": { "macros": [ "macro.dbt.split_part" @@ -10864,7 +10553,7 @@ }, "macro.dbt_utils.default__get_url_path": { "arguments": [], - "created_at": 1733768712.147267, + "created_at": 1719485736.6228778, "depends_on": { "macros": [ "macro.dbt.replace", @@ -10894,7 +10583,7 @@ }, "macro.dbt_utils.default__group_by": { "arguments": [], - "created_at": 1733768712.19604, + "created_at": 1719485736.700402, "depends_on": { "macros": [] }, @@ -10916,7 +10605,7 @@ }, "macro.dbt_utils.default__haversine_distance": { "arguments": [], - "created_at": 1733768712.215644, + "created_at": 1719485736.736367, "depends_on": { "macros": [] }, @@ -10938,7 +10627,7 @@ }, "macro.dbt_utils.default__log_info": { "arguments": [], - "created_at": 1733768712.17303, + "created_at": 1719485736.665316, "depends_on": { "macros": [ "macro.dbt_utils.pretty_log_format" @@ -10962,7 +10651,7 @@ }, "macro.dbt_utils.default__nullcheck": { "arguments": [], - "created_at": 1733768712.199714, + "created_at": 1719485736.7089212, "depends_on": { "macros": [] }, @@ -10984,7 +10673,7 @@ }, "macro.dbt_utils.default__nullcheck_table": { "arguments": [], - "created_at": 1733768712.1775832, + "created_at": 1719485736.6715178, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -11010,7 +10699,7 @@ }, "macro.dbt_utils.default__pivot": { "arguments": [], - "created_at": 1733768712.2071738, + "created_at": 1719485736.720366, "depends_on": { "macros": [ "macro.dbt.escape_single_quotes", @@ -11035,7 +10724,7 @@ }, "macro.dbt_utils.default__pretty_log_format": { "arguments": [], - "created_at": 1733768712.1717901, + "created_at": 1719485736.66297, "depends_on": { "macros": [ "macro.dbt_utils.pretty_time" @@ -11059,7 +10748,7 @@ }, "macro.dbt_utils.default__pretty_time": { "arguments": [], - "created_at": 1733768712.172632, + "created_at": 1719485736.66434, "depends_on": { "macros": [] }, @@ -11081,7 +10770,7 @@ }, "macro.dbt_utils.default__safe_add": { "arguments": [], - "created_at": 1733768712.1990988, + "created_at": 1719485736.707396, "depends_on": { "macros": [] }, @@ -11103,7 +10792,7 @@ }, "macro.dbt_utils.default__safe_divide": { "arguments": [], - "created_at": 1733768712.189014, + "created_at": 1719485736.689852, "depends_on": { "macros": [] }, @@ -11125,7 +10814,7 @@ }, "macro.dbt_utils.default__safe_subtract": { "arguments": [], - "created_at": 1733768712.176975, + "created_at": 1719485736.670645, "depends_on": { "macros": [] }, @@ -11147,7 +10836,7 @@ }, "macro.dbt_utils.default__star": { "arguments": [], - "created_at": 1733768712.185656, + "created_at": 1719485736.685639, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -11173,7 +10862,7 @@ }, "macro.dbt_utils.default__surrogate_key": { "arguments": [], - "created_at": 1733768712.198252, + "created_at": 1719485736.7051, "depends_on": { "macros": [] }, @@ -11195,7 +10884,7 @@ }, "macro.dbt_utils.default__test_accepted_range": { "arguments": [], - "created_at": 1733768712.1561139, + "created_at": 1719485736.6358259, "depends_on": { "macros": [] }, @@ -11217,7 +10906,7 @@ }, "macro.dbt_utils.default__test_at_least_one": { "arguments": [], - "created_at": 1733768712.158407, + "created_at": 1719485736.638953, "depends_on": { "macros": [] }, @@ -11239,7 +10928,7 @@ }, "macro.dbt_utils.default__test_cardinality_equality": { "arguments": [], - "created_at": 1733768712.1604521, + "created_at": 1719485736.646685, "depends_on": { "macros": [ "macro.dbt.except" @@ -11263,7 +10952,7 @@ }, "macro.dbt_utils.default__test_equal_rowcount": { "arguments": [], - "created_at": 1733768712.151708, + "created_at": 1719485736.629295, "depends_on": { "macros": [] }, @@ -11285,7 +10974,7 @@ }, "macro.dbt_utils.default__test_equality": { "arguments": [], - "created_at": 1733768712.165611, + "created_at": 1719485736.654316, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -11311,7 +11000,7 @@ }, "macro.dbt_utils.default__test_expression_is_true": { "arguments": [], - "created_at": 1733768712.161143, + "created_at": 1719485736.6476219, "depends_on": { "macros": [ "macro.dbt.should_store_failures" @@ -11335,7 +11024,7 @@ }, "macro.dbt_utils.default__test_fewer_rows_than": { "arguments": [], - "created_at": 1733768712.149914, + "created_at": 1719485736.626648, "depends_on": { "macros": [] }, @@ -11357,7 +11046,7 @@ }, "macro.dbt_utils.default__test_mutually_exclusive_ranges": { "arguments": [], - "created_at": 1733768712.171369, + "created_at": 1719485736.662267, "depends_on": { "macros": [] }, @@ -11379,7 +11068,7 @@ }, "macro.dbt_utils.default__test_not_accepted_values": { "arguments": [], - "created_at": 1733768712.157071, + "created_at": 1719485736.636965, "depends_on": { "macros": [] }, @@ -11401,7 +11090,7 @@ }, "macro.dbt_utils.default__test_not_constant": { "arguments": [], - "created_at": 1733768712.155079, + "created_at": 1719485736.634388, "depends_on": { "macros": [] }, @@ -11423,7 +11112,7 @@ }, "macro.dbt_utils.default__test_not_empty_string": { "arguments": [], - "created_at": 1733768712.166371, + "created_at": 1719485736.655891, "depends_on": { "macros": [] }, @@ -11445,7 +11134,7 @@ }, "macro.dbt_utils.default__test_not_null_proportion": { "arguments": [], - "created_at": 1733768712.162483, + "created_at": 1719485736.6493912, "depends_on": { "macros": [] }, @@ -11467,7 +11156,7 @@ }, "macro.dbt_utils.default__test_recency": { "arguments": [], - "created_at": 1733768712.154061, + "created_at": 1719485736.633423, "depends_on": { "macros": [ "macro.dbt.dateadd", @@ -11493,7 +11182,7 @@ }, "macro.dbt_utils.default__test_relationships_where": { "arguments": [], - "created_at": 1733768712.152631, + "created_at": 1719485736.630768, "depends_on": { "macros": [] }, @@ -11515,7 +11204,7 @@ }, "macro.dbt_utils.default__test_sequential_values": { "arguments": [], - "created_at": 1733768712.164138, + "created_at": 1719485736.652041, "depends_on": { "macros": [ "macro.dbt_utils.slugify", @@ -11541,7 +11230,7 @@ }, "macro.dbt_utils.default__test_unique_combination_of_columns": { "arguments": [], - "created_at": 1733768712.159636, + "created_at": 1719485736.643641, "depends_on": { "macros": [] }, @@ -11563,7 +11252,7 @@ }, "macro.dbt_utils.default__union_relations": { "arguments": [], - "created_at": 1733768712.1955168, + "created_at": 1719485736.6993861, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -11590,7 +11279,7 @@ }, "macro.dbt_utils.default__unpivot": { "arguments": [], - "created_at": 1733768712.188548, + "created_at": 1719485736.689354, "depends_on": { "macros": [ "macro.dbt_utils._is_relation", @@ -11617,7 +11306,7 @@ }, "macro.dbt_utils.default__width_bucket": { "arguments": [], - "created_at": 1733768712.209457, + "created_at": 1719485736.7257888, "depends_on": { "macros": [ "macro.dbt.safe_cast", @@ -11642,7 +11331,7 @@ }, "macro.dbt_utils.degrees_to_radians": { "arguments": [], - "created_at": 1733768712.21486, + "created_at": 1719485736.735244, "depends_on": { "macros": [] }, @@ -11664,7 +11353,7 @@ }, "macro.dbt_utils.generate_series": { "arguments": [], - "created_at": 1733768712.180539, + "created_at": 1719485736.678059, "depends_on": { "macros": [ "macro.dbt_utils.default__generate_series" @@ -11688,7 +11377,7 @@ }, "macro.dbt_utils.generate_surrogate_key": { "arguments": [], - "created_at": 1733768712.211029, + "created_at": 1719485736.7287118, "depends_on": { "macros": [ "macro.dbt_utils.default__generate_surrogate_key" @@ -11712,7 +11401,7 @@ }, "macro.dbt_utils.get_column_values": { "arguments": [], - "created_at": 1733768712.204057, + "created_at": 1719485736.7158039, "depends_on": { "macros": [ "macro.dbt_utils.default__get_column_values" @@ -11736,7 +11425,7 @@ }, "macro.dbt_utils.get_filtered_columns_in_relation": { "arguments": [], - "created_at": 1733768712.207616, + "created_at": 1719485736.7211049, "depends_on": { "macros": [ "macro.dbt_utils.default__get_filtered_columns_in_relation" @@ -11760,7 +11449,7 @@ }, "macro.dbt_utils.get_intervals_between": { "arguments": [], - "created_at": 1733768712.175016, + "created_at": 1719485736.668108, "depends_on": { "macros": [ "macro.dbt_utils.default__get_intervals_between" @@ -11784,7 +11473,7 @@ }, "macro.dbt_utils.get_powers_of_two": { "arguments": [], - "created_at": 1733768712.179986, + "created_at": 1719485736.677409, "depends_on": { "macros": [ "macro.dbt_utils.default__get_powers_of_two" @@ -11808,7 +11497,7 @@ }, "macro.dbt_utils.get_query_results_as_dict": { "arguments": [], - "created_at": 1733768712.210002, + "created_at": 1719485736.726866, "depends_on": { "macros": [ "macro.dbt_utils.default__get_query_results_as_dict" @@ -11832,7 +11521,7 @@ }, "macro.dbt_utils.get_relations_by_pattern": { "arguments": [], - "created_at": 1733768712.178231, + "created_at": 1719485736.6725519, "depends_on": { "macros": [ "macro.dbt_utils.default__get_relations_by_pattern" @@ -11856,7 +11545,7 @@ }, "macro.dbt_utils.get_relations_by_prefix": { "arguments": [], - "created_at": 1733768712.181674, + "created_at": 1719485736.67938, "depends_on": { "macros": [ "macro.dbt_utils.default__get_relations_by_prefix" @@ -11880,7 +11569,7 @@ }, "macro.dbt_utils.get_single_value": { "arguments": [], - "created_at": 1733768712.213035, + "created_at": 1719485736.732079, "depends_on": { "macros": [ "macro.dbt_utils.default__get_single_value" @@ -11904,7 +11593,7 @@ }, "macro.dbt_utils.get_table_types_sql": { "arguments": [], - "created_at": 1733768712.212138, + "created_at": 1719485736.730877, "depends_on": { "macros": [ "macro.dbt_utils.postgres__get_table_types_sql" @@ -11928,7 +11617,7 @@ }, "macro.dbt_utils.get_tables_by_pattern_sql": { "arguments": [], - "created_at": 1733768712.2014499, + "created_at": 1719485736.7118368, "depends_on": { "macros": [ "macro.dbt_utils.default__get_tables_by_pattern_sql" @@ -11952,7 +11641,7 @@ }, "macro.dbt_utils.get_tables_by_prefix_sql": { "arguments": [], - "created_at": 1733768712.182817, + "created_at": 1719485736.680733, "depends_on": { "macros": [ "macro.dbt_utils.default__get_tables_by_prefix_sql" @@ -11976,7 +11665,7 @@ }, "macro.dbt_utils.get_url_host": { "arguments": [], - "created_at": 1733768712.145681, + "created_at": 1719485736.6209002, "depends_on": { "macros": [ "macro.dbt_utils.default__get_url_host" @@ -12000,7 +11689,7 @@ }, "macro.dbt_utils.get_url_parameter": { "arguments": [], - "created_at": 1733768712.147597, + "created_at": 1719485736.6233978, "depends_on": { "macros": [ "macro.dbt_utils.default__get_url_parameter" @@ -12024,7 +11713,7 @@ }, "macro.dbt_utils.get_url_path": { "arguments": [], - "created_at": 1733768712.1466691, + "created_at": 1719485736.62192, "depends_on": { "macros": [ "macro.dbt_utils.default__get_url_path" @@ -12048,7 +11737,7 @@ }, "macro.dbt_utils.group_by": { "arguments": [], - "created_at": 1733768712.195807, + "created_at": 1719485736.700075, "depends_on": { "macros": [ "macro.dbt_utils.default__group_by" @@ -12072,7 +11761,7 @@ }, "macro.dbt_utils.haversine_distance": { "arguments": [], - "created_at": 1733768712.215117, + "created_at": 1719485736.7356942, "depends_on": { "macros": [ "macro.dbt_utils.default__haversine_distance" @@ -12096,7 +11785,7 @@ }, "macro.dbt_utils.log_info": { "arguments": [], - "created_at": 1733768712.17287, + "created_at": 1719485736.664978, "depends_on": { "macros": [ "macro.dbt_utils.default__log_info" @@ -12120,7 +11809,7 @@ }, "macro.dbt_utils.nullcheck": { "arguments": [], - "created_at": 1733768712.199415, + "created_at": 1719485736.708089, "depends_on": { "macros": [ "macro.dbt_utils.default__nullcheck" @@ -12144,7 +11833,7 @@ }, "macro.dbt_utils.nullcheck_table": { "arguments": [], - "created_at": 1733768712.1772642, + "created_at": 1719485736.671076, "depends_on": { "macros": [ "macro.dbt_utils.default__nullcheck_table" @@ -12168,7 +11857,7 @@ }, "macro.dbt_utils.pivot": { "arguments": [], - "created_at": 1733768712.206419, + "created_at": 1719485736.719448, "depends_on": { "macros": [ "macro.dbt_utils.default__pivot" @@ -12192,7 +11881,7 @@ }, "macro.dbt_utils.postgres__deduplicate": { "arguments": [], - "created_at": 1733768712.1973498, + "created_at": 1719485736.703091, "depends_on": { "macros": [] }, @@ -12214,7 +11903,7 @@ }, "macro.dbt_utils.postgres__get_table_types_sql": { "arguments": [], - "created_at": 1733768712.212409, + "created_at": 1719485736.731321, "depends_on": { "macros": [] }, @@ -12236,7 +11925,7 @@ }, "macro.dbt_utils.pretty_log_format": { "arguments": [], - "created_at": 1733768712.171633, + "created_at": 1719485736.6625931, "depends_on": { "macros": [ "macro.dbt_utils.default__pretty_log_format" @@ -12260,7 +11949,7 @@ }, "macro.dbt_utils.pretty_time": { "arguments": [], - "created_at": 1733768712.172449, + "created_at": 1719485736.664063, "depends_on": { "macros": [ "macro.dbt_utils.default__pretty_time" @@ -12284,7 +11973,7 @@ }, "macro.dbt_utils.redshift__deduplicate": { "arguments": [], - "created_at": 1733768712.197172, + "created_at": 1719485736.7025979, "depends_on": { "macros": [ "macro.dbt_utils.default__deduplicate" @@ -12308,7 +11997,7 @@ }, "macro.dbt_utils.safe_add": { "arguments": [], - "created_at": 1733768712.198612, + "created_at": 1719485736.7061272, "depends_on": { "macros": [ "macro.dbt_utils.default__safe_add" @@ -12332,7 +12021,7 @@ }, "macro.dbt_utils.safe_divide": { "arguments": [], - "created_at": 1733768712.188876, + "created_at": 1719485736.689705, "depends_on": { "macros": [ "macro.dbt_utils.default__safe_divide" @@ -12356,7 +12045,7 @@ }, "macro.dbt_utils.safe_subtract": { "arguments": [], - "created_at": 1733768712.1764748, + "created_at": 1719485736.670065, "depends_on": { "macros": [ "macro.dbt_utils.default__safe_subtract" @@ -12380,7 +12069,7 @@ }, "macro.dbt_utils.slugify": { "arguments": [], - "created_at": 1733768712.1735811, + "created_at": 1719485736.6662788, "depends_on": { "macros": [] }, @@ -12402,7 +12091,7 @@ }, "macro.dbt_utils.snowflake__deduplicate": { "arguments": [], - "created_at": 1733768712.197504, + "created_at": 1719485736.703385, "depends_on": { "macros": [] }, @@ -12424,7 +12113,7 @@ }, "macro.dbt_utils.snowflake__width_bucket": { "arguments": [], - "created_at": 1733768712.209634, + "created_at": 1719485736.72608, "depends_on": { "macros": [] }, @@ -12446,7 +12135,7 @@ }, "macro.dbt_utils.star": { "arguments": [], - "created_at": 1733768712.184314, + "created_at": 1719485736.6838112, "depends_on": { "macros": [ "macro.dbt_utils.default__star" @@ -12470,7 +12159,7 @@ }, "macro.dbt_utils.surrogate_key": { "arguments": [], - "created_at": 1733768712.19803, + "created_at": 1719485736.704803, "depends_on": { "macros": [ "macro.dbt_utils.default__surrogate_key" @@ -12494,7 +12183,7 @@ }, "macro.dbt_utils.test_accepted_range": { "arguments": [], - "created_at": 1733768712.155669, + "created_at": 1719485736.6351202, "depends_on": { "macros": [ "macro.dbt_utils.default__test_accepted_range" @@ -12518,7 +12207,7 @@ }, "macro.dbt_utils.test_at_least_one": { "arguments": [], - "created_at": 1733768712.157697, + "created_at": 1719485736.637673, "depends_on": { "macros": [ "macro.dbt_utils.default__test_at_least_one" @@ -12542,7 +12231,7 @@ }, "macro.dbt_utils.test_cardinality_equality": { "arguments": [], - "created_at": 1733768712.160137, + "created_at": 1719485736.64627, "depends_on": { "macros": [ "macro.dbt_utils.default__test_cardinality_equality" @@ -12566,7 +12255,7 @@ }, "macro.dbt_utils.test_equal_rowcount": { "arguments": [], - "created_at": 1733768712.1507342, + "created_at": 1719485736.6276648, "depends_on": { "macros": [ "macro.dbt_utils.default__test_equal_rowcount" @@ -12590,7 +12279,7 @@ }, "macro.dbt_utils.test_equality": { "arguments": [], - "created_at": 1733768712.1648152, + "created_at": 1719485736.6529899, "depends_on": { "macros": [ "macro.dbt_utils.default__test_equality" @@ -12614,7 +12303,7 @@ }, "macro.dbt_utils.test_expression_is_true": { "arguments": [], - "created_at": 1733768712.160819, + "created_at": 1719485736.64721, "depends_on": { "macros": [ "macro.dbt_utils.default__test_expression_is_true" @@ -12638,7 +12327,7 @@ }, "macro.dbt_utils.test_fewer_rows_than": { "arguments": [], - "created_at": 1733768712.148976, + "created_at": 1719485736.625401, "depends_on": { "macros": [ "macro.dbt_utils.default__test_fewer_rows_than" @@ -12662,7 +12351,7 @@ }, "macro.dbt_utils.test_mutually_exclusive_ranges": { "arguments": [], - "created_at": 1733768712.169887, + "created_at": 1719485736.6603332, "depends_on": { "macros": [ "macro.dbt_utils.default__test_mutually_exclusive_ranges" @@ -12686,7 +12375,7 @@ }, "macro.dbt_utils.test_not_accepted_values": { "arguments": [], - "created_at": 1733768712.156644, + "created_at": 1719485736.6365619, "depends_on": { "macros": [ "macro.dbt_utils.default__test_not_accepted_values" @@ -12710,7 +12399,7 @@ }, "macro.dbt_utils.test_not_constant": { "arguments": [], - "created_at": 1733768712.1544719, + "created_at": 1719485736.6339169, "depends_on": { "macros": [ "macro.dbt_utils.default__test_not_constant" @@ -12734,7 +12423,7 @@ }, "macro.dbt_utils.test_not_empty_string": { "arguments": [], - "created_at": 1733768712.166101, + "created_at": 1719485736.655252, "depends_on": { "macros": [ "macro.dbt_utils.default__test_not_empty_string" @@ -12758,7 +12447,7 @@ }, "macro.dbt_utils.test_not_null_proportion": { "arguments": [], - "created_at": 1733768712.161741, + "created_at": 1719485736.64849, "depends_on": { "macros": [ "macro.dbt_utils.default__test_not_null_proportion" @@ -12782,7 +12471,7 @@ }, "macro.dbt_utils.test_recency": { "arguments": [], - "created_at": 1733768712.153312, + "created_at": 1719485736.632009, "depends_on": { "macros": [ "macro.dbt_utils.default__test_recency" @@ -12806,7 +12495,7 @@ }, "macro.dbt_utils.test_relationships_where": { "arguments": [], - "created_at": 1733768712.152317, + "created_at": 1719485736.6303911, "depends_on": { "macros": [ "macro.dbt_utils.default__test_relationships_where" @@ -12830,7 +12519,7 @@ }, "macro.dbt_utils.test_sequential_values": { "arguments": [], - "created_at": 1733768712.163331, + "created_at": 1719485736.650635, "depends_on": { "macros": [ "macro.dbt_utils.default__test_sequential_values" @@ -12854,7 +12543,7 @@ }, "macro.dbt_utils.test_unique_combination_of_columns": { "arguments": [], - "created_at": 1733768712.159051, + "created_at": 1719485736.642268, "depends_on": { "macros": [ "macro.dbt_utils.default__test_unique_combination_of_columns" @@ -12878,7 +12567,7 @@ }, "macro.dbt_utils.union_relations": { "arguments": [], - "created_at": 1733768712.192402, + "created_at": 1719485736.6939468, "depends_on": { "macros": [ "macro.dbt_utils.default__union_relations" @@ -12902,7 +12591,7 @@ }, "macro.dbt_utils.unpivot": { "arguments": [], - "created_at": 1733768712.186986, + "created_at": 1719485736.68751, "depends_on": { "macros": [ "macro.dbt_utils.default__unpivot" @@ -12926,7 +12615,7 @@ }, "macro.dbt_utils.width_bucket": { "arguments": [], - "created_at": 1733768712.2090409, + "created_at": 1719485736.724451, "depends_on": { "macros": [ "macro.dbt_utils.default__width_bucket" @@ -12950,7 +12639,7 @@ }, "macro.jaffle_shop.drop_table_by_name": { "arguments": [], - "created_at": 1733768711.890105, + "created_at": 1719485736.288547, "depends_on": { "macros": [ "macro.dbt.run_query" @@ -12976,14 +12665,14 @@ "metadata": { "adapter_type": "postgres", "dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", - "dbt_version": "1.8.7", + "dbt_version": "1.8.0", "env": {}, - "generated_at": "2024-12-09T18:25:11.852105Z", - "invocation_id": "c2b26d74-4af6-4b69-8e66-acb7dc838565", + "generated_at": "2024-06-27T10:55:36.063508Z", + "invocation_id": "31cdaee6-885b-4bdf-b794-4065f9530edb", "project_id": "06e5b98c2db46f8a72cc4f66410e9b3b", "project_name": "jaffle_shop", "send_anonymous_usage_stats": true, - "user_id": "15f4b14a-123f-433a-bddc-864f00ab86fc" + "user_id": "f5b1bc43-6cc6-4fd4-849c-18b31ffa1e2d" }, "metrics": {}, "nodes": { @@ -12992,7 +12681,7 @@ "alias": "customers", "build_path": null, "checksum": { - "checksum": "9f2eb13e3f280ace0666a0e18bbf66245f1c189e1362d6f3b9e276d0b3133749", + "checksum": "60bd72e33da43fff3a7e7609135c17cd4468bd22afec0735dd36018bfb5af30a", "name": "sha256" }, "columns": { @@ -13089,9 +12778,7 @@ "pre-hook": [], "quoting": {}, "schema": null, - "tags": [ - "customers" - ], + "tags": [], "unique_key": null }, "constraints": [], @@ -13100,7 +12787,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.6589088, + "created_at": 1719485737.5078778, "database": "postgres", "depends_on": { "macros": [], @@ -13130,7 +12817,7 @@ "package_name": "jaffle_shop", "patch_path": "jaffle_shop://models/schema.yml", "path": "customers.sql", - "raw_code": "{{ config(tags=[\"customers\"]) }}\n\nwith customers as (\n\n select * from {{ ref('stg_customers') }}\n\n),\n\norders as (\n\n select * from {{ ref('stg_orders') }}\n\n),\n\npayments as (\n\n select * from {{ ref('stg_payments') }}\n\n),\n\ncustomer_orders as (\n\n select\n customer_id,\n\n min(order_date) as first_order,\n max(order_date) as most_recent_order,\n count(order_id) as number_of_orders\n from orders\n\n group by customer_id\n\n),\n\ncustomer_payments as (\n\n select\n orders.customer_id,\n sum(amount) as total_amount\n\n from payments\n\n left join orders on\n payments.order_id = orders.order_id\n\n group by orders.customer_id\n\n),\n\nfinal as (\n\n select\n customers.customer_id,\n customers.first_name,\n customers.last_name,\n customer_orders.first_order,\n customer_orders.most_recent_order,\n customer_orders.number_of_orders,\n customer_payments.total_amount as customer_lifetime_value\n\n from customers\n\n left join customer_orders\n on customers.customer_id = customer_orders.customer_id\n\n left join customer_payments\n on customers.customer_id = customer_payments.customer_id\n\n)\n\nselect * from final", + "raw_code": "with customers as (\n\n select * from {{ ref('stg_customers') }}\n\n),\n\norders as (\n\n select * from {{ ref('stg_orders') }}\n\n),\n\npayments as (\n\n select * from {{ ref('stg_payments') }}\n\n),\n\ncustomer_orders as (\n\n select\n customer_id,\n\n min(order_date) as first_order,\n max(order_date) as most_recent_order,\n count(order_id) as number_of_orders\n from orders\n\n group by customer_id\n\n),\n\ncustomer_payments as (\n\n select\n orders.customer_id,\n sum(amount) as total_amount\n\n from payments\n\n left join orders on\n payments.order_id = orders.order_id\n\n group by orders.customer_id\n\n),\n\nfinal as (\n\n select\n customers.customer_id,\n customers.first_name,\n customers.last_name,\n customer_orders.first_order,\n customer_orders.most_recent_order,\n customer_orders.number_of_orders,\n customer_payments.total_amount as customer_lifetime_value\n\n from customers\n\n left join customer_orders\n on customers.customer_id = customer_orders.customer_id\n\n left join customer_payments\n on customers.customer_id = customer_payments.customer_id\n\n)\n\nselect * from final", "refs": [ { "name": "stg_customers", @@ -13148,19 +12835,14 @@ "version": null } ], - "relation_name": "\"postgres\".\"postgres\".\"customers\"", + "relation_name": "\"postgres\".\"public\".\"customers\"", "resource_type": "model", - "schema": "postgres", + "schema": "public", "sources": [], - "tags": [ - "customers" - ], + "tags": [], "unique_id": "model.jaffle_shop.customers", "unrendered_config": { - "materialized": "table", - "tags": [ - "customers" - ] + "materialized": "table" }, "version": null }, @@ -13293,7 +12975,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.661519, + "created_at": 1719485737.511349, "database": "postgres", "depends_on": { "macros": [], @@ -13335,9 +13017,9 @@ "version": null } ], - "relation_name": "\"postgres\".\"postgres\".\"orders\"", + "relation_name": "\"postgres\".\"public\".\"orders\"", "resource_type": "model", - "schema": "postgres", + "schema": "public", "sources": [], "tags": [], "unique_id": "model.jaffle_shop.orders", @@ -13351,7 +13033,7 @@ "alias": "stg_customers", "build_path": null, "checksum": { - "checksum": "745b5d4fc01d8f673204d54f568bba06de5d881d44553fe5c0e2028c52005710", + "checksum": "80e3223cd54387e11fa16cd0f4cbe15f8ff74dcd9900b93856b9e39416178c9d", "name": "sha256" }, "columns": { @@ -13403,12 +13085,11 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.782482, + "created_at": 1719485737.629529, "database": "postgres", "depends_on": { "macros": [], "nodes": [ - "source.jaffle_shop.postgres_db.raw_customers", "seed.jaffle_shop.raw_customers" ] }, @@ -13433,7 +13114,7 @@ "package_name": "jaffle_shop", "patch_path": "jaffle_shop://models/staging/schema.yml", "path": "staging/stg_customers.sql", - "raw_code": "with source as (\n\n {#-\n Normally we would select from the table here, but we are using seeds to load\n our data in this project\n #}\n select * from {{ source('postgres_db', 'raw_customers') }}\n\n),\n\nforce_seed_dep as (\n {#-\n This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none\n #}\n select * from {{ ref('raw_customers') }}\n),\n\nrenamed as (\n\n select\n id as customer_id,\n first_name,\n last_name\n\n from source\n\n)\n\nselect * from renamed", + "raw_code": "with source as (\n\n {#-\n Normally we would select from the table here, but we are using seeds to load\n our data in this project\n #}\n select * from {{ ref('raw_customers') }}\n\n),\n\nrenamed as (\n\n select\n id as customer_id,\n first_name,\n last_name\n\n from source\n\n)\n\nselect * from renamed", "refs": [ { "name": "raw_customers", @@ -13441,15 +13122,10 @@ "version": null } ], - "relation_name": "\"postgres\".\"postgres\".\"stg_customers\"", + "relation_name": "\"postgres\".\"public\".\"stg_customers\"", "resource_type": "model", - "schema": "postgres", - "sources": [ - [ - "postgres_db", - "raw_customers" - ] - ], + "schema": "public", + "sources": [], "tags": [], "unique_id": "model.jaffle_shop.stg_customers", "unrendered_config": { @@ -13462,7 +13138,7 @@ "alias": "stg_orders", "build_path": null, "checksum": { - "checksum": "cdb5e9e9cf11b56e8419905bc35ddd5e3ba44aade1b0b7cb61ccf41840475a8b", + "checksum": "f4f881cb09d2c4162200fc331d7401df6d1abd4fed492554a7db70dede347108", "name": "sha256" }, "columns": { @@ -13523,13 +13199,12 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.783208, + "created_at": 1719485737.630356, "database": "postgres", "depends_on": { "macros": [], "nodes": [ - "source.jaffle_shop.postgres_db.raw_orders", - "seed.jaffle_shop.raw_customers" + "seed.jaffle_shop.raw_orders" ] }, "deprecation_date": null, @@ -13553,23 +13228,18 @@ "package_name": "jaffle_shop", "patch_path": "jaffle_shop://models/staging/schema.yml", "path": "staging/stg_orders.sql", - "raw_code": "with source as (\n\n {#-\n Normally we would select from the table here, but we are using seeds to load\n our data in this project\n #}\n select * from {{ source('postgres_db', 'raw_orders') }}\n\n),\n\nforce_seed_dep as (\n {#-\n This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none\n #}\n select * from {{ ref('raw_customers') }}\n),\n\nrenamed as (\n\n select\n id as order_id,\n user_id as customer_id,\n order_date,\n status\n\n from source\n\n)\n\nselect * from renamed", + "raw_code": "with source as (\n\n {#-\n Normally we would select from the table here, but we are using seeds to load\n our data in this project\n #}\n select * from {{ ref('raw_orders') }}\n\n),\n\nrenamed as (\n\n select\n id as order_id,\n user_id as customer_id,\n order_date,\n status\n\n from source\n\n)\n\nselect * from renamed", "refs": [ { - "name": "raw_customers", + "name": "raw_orders", "package": null, "version": null } ], - "relation_name": "\"postgres\".\"postgres\".\"stg_orders\"", + "relation_name": "\"postgres\".\"public\".\"stg_orders\"", "resource_type": "model", - "schema": "postgres", - "sources": [ - [ - "postgres_db", - "raw_orders" - ] - ], + "schema": "public", + "sources": [], "tags": [], "unique_id": "model.jaffle_shop.stg_orders", "unrendered_config": { @@ -13582,7 +13252,7 @@ "alias": "stg_payments", "build_path": null, "checksum": { - "checksum": "b9c8809d5160dc09bf93b130915f6c47d2eaae223e70a381f0ee9da469844e1c", + "checksum": "30f346f66ef7bca4c8865a471086303720c3daab58870c805b6f45e92d19fd65", "name": "sha256" }, "columns": { @@ -13643,13 +13313,12 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7845461, + "created_at": 1719485737.6316102, "database": "postgres", "depends_on": { "macros": [], "nodes": [ - "source.jaffle_shop.postgres_db.raw_payments", - "seed.jaffle_shop.raw_customers" + "seed.jaffle_shop.raw_payments" ] }, "deprecation_date": null, @@ -13673,23 +13342,18 @@ "package_name": "jaffle_shop", "patch_path": "jaffle_shop://models/staging/schema.yml", "path": "staging/stg_payments.sql", - "raw_code": "with source as (\n\n select * from {{ source('postgres_db', 'raw_payments') }}\n\n),\n\nforce_seed_dep as (\n {#-\n This CTE is used to ensure tests wait for seeds to run if source_node_rendering = none\n #}\n select * from {{ ref('raw_customers') }}\n),\n\nrenamed as (\n\n select\n id as payment_id,\n order_id,\n payment_method,\n\n -- `amount` is currently stored in cents, so we convert it to dollars\n amount / 100 as amount\n\n from source\n\n)\n\nselect * from renamed", + "raw_code": "with source as (\n\n {#-\n Normally we would select from the table here, but we are using seeds to load\n our data in this project\n #}\n select * from {{ ref('raw_payments') }}\n\n),\n\nrenamed as (\n\n select\n id as payment_id,\n order_id,\n payment_method,\n\n -- `amount` is currently stored in cents, so we convert it to dollars\n amount / 100 as amount\n\n from source\n\n)\n\nselect * from renamed", "refs": [ { - "name": "raw_customers", + "name": "raw_payments", "package": null, "version": null } ], - "relation_name": "\"postgres\".\"postgres\".\"stg_payments\"", + "relation_name": "\"postgres\".\"public\".\"stg_payments\"", "resource_type": "model", - "schema": "postgres", - "sources": [ - [ - "postgres_db", - "raw_payments" - ] - ], + "schema": "public", + "sources": [], "tags": [], "unique_id": "model.jaffle_shop.stg_payments", "unrendered_config": { @@ -13697,18 +13361,15 @@ }, "version": null }, - "model.jaffle_shop.\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45": { - "access": "protected", - "alias": "\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45", + "seed.jaffle_shop.raw_customers": { + "alias": "raw_customers", "build_path": null, "checksum": { - "checksum": "ff297fadab250ba548f4713a4d10a25aa72aced064e2131394b6ff3c1df36600", + "checksum": "357d173dda65a741ad97d6683502286cc2655bb396ab5f4dfad12b8c39bd2a63", "name": "sha256" }, "columns": {}, - "compiled_path": null, "config": { - "access": "protected", "alias": null, "column_types": {}, "contract": { @@ -13716,6 +13377,7 @@ "enforced": false }, "database": null, + "delimiter": ",", "docs": { "node_color": null, "show": true @@ -13725,7 +13387,7 @@ "grants": {}, "group": null, "incremental_strategy": null, - "materialized": "table", + "materialized": "seed", "meta": {}, "on_configuration_change": "apply", "on_schema_change": "ignore", @@ -13733,97 +13395,13 @@ "persist_docs": {}, "post-hook": [], "pre-hook": [], + "quote_columns": null, "quoting": {}, "schema": null, "tags": [], "unique_key": null }, - "constraints": [], - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.519385, - "database": "postgres", - "depends_on": { - "macros": [], - "nodes": [] - }, - "deprecation_date": null, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "fqn": [ - "jaffle_shop", - "\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45" - ], - "group": null, - "language": "sql", - "latest_version": null, - "meta": {}, - "metrics": [], - "name": "\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45", - "original_file_path": "models/\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45.sql", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45.sql", - "raw_code": "select\n '\uff34\uff25\uff33\uff34\uff3f\uff26\uff2f\uff32\uff3f\uff2d\uff35\uff2c\uff34\uff29\uff22\uff39\uff34\uff25\uff3f\uff23\uff28\uff21\uff32\uff23\uff34\uff25\uff32\uff33'", - "refs": [], - "relation_name": "\"postgres\".\"postgres\".\"\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45\"", - "resource_type": "model", - "schema": "postgres", - "sources": [], - "tags": [], - "unique_id": "model.jaffle_shop.\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45", - "unrendered_config": { - "materialized": "table" - }, - "version": null - }, - "seed.jaffle_shop.raw_customers": { - "alias": "raw_customers", - "build_path": null, - "checksum": { - "checksum": "357d173dda65a741ad97d6683502286cc2655bb396ab5f4dfad12b8c39bd2a63", - "name": "sha256" - }, - "columns": {}, - "config": { - "alias": null, - "column_types": {}, - "contract": { - "alias_types": true, - "enforced": false - }, - "database": null, - "delimiter": ",", - "docs": { - "node_color": null, - "show": true - }, - "enabled": true, - "full_refresh": null, - "grants": {}, - "group": null, - "incremental_strategy": null, - "materialized": "seed", - "meta": {}, - "on_configuration_change": "apply", - "on_schema_change": "ignore", - "packages": [], - "persist_docs": {}, - "post-hook": [], - "pre-hook": [], - "quote_columns": null, - "quoting": {}, - "schema": null, - "tags": [], - "unique_key": null - }, - "created_at": 1733768712.606124, + "created_at": 1719485737.409044, "database": "postgres", "depends_on": { "macros": [] @@ -13845,10 +13423,10 @@ "patch_path": null, "path": "raw_customers.csv", "raw_code": "", - "relation_name": "\"postgres\".\"postgres\".\"raw_customers\"", + "relation_name": "\"postgres\".\"public\".\"raw_customers\"", "resource_type": "seed", - "root_path": "/Users/pankaj/Documents/astro_code/astronomer-cosmos/dev/dags/dbt/jaffle_shop", - "schema": "postgres", + "root_path": "/Users/tati/Code/cosmos-clean/astronomer-cosmos/dev/dags/dbt/jaffle_shop", + "schema": "public", "tags": [], "unique_id": "seed.jaffle_shop.raw_customers", "unrendered_config": {} @@ -13893,7 +13471,7 @@ "tags": [], "unique_key": null }, - "created_at": 1733768712.607415, + "created_at": 1719485737.411613, "database": "postgres", "depends_on": { "macros": [] @@ -13915,10 +13493,10 @@ "patch_path": null, "path": "raw_orders.csv", "raw_code": "", - "relation_name": "\"postgres\".\"postgres\".\"raw_orders\"", + "relation_name": "\"postgres\".\"public\".\"raw_orders\"", "resource_type": "seed", - "root_path": "/Users/pankaj/Documents/astro_code/astronomer-cosmos/dev/dags/dbt/jaffle_shop", - "schema": "postgres", + "root_path": "/Users/tati/Code/cosmos-clean/astronomer-cosmos/dev/dags/dbt/jaffle_shop", + "schema": "public", "tags": [], "unique_id": "seed.jaffle_shop.raw_orders", "unrendered_config": {} @@ -13963,7 +13541,7 @@ "tags": [], "unique_key": null }, - "created_at": 1733768712.608446, + "created_at": 1719485737.4141219, "database": "postgres", "depends_on": { "macros": [] @@ -13985,10 +13563,10 @@ "patch_path": null, "path": "raw_payments.csv", "raw_code": "", - "relation_name": "\"postgres\".\"postgres\".\"raw_payments\"", + "relation_name": "\"postgres\".\"public\".\"raw_payments\"", "resource_type": "seed", - "root_path": "/Users/pankaj/Documents/astro_code/astronomer-cosmos/dev/dags/dbt/jaffle_shop", - "schema": "postgres", + "root_path": "/Users/tati/Code/cosmos-clean/astronomer-cosmos/dev/dags/dbt/jaffle_shop", + "schema": "public", "tags": [], "unique_id": "seed.jaffle_shop.raw_payments", "unrendered_config": {} @@ -14027,7 +13605,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.761217, + "created_at": 1719485737.607407, "database": "postgres", "depends_on": { "macros": [ @@ -14067,7 +13645,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14124,7 +13702,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.794427, + "created_at": 1719485737.637758, "database": "postgres", "depends_on": { "macros": [ @@ -14165,7 +13743,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14222,7 +13800,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7980769, + "created_at": 1719485737.6424909, "database": "postgres", "depends_on": { "macros": [ @@ -14263,7 +13841,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14319,7 +13897,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7480042, + "created_at": 1719485737.5844128, "database": "postgres", "depends_on": { "macros": [ @@ -14358,7 +13936,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14406,7 +13984,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7657018, + "created_at": 1719485737.6199622, "database": "postgres", "depends_on": { "macros": [ @@ -14445,7 +14023,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14493,7 +14071,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.768752, + "created_at": 1719485737.6258051, "database": "postgres", "depends_on": { "macros": [ @@ -14532,7 +14110,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14580,7 +14158,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.767988, + "created_at": 1719485737.624228, "database": "postgres", "depends_on": { "macros": [ @@ -14619,7 +14197,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14667,7 +14245,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.767168, + "created_at": 1719485737.622118, "database": "postgres", "depends_on": { "macros": [ @@ -14706,7 +14284,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14754,7 +14332,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7504, + "created_at": 1719485737.587272, "database": "postgres", "depends_on": { "macros": [ @@ -14793,7 +14371,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14841,7 +14419,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.769496, + "created_at": 1719485737.6277661, "database": "postgres", "depends_on": { "macros": [ @@ -14880,7 +14458,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -14928,7 +14506,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.749543, + "created_at": 1719485737.586345, "database": "postgres", "depends_on": { "macros": [ @@ -14967,7 +14545,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -15015,7 +14593,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7887979, + "created_at": 1719485737.633585, "database": "postgres", "depends_on": { "macros": [ @@ -15055,7 +14633,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -15103,7 +14681,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.793638, + "created_at": 1719485737.6366348, "database": "postgres", "depends_on": { "macros": [ @@ -15143,7 +14721,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -15191,7 +14769,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.7973142, + "created_at": 1719485737.641508, "database": "postgres", "depends_on": { "macros": [ @@ -15231,7 +14809,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -15279,7 +14857,7 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.751168, + "created_at": 1719485737.590184, "database": "postgres", "depends_on": { "macros": [ @@ -15325,7 +14903,7 @@ ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", + "schema": "public_dbt_test__audit", "sources": [], "tags": [], "test_metadata": { @@ -15341,15 +14919,15 @@ "unique_id": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", "unrendered_config": {} }, - "test.jaffle_shop.source_not_null_postgres_db_raw_customers_id.de3e9fff76": { - "alias": "source_not_null_postgres_db_raw_customers_id", - "attached_node": null, + "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1": { + "alias": "unique_customers_customer_id", + "attached_node": "model.jaffle_shop.customers", "build_path": null, "checksum": { "checksum": "", "name": "none" }, - "column_name": "id", + "column_name": "customer_id", "columns": {}, "compiled_path": null, "config": { @@ -15375,14 +14953,14 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.850983, + "created_at": 1719485737.583136, "database": "postgres", "depends_on": { "macros": [ - "macro.dbt.test_not_null" + "macro.dbt.test_unique" ], "nodes": [ - "source.jaffle_shop.postgres_db.raw_customers" + "model.jaffle_shop.customers" ] }, "description": "", @@ -15390,53 +14968,53 @@ "node_color": null, "show": true }, - "file_key_name": "sources.postgres_db", + "file_key_name": "models.customers", "fqn": [ "jaffle_shop", - "staging", - "source_not_null_postgres_db_raw_customers_id" + "unique_customers_customer_id" ], "group": null, "language": "sql", "meta": {}, "metrics": [], - "name": "source_not_null_postgres_db_raw_customers_id", - "original_file_path": "models/staging/sources.yml", + "name": "unique_customers_customer_id", + "original_file_path": "models/schema.yml", "package_name": "jaffle_shop", "patch_path": null, - "path": "source_not_null_postgres_db_raw_customers_id.sql", - "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", - "refs": [], + "path": "unique_customers_customer_id.sql", + "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", + "refs": [ + { + "name": "customers", + "package": null, + "version": null + } + ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_customers" - ] - ], + "schema": "public_dbt_test__audit", + "sources": [], "tags": [], "test_metadata": { "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_customers')) }}" + "column_name": "customer_id", + "model": "{{ get_where_subquery(ref('customers')) }}" }, - "name": "not_null", + "name": "unique", "namespace": null }, - "unique_id": "test.jaffle_shop.source_not_null_postgres_db_raw_customers_id.de3e9fff76", + "unique_id": "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1", "unrendered_config": {} }, - "test.jaffle_shop.source_not_null_postgres_db_raw_orders_id.0dc5a4d454": { - "alias": "source_not_null_postgres_db_raw_orders_id", - "attached_node": null, + "test.jaffle_shop.unique_orders_order_id.fed79b3a6e": { + "alias": "unique_orders_order_id", + "attached_node": "model.jaffle_shop.orders", "build_path": null, "checksum": { "checksum": "", "name": "none" }, - "column_name": "id", + "column_name": "order_id", "columns": {}, "compiled_path": null, "config": { @@ -15462,14 +15040,14 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.857149, + "created_at": 1719485737.5853949, "database": "postgres", "depends_on": { "macros": [ - "macro.dbt.test_not_null" + "macro.dbt.test_unique" ], "nodes": [ - "source.jaffle_shop.postgres_db.raw_orders" + "model.jaffle_shop.orders" ] }, "description": "", @@ -15477,53 +15055,53 @@ "node_color": null, "show": true }, - "file_key_name": "sources.postgres_db", + "file_key_name": "models.orders", "fqn": [ "jaffle_shop", - "staging", - "source_not_null_postgres_db_raw_orders_id" + "unique_orders_order_id" ], "group": null, "language": "sql", "meta": {}, "metrics": [], - "name": "source_not_null_postgres_db_raw_orders_id", - "original_file_path": "models/staging/sources.yml", + "name": "unique_orders_order_id", + "original_file_path": "models/schema.yml", "package_name": "jaffle_shop", "patch_path": null, - "path": "source_not_null_postgres_db_raw_orders_id.sql", - "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", - "refs": [], + "path": "unique_orders_order_id.sql", + "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", + "refs": [ + { + "name": "orders", + "package": null, + "version": null + } + ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_orders" - ] - ], + "schema": "public_dbt_test__audit", + "sources": [], "tags": [], "test_metadata": { "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_orders')) }}" + "column_name": "order_id", + "model": "{{ get_where_subquery(ref('orders')) }}" }, - "name": "not_null", + "name": "unique", "namespace": null }, - "unique_id": "test.jaffle_shop.source_not_null_postgres_db_raw_orders_id.0dc5a4d454", + "unique_id": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e", "unrendered_config": {} }, - "test.jaffle_shop.source_not_null_postgres_db_raw_payments_id.15f4f169e7": { - "alias": "source_not_null_postgres_db_raw_payments_id", - "attached_node": null, + "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada": { + "alias": "unique_stg_customers_customer_id", + "attached_node": "model.jaffle_shop.stg_customers", "build_path": null, "checksum": { "checksum": "", "name": "none" }, - "column_name": "id", + "column_name": "customer_id", "columns": {}, "compiled_path": null, "config": { @@ -15549,14 +15127,14 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.85549, + "created_at": 1719485737.6324039, "database": "postgres", "depends_on": { "macros": [ - "macro.dbt.test_not_null" + "macro.dbt.test_unique" ], "nodes": [ - "source.jaffle_shop.postgres_db.raw_payments" + "model.jaffle_shop.stg_customers" ] }, "description": "", @@ -15564,53 +15142,54 @@ "node_color": null, "show": true }, - "file_key_name": "sources.postgres_db", + "file_key_name": "models.stg_customers", "fqn": [ "jaffle_shop", "staging", - "source_not_null_postgres_db_raw_payments_id" + "unique_stg_customers_customer_id" ], "group": null, "language": "sql", "meta": {}, "metrics": [], - "name": "source_not_null_postgres_db_raw_payments_id", - "original_file_path": "models/staging/sources.yml", + "name": "unique_stg_customers_customer_id", + "original_file_path": "models/staging/schema.yml", "package_name": "jaffle_shop", "patch_path": null, - "path": "source_not_null_postgres_db_raw_payments_id.sql", - "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", - "refs": [], + "path": "unique_stg_customers_customer_id.sql", + "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", + "refs": [ + { + "name": "stg_customers", + "package": null, + "version": null + } + ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_payments" - ] - ], + "schema": "public_dbt_test__audit", + "sources": [], "tags": [], "test_metadata": { "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_payments')) }}" + "column_name": "customer_id", + "model": "{{ get_where_subquery(ref('stg_customers')) }}" }, - "name": "not_null", + "name": "unique", "namespace": null }, - "unique_id": "test.jaffle_shop.source_not_null_postgres_db_raw_payments_id.15f4f169e7", + "unique_id": "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada", "unrendered_config": {} }, - "test.jaffle_shop.source_unique_postgres_db_raw_customers_id.6e5ad1d707": { - "alias": "source_unique_postgres_db_raw_customers_id", - "attached_node": null, + "test.jaffle_shop.unique_stg_orders_order_id.e3b841c71a": { + "alias": "unique_stg_orders_order_id", + "attached_node": "model.jaffle_shop.stg_orders", "build_path": null, "checksum": { "checksum": "", "name": "none" }, - "column_name": "id", + "column_name": "order_id", "columns": {}, "compiled_path": null, "config": { @@ -15636,14 +15215,14 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.849803, + "created_at": 1719485737.635364, "database": "postgres", "depends_on": { "macros": [ "macro.dbt.test_unique" ], "nodes": [ - "source.jaffle_shop.postgres_db.raw_customers" + "model.jaffle_shop.stg_orders" ] }, "description": "", @@ -15651,53 +15230,54 @@ "node_color": null, "show": true }, - "file_key_name": "sources.postgres_db", + "file_key_name": "models.stg_orders", "fqn": [ "jaffle_shop", "staging", - "source_unique_postgres_db_raw_customers_id" + "unique_stg_orders_order_id" ], "group": null, "language": "sql", "meta": {}, "metrics": [], - "name": "source_unique_postgres_db_raw_customers_id", - "original_file_path": "models/staging/sources.yml", + "name": "unique_stg_orders_order_id", + "original_file_path": "models/staging/schema.yml", "package_name": "jaffle_shop", "patch_path": null, - "path": "source_unique_postgres_db_raw_customers_id.sql", + "path": "unique_stg_orders_order_id.sql", "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [], + "refs": [ + { + "name": "stg_orders", + "package": null, + "version": null + } + ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_customers" - ] - ], + "schema": "public_dbt_test__audit", + "sources": [], "tags": [], "test_metadata": { "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_customers')) }}" + "column_name": "order_id", + "model": "{{ get_where_subquery(ref('stg_orders')) }}" }, "name": "unique", "namespace": null }, - "unique_id": "test.jaffle_shop.source_unique_postgres_db_raw_customers_id.6e5ad1d707", + "unique_id": "test.jaffle_shop.unique_stg_orders_order_id.e3b841c71a", "unrendered_config": {} }, - "test.jaffle_shop.source_unique_postgres_db_raw_orders_id.0bf2272247": { - "alias": "source_unique_postgres_db_raw_orders_id", - "attached_node": null, + "test.jaffle_shop.unique_stg_payments_payment_id.3744510712": { + "alias": "unique_stg_payments_payment_id", + "attached_node": "model.jaffle_shop.stg_payments", "build_path": null, "checksum": { "checksum": "", "name": "none" }, - "column_name": "id", + "column_name": "payment_id", "columns": {}, "compiled_path": null, "config": { @@ -15723,14 +15303,14 @@ "checksum": null, "enforced": false }, - "created_at": 1733768712.856386, + "created_at": 1719485737.640539, "database": "postgres", "depends_on": { "macros": [ "macro.dbt.test_unique" ], "nodes": [ - "source.jaffle_shop.postgres_db.raw_orders" + "model.jaffle_shop.stg_payments" ] }, "description": "", @@ -15738,574 +15318,47 @@ "node_color": null, "show": true }, - "file_key_name": "sources.postgres_db", + "file_key_name": "models.stg_payments", "fqn": [ "jaffle_shop", "staging", - "source_unique_postgres_db_raw_orders_id" + "unique_stg_payments_payment_id" ], "group": null, "language": "sql", "meta": {}, "metrics": [], - "name": "source_unique_postgres_db_raw_orders_id", - "original_file_path": "models/staging/sources.yml", + "name": "unique_stg_payments_payment_id", + "original_file_path": "models/staging/schema.yml", "package_name": "jaffle_shop", "patch_path": null, - "path": "source_unique_postgres_db_raw_orders_id.sql", + "path": "unique_stg_payments_payment_id.sql", "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [], + "refs": [ + { + "name": "stg_payments", + "package": null, + "version": null + } + ], "relation_name": null, "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_orders" - ] - ], + "schema": "public_dbt_test__audit", + "sources": [], "tags": [], "test_metadata": { "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_orders')) }}" + "column_name": "payment_id", + "model": "{{ get_where_subquery(ref('stg_payments')) }}" }, "name": "unique", "namespace": null }, - "unique_id": "test.jaffle_shop.source_unique_postgres_db_raw_orders_id.0bf2272247", - "unrendered_config": {} - }, - "test.jaffle_shop.source_unique_postgres_db_raw_payments_id.a4bd02775f": { - "alias": "source_unique_postgres_db_raw_payments_id", - "attached_node": null, - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.8545659, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "source.jaffle_shop.postgres_db.raw_payments" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "sources.postgres_db", - "fqn": [ - "jaffle_shop", - "staging", - "source_unique_postgres_db_raw_payments_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "source_unique_postgres_db_raw_payments_id", - "original_file_path": "models/staging/sources.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "source_unique_postgres_db_raw_payments_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [ - [ - "postgres_db", - "raw_payments" - ] - ], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "id", - "model": "{{ get_where_subquery(source('postgres_db', 'raw_payments')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.source_unique_postgres_db_raw_payments_id.a4bd02775f", - "unrendered_config": {} - }, - "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1": { - "alias": "unique_customers_customer_id", - "attached_node": "model.jaffle_shop.customers", - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "customer_id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.747018, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "model.jaffle_shop.customers" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "models.customers", - "fqn": [ - "jaffle_shop", - "unique_customers_customer_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "unique_customers_customer_id", - "original_file_path": "models/schema.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "unique_customers_customer_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [ - { - "name": "customers", - "package": null, - "version": null - } - ], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "customer_id", - "model": "{{ get_where_subquery(ref('customers')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1", - "unrendered_config": {} - }, - "test.jaffle_shop.unique_orders_order_id.fed79b3a6e": { - "alias": "unique_orders_order_id", - "attached_node": "model.jaffle_shop.orders", - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "order_id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.7487848, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "model.jaffle_shop.orders" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "models.orders", - "fqn": [ - "jaffle_shop", - "unique_orders_order_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "unique_orders_order_id", - "original_file_path": "models/schema.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "unique_orders_order_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [ - { - "name": "orders", - "package": null, - "version": null - } - ], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "order_id", - "model": "{{ get_where_subquery(ref('orders')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e", - "unrendered_config": {} - }, - "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada": { - "alias": "unique_stg_customers_customer_id", - "attached_node": "model.jaffle_shop.stg_customers", - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "customer_id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.785654, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "model.jaffle_shop.stg_customers" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "models.stg_customers", - "fqn": [ - "jaffle_shop", - "staging", - "unique_stg_customers_customer_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "unique_stg_customers_customer_id", - "original_file_path": "models/staging/schema.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "unique_stg_customers_customer_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [ - { - "name": "stg_customers", - "package": null, - "version": null - } - ], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "customer_id", - "model": "{{ get_where_subquery(ref('stg_customers')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada", - "unrendered_config": {} - }, - "test.jaffle_shop.unique_stg_orders_order_id.e3b841c71a": { - "alias": "unique_stg_orders_order_id", - "attached_node": "model.jaffle_shop.stg_orders", - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "order_id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.791896, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "model.jaffle_shop.stg_orders" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "models.stg_orders", - "fqn": [ - "jaffle_shop", - "staging", - "unique_stg_orders_order_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "unique_stg_orders_order_id", - "original_file_path": "models/staging/schema.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "unique_stg_orders_order_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [ - { - "name": "stg_orders", - "package": null, - "version": null - } - ], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "order_id", - "model": "{{ get_where_subquery(ref('stg_orders')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.unique_stg_orders_order_id.e3b841c71a", - "unrendered_config": {} - }, - "test.jaffle_shop.unique_stg_payments_payment_id.3744510712": { - "alias": "unique_stg_payments_payment_id", - "attached_node": "model.jaffle_shop.stg_payments", - "build_path": null, - "checksum": { - "checksum": "", - "name": "none" - }, - "column_name": "payment_id", - "columns": {}, - "compiled_path": null, - "config": { - "alias": null, - "database": null, - "enabled": true, - "error_if": "!= 0", - "fail_calc": "count(*)", - "group": null, - "limit": null, - "materialized": "test", - "meta": {}, - "schema": "dbt_test__audit", - "severity": "ERROR", - "store_failures": null, - "store_failures_as": null, - "tags": [], - "warn_if": "!= 0", - "where": null - }, - "contract": { - "alias_types": true, - "checksum": null, - "enforced": false - }, - "created_at": 1733768712.796554, - "database": "postgres", - "depends_on": { - "macros": [ - "macro.dbt.test_unique" - ], - "nodes": [ - "model.jaffle_shop.stg_payments" - ] - }, - "description": "", - "docs": { - "node_color": null, - "show": true - }, - "file_key_name": "models.stg_payments", - "fqn": [ - "jaffle_shop", - "staging", - "unique_stg_payments_payment_id" - ], - "group": null, - "language": "sql", - "meta": {}, - "metrics": [], - "name": "unique_stg_payments_payment_id", - "original_file_path": "models/staging/schema.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "unique_stg_payments_payment_id.sql", - "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", - "refs": [ - { - "name": "stg_payments", - "package": null, - "version": null - } - ], - "relation_name": null, - "resource_type": "test", - "schema": "postgres_dbt_test__audit", - "sources": [], - "tags": [], - "test_metadata": { - "kwargs": { - "column_name": "payment_id", - "model": "{{ get_where_subquery(ref('stg_payments')) }}" - }, - "name": "unique", - "namespace": null - }, - "unique_id": "test.jaffle_shop.unique_stg_payments_payment_id.3744510712", + "unique_id": "test.jaffle_shop.unique_stg_payments_payment_id.3744510712", "unrendered_config": {} } }, "parent_map": { - "exposure.jaffle_shop.weekly_metrics": [ - "model.jaffle_shop.customers" - ], "model.jaffle_shop.customers": [ "model.jaffle_shop.stg_customers", "model.jaffle_shop.stg_orders", @@ -16316,24 +15369,17 @@ "model.jaffle_shop.stg_payments" ], "model.jaffle_shop.stg_customers": [ - "seed.jaffle_shop.raw_customers", - "source.jaffle_shop.postgres_db.raw_customers" + "seed.jaffle_shop.raw_customers" ], "model.jaffle_shop.stg_orders": [ - "seed.jaffle_shop.raw_customers", - "source.jaffle_shop.postgres_db.raw_orders" + "seed.jaffle_shop.raw_orders" ], "model.jaffle_shop.stg_payments": [ - "seed.jaffle_shop.raw_customers", - "source.jaffle_shop.postgres_db.raw_payments" + "seed.jaffle_shop.raw_payments" ], - "model.jaffle_shop.\uff4d\uff55\uff4c\uff54\uff49\uff42\uff59\uff54\uff45": [], "seed.jaffle_shop.raw_customers": [], "seed.jaffle_shop.raw_orders": [], "seed.jaffle_shop.raw_payments": [], - "source.jaffle_shop.postgres_db.raw_customers": [], - "source.jaffle_shop.postgres_db.raw_orders": [], - "source.jaffle_shop.postgres_db.raw_payments": [], "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3": [ "model.jaffle_shop.orders" ], @@ -16380,24 +15426,6 @@ "model.jaffle_shop.customers", "model.jaffle_shop.orders" ], - "test.jaffle_shop.source_not_null_postgres_db_raw_customers_id.de3e9fff76": [ - "source.jaffle_shop.postgres_db.raw_customers" - ], - "test.jaffle_shop.source_not_null_postgres_db_raw_orders_id.0dc5a4d454": [ - "source.jaffle_shop.postgres_db.raw_orders" - ], - "test.jaffle_shop.source_not_null_postgres_db_raw_payments_id.15f4f169e7": [ - "source.jaffle_shop.postgres_db.raw_payments" - ], - "test.jaffle_shop.source_unique_postgres_db_raw_customers_id.6e5ad1d707": [ - "source.jaffle_shop.postgres_db.raw_customers" - ], - "test.jaffle_shop.source_unique_postgres_db_raw_orders_id.0bf2272247": [ - "source.jaffle_shop.postgres_db.raw_orders" - ], - "test.jaffle_shop.source_unique_postgres_db_raw_payments_id.a4bd02775f": [ - "source.jaffle_shop.postgres_db.raw_payments" - ], "test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1": [ "model.jaffle_shop.customers" ], @@ -16417,190 +15445,6 @@ "saved_queries": {}, "selectors": {}, "semantic_models": {}, - "sources": { - "source.jaffle_shop.postgres_db.raw_customers": { - "columns": { - "id": { - "constraints": [], - "data_type": null, - "description": "", - "meta": {}, - "name": "id", - "quote": null, - "tags": [] - } - }, - "config": { - "enabled": true - }, - "created_at": 1733768712.8533492, - "database": "postgres", - "description": "", - "external": null, - "fqn": [ - "jaffle_shop", - "staging", - "postgres_db", - "raw_customers" - ], - "freshness": { - "error_after": { - "count": null, - "period": null - }, - "filter": null, - "warn_after": { - "count": null, - "period": null - } - }, - "identifier": "raw_customers", - "loaded_at_field": null, - "loader": "", - "meta": {}, - "name": "raw_customers", - "original_file_path": "models/staging/sources.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "models/staging/sources.yml", - "quoting": { - "column": null, - "database": null, - "identifier": null, - "schema": null - }, - "relation_name": "\"postgres\".\"postgres\".\"raw_customers\"", - "resource_type": "source", - "schema": "postgres", - "source_description": "", - "source_meta": {}, - "source_name": "postgres_db", - "tags": [], - "unique_id": "source.jaffle_shop.postgres_db.raw_customers", - "unrendered_config": {} - }, - "source.jaffle_shop.postgres_db.raw_orders": { - "columns": { - "id": { - "constraints": [], - "data_type": null, - "description": "", - "meta": {}, - "name": "id", - "quote": null, - "tags": [] - } - }, - "config": { - "enabled": true - }, - "created_at": 1733768712.8575401, - "database": "postgres", - "description": "", - "external": null, - "fqn": [ - "jaffle_shop", - "staging", - "postgres_db", - "raw_orders" - ], - "freshness": { - "error_after": { - "count": null, - "period": null - }, - "filter": null, - "warn_after": { - "count": 3650, - "period": "day" - } - }, - "identifier": "raw_orders", - "loaded_at_field": "CAST(order_date AS TIMESTAMP)", - "loader": "", - "meta": {}, - "name": "raw_orders", - "original_file_path": "models/staging/sources.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "models/staging/sources.yml", - "quoting": { - "column": null, - "database": null, - "identifier": null, - "schema": null - }, - "relation_name": "\"postgres\".\"postgres\".\"raw_orders\"", - "resource_type": "source", - "schema": "postgres", - "source_description": "", - "source_meta": {}, - "source_name": "postgres_db", - "tags": [], - "unique_id": "source.jaffle_shop.postgres_db.raw_orders", - "unrendered_config": {} - }, - "source.jaffle_shop.postgres_db.raw_payments": { - "columns": { - "id": { - "constraints": [], - "data_type": null, - "description": "", - "meta": {}, - "name": "id", - "quote": null, - "tags": [] - } - }, - "config": { - "enabled": true - }, - "created_at": 1733768712.855905, - "database": "postgres", - "description": "", - "external": null, - "fqn": [ - "jaffle_shop", - "staging", - "postgres_db", - "raw_payments" - ], - "freshness": { - "error_after": { - "count": null, - "period": null - }, - "filter": null, - "warn_after": { - "count": null, - "period": null - } - }, - "identifier": "raw_payments", - "loaded_at_field": null, - "loader": "", - "meta": {}, - "name": "raw_payments", - "original_file_path": "models/staging/sources.yml", - "package_name": "jaffle_shop", - "patch_path": null, - "path": "models/staging/sources.yml", - "quoting": { - "column": null, - "database": null, - "identifier": null, - "schema": null - }, - "relation_name": "\"postgres\".\"postgres\".\"raw_payments\"", - "resource_type": "source", - "schema": "postgres", - "source_description": "", - "source_meta": {}, - "source_name": "postgres_db", - "tags": [], - "unique_id": "source.jaffle_shop.postgres_db.raw_payments", - "unrendered_config": {} - } - }, + "sources": {}, "unit_tests": {} } diff --git a/dev/dags/dbt/original_jaffle_shop/dbt_ls_models_staging.txt b/dev/dags/dbt/original_jaffle_shop/dbt_ls_models_staging.txt new file mode 100644 index 000000000..b8cc902ec --- /dev/null +++ b/dev/dags/dbt/original_jaffle_shop/dbt_ls_models_staging.txt @@ -0,0 +1,9 @@ +14:26:04 Running with dbt=1.6.9 +14:26:04 Registered adapter: exasol=1.6.2 +14:26:04 Found 5 models, 3 seeds, 20 tests, 0 sources, 0 exposures, 0 metrics, 366 macros, 0 groups, 0 semantic models +{"name": "stg_customers", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_customers.sql", "unique_id": "model.jaffle_shop.stg_customers", "alias": "stg_customers", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_customers"]}} +{"name": "stg_orders", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_orders.sql", "unique_id": "model.jaffle_shop.stg_orders", "alias": "stg_orders", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_orders"]}} +{"name": "stg_payments", "resource_type": "model", "package_name": "jaffle_shop", "original_file_path": "models/staging/stg_payments.sql", "unique_id": "model.jaffle_shop.stg_payments", "alias": "stg_payments", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": [], "nodes": ["seed.jaffle_shop.raw_payments"]}} +{"name": "raw_customers", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_customers.csv", "unique_id": "seed.jaffle_shop.raw_customers", "alias": "raw_customers", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} +{"name": "raw_orders", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_orders.csv", "unique_id": "seed.jaffle_shop.raw_orders", "alias": "raw_orders", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} +{"name": "raw_payments", "resource_type": "seed", "package_name": "jaffle_shop", "original_file_path": "seeds/raw_payments.csv", "unique_id": "seed.jaffle_shop.raw_payments", "alias": "raw_payments", "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": null, "post-hook": [], "pre-hook": []}, "tags": [], "depends_on": {"macros": []}} diff --git a/dev/dags/dbt/original_jaffle_shop/profiles.yml b/dev/dags/dbt/original_jaffle_shop/profiles.yml new file mode 100644 index 000000000..537c6112e --- /dev/null +++ b/dev/dags/dbt/original_jaffle_shop/profiles.yml @@ -0,0 +1,19 @@ +airflow_db: + target: dev + outputs: + dev: + type: postgres + host: postgres + user: postgres + password: postgres + port: 5432 + dbname: postgres + schema: public + threads: 4 + bq: + type: bigquery + method: service-account + project: observability-sandbox-344122 + schema: "{{ env_var('DEMO_SCHEMA', 'moonactive') }}" + threads: 2 + keyfile: /usr/local/airflow/dbt/jaffle_shop/key.json diff --git a/dev/dags/example_cosmos_sources.py b/dev/dags/example_cosmos_sources.py index 25ab2c872..37b500e83 100644 --- a/dev/dags/example_cosmos_sources.py +++ b/dev/dags/example_cosmos_sources.py @@ -35,7 +35,7 @@ profile_config = ProfileConfig( profile_name="postgres_profile", target_name="dev", - profiles_yml_filepath=(DBT_ROOT_PATH / "jaffle_shop/profiles.yml"), + profiles_yml_filepath=(DBT_ROOT_PATH / "altered_jaffle_shop/profiles.yml"), ) diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index 0391cc73d..59d71869d 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -31,6 +31,7 @@ DBT_PROJECTS_ROOT_DIR = Path(__file__).parent.parent.parent / "dev/dags/dbt" DBT_PROJECT_NAME = "jaffle_shop" +ALTERED_DBT_PROJECT_NAME = "altered_jaffle_shop" SAMPLE_MANIFEST = Path(__file__).parent.parent / "sample/manifest.json" SAMPLE_MANIFEST_PY = Path(__file__).parent.parent / "sample/manifest_python.json" SAMPLE_MANIFEST_MODEL_VERSION = Path(__file__).parent.parent / "sample/manifest_model_version.json" @@ -56,6 +57,23 @@ def tmp_dbt_project_dir(): shutil.rmtree(tmp_dir, ignore_errors=True) # delete directory +@pytest.fixture +def tmp_altered_dbt_project_dir(): + """ + Creates a plain dbt project structure, which does not contain logs or target folders. + """ + source_proj_dir = DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME + + tmp_dir = Path(tempfile.mkdtemp()) + target_proj_dir = tmp_dir / ALTERED_DBT_PROJECT_NAME + shutil.copytree(source_proj_dir, target_proj_dir) + shutil.rmtree(target_proj_dir / "logs", ignore_errors=True) + shutil.rmtree(target_proj_dir / "target", ignore_errors=True) + yield tmp_dir + + shutil.rmtree(tmp_dir, ignore_errors=True) # delete directory + + @pytest.fixture def postgres_profile_config() -> ProfileConfig: return ProfileConfig( @@ -456,14 +474,14 @@ def test_load_via_dbt_ls_does_not_create_target_logs_in_original_folder( @pytest.mark.integration def test_load_via_dbt_ls_with_exclude(postgres_profile_config): - project_config = ProjectConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME) + project_config = ProjectConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME) render_config = RenderConfig( - dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME, + dbt_project_path=DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME, select=["*customers*"], exclude=["*orders*"], source_rendering_behavior=SOURCE_RENDERING_BEHAVIOR, ) - execution_config = ExecutionConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME) + execution_config = ExecutionConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME) dbt_graph = DbtGraph( project=project_config, render_config=render_config, @@ -497,18 +515,21 @@ def test_load_via_dbt_ls_with_exclude(postgres_profile_config): "model.jaffle_shop.stg_orders", "model.jaffle_shop.stg_payments", ] - assert sample_node.file_path == DBT_PROJECTS_ROOT_DIR / "jaffle_shop/models/customers.sql" + assert sample_node.file_path == DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME / "models/customers.sql" @pytest.mark.integration -@pytest.mark.parametrize("project_name", ("jaffle_shop", "jaffle_shop_python")) -def test_load_via_dbt_ls_without_exclude(project_name, postgres_profile_config): - project_config = ProjectConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name) +@pytest.mark.parametrize( + "project_dir,node_count", + [(DBT_PROJECTS_ROOT_DIR / ALTERED_DBT_PROJECT_NAME, 39), (DBT_PROJECTS_ROOT_DIR / "jaffle_shop_python", 28)], +) +def test_load_via_dbt_ls_without_exclude(project_dir, node_count, postgres_profile_config): + project_config = ProjectConfig(dbt_project_path=project_dir) render_config = RenderConfig( - dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME, + dbt_project_path=project_dir, source_rendering_behavior=SOURCE_RENDERING_BEHAVIOR, ) - execution_config = ExecutionConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME) + execution_config = ExecutionConfig(dbt_project_path=project_dir) dbt_graph = DbtGraph( project=project_config, render_config=render_config, @@ -518,7 +539,7 @@ def test_load_via_dbt_ls_without_exclude(project_name, postgres_profile_config): dbt_graph.load_via_dbt_ls() assert dbt_graph.nodes == dbt_graph.filtered_nodes - assert len(dbt_graph.nodes) == 39 + assert len(dbt_graph.nodes) == node_count def test_load_via_custom_without_project_path(): @@ -591,7 +612,7 @@ def test_load_via_dbt_ls_with_invalid_dbt_path(mock_which): @pytest.mark.parametrize("load_method", ["load_via_dbt_ls", "load_from_dbt_manifest"]) @pytest.mark.integration def test_load_via_dbt_ls_with_sources(load_method): - project_name = "jaffle_shop" + project_name = ALTERED_DBT_PROJECT_NAME dbt_graph = DbtGraph( project=ProjectConfig( dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name, @@ -845,18 +866,18 @@ def test_load_via_dbt_ls_with_runtime_error_in_stdout(mock_popen_communicate, po mock_popen_communicate.assert_called_once() -@pytest.mark.parametrize("project_name", ("jaffle_shop", "jaffle_shop_python")) -def test_load_via_load_via_custom_parser(project_name): +@pytest.mark.parametrize("project_name,nodes_count", [("altered_jaffle_shop", 29), ("jaffle_shop_python", 28)]) +def test_load_via_load_via_custom_parser(project_name, nodes_count): project_config = ProjectConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name) - execution_config = ExecutionConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME) + execution_config = ExecutionConfig(dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name) render_config = RenderConfig( - dbt_project_path=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME, + dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name, source_rendering_behavior=SOURCE_RENDERING_BEHAVIOR, ) profile_config = ProfileConfig( profile_name="test", target_name="test", - profiles_yml_filepath=DBT_PROJECTS_ROOT_DIR / DBT_PROJECT_NAME / "profiles.yml", + profiles_yml_filepath=DBT_PROJECTS_ROOT_DIR / project_name / "profiles.yml", ) dbt_graph = DbtGraph( project=project_config, @@ -868,7 +889,7 @@ def test_load_via_load_via_custom_parser(project_name): dbt_graph.load_via_custom_parser() assert dbt_graph.nodes == dbt_graph.filtered_nodes - assert len(dbt_graph.nodes) == 29 + assert len(dbt_graph.nodes) == nodes_count def test_load_via_load_via_custom_parser_select_rendering_config(): @@ -1389,7 +1410,7 @@ def test_load_via_dbt_ls_with_project_config_vars(): Integration that tests that the dbt ls command is successful and that the node affected by the dbt_vars is rendered correctly. """ - project_name = "jaffle_shop" + project_name = ALTERED_DBT_PROJECT_NAME dbt_graph = DbtGraph( project=ProjectConfig( dbt_project_path=DBT_PROJECTS_ROOT_DIR / project_name, @@ -1411,7 +1432,7 @@ def test_load_via_dbt_ls_with_project_config_vars(): @pytest.mark.integration -def test_load_via_dbt_ls_with_selector_arg(tmp_dbt_project_dir, postgres_profile_config): +def test_load_via_dbt_ls_with_selector_arg(tmp_altered_dbt_project_dir, postgres_profile_config): """ Tests that the dbt ls load method is successful if a selector arg is used with RenderConfig and that the filtered nodes are expected. @@ -1426,13 +1447,13 @@ def test_load_via_dbt_ls_with_selector_arg(tmp_dbt_project_dir, postgres_profile value: stg_customers parents: true """ - with open(tmp_dbt_project_dir / DBT_PROJECT_NAME / "selectors.yml", "w") as f: + with open(tmp_altered_dbt_project_dir / ALTERED_DBT_PROJECT_NAME / "selectors.yml", "w") as f: f.write(selectors_yaml) - project_config = ProjectConfig(dbt_project_path=tmp_dbt_project_dir / DBT_PROJECT_NAME) - execution_config = ExecutionConfig(dbt_project_path=tmp_dbt_project_dir / DBT_PROJECT_NAME) + project_config = ProjectConfig(dbt_project_path=tmp_altered_dbt_project_dir / ALTERED_DBT_PROJECT_NAME) + execution_config = ExecutionConfig(dbt_project_path=tmp_altered_dbt_project_dir / ALTERED_DBT_PROJECT_NAME) render_config = RenderConfig( - dbt_project_path=tmp_dbt_project_dir / DBT_PROJECT_NAME, + dbt_project_path=tmp_altered_dbt_project_dir / ALTERED_DBT_PROJECT_NAME, selector="stage_customers", source_rendering_behavior=SOURCE_RENDERING_BEHAVIOR, ) @@ -1574,9 +1595,9 @@ def test_save_dbt_ls_cache(mock_variable_set, mock_datetime, tmp_dbt_project_dir hash_dir, hash_args = version.split(",") assert hash_args == "d41d8cd98f00b204e9800998ecf8427e" if sys.platform == "darwin": - assert hash_dir == "c071049cc70ca52d74cf0845f15ae12d" + assert hash_dir == "2b0b0c3d243f9bfdda0f60b56ab65836" else: - assert hash_dir == "a432b2d06e6badd7c00dbaf4141d7292" + assert hash_dir == "cd0535d9a4acb972d74e49eaab85fb6f" @pytest.mark.integration diff --git a/tests/dbt/test_project.py b/tests/dbt/test_project.py index df625182f..161b32f46 100644 --- a/tests/dbt/test_project.py +++ b/tests/dbt/test_project.py @@ -14,7 +14,7 @@ def test_create_symlinks(tmp_path): tmp_dir = tmp_path / "dbt-project" tmp_dir.mkdir() - create_symlinks(DBT_PROJECTS_ROOT_DIR / "jaffle_shop", tmp_dir, False) + create_symlinks(DBT_PROJECTS_ROOT_DIR / "altered_jaffle_shop", tmp_dir, False) for child in tmp_dir.iterdir(): assert child.is_symlink() assert child.name not in ("logs", "target", "profiles.yml", "dbt_packages") diff --git a/tests/operators/test_local.py b/tests/operators/test_local.py index d5e9c1724..464ca2e92 100644 --- a/tests/operators/test_local.py +++ b/tests/operators/test_local.py @@ -439,10 +439,12 @@ def test_dbt_test_local_operator_invocation_mode_methods(mock_extract_log_issues def test_run_operator_dataset_inlets_and_outlets(caplog): from airflow.datasets import Dataset + project_dir = Path(__file__).parent.parent.parent / "dev/dags/dbt/altered_jaffle_shop" + with DAG("test-id-1", start_date=datetime(2022, 1, 1)) as dag: seed_operator = DbtSeedLocalOperator( profile_config=real_profile_config, - project_dir=DBT_PROJ_DIR, + project_dir=project_dir, task_id="seed", dbt_cmd_flags=["--select", "raw_customers"], install_deps=True, @@ -450,7 +452,7 @@ def test_run_operator_dataset_inlets_and_outlets(caplog): ) run_operator = DbtRunLocalOperator( profile_config=real_profile_config, - project_dir=DBT_PROJ_DIR, + project_dir=project_dir, task_id="run", dbt_cmd_flags=["--models", "stg_customers"], install_deps=True, @@ -458,7 +460,7 @@ def test_run_operator_dataset_inlets_and_outlets(caplog): ) test_operator = DbtTestLocalOperator( profile_config=real_profile_config, - project_dir=DBT_PROJ_DIR, + project_dir=project_dir, task_id="test", dbt_cmd_flags=["--models", "stg_customers"], install_deps=True, @@ -599,7 +601,7 @@ def test_run_operator_dataset_url_encoded_names(caplog): with DAG("test-id-1", start_date=datetime(2022, 1, 1)) as dag: run_operator = DbtRunLocalOperator( profile_config=real_profile_config, - project_dir=Path(__file__).parent.parent.parent / "dev/dags/dbt/jaffle_shop", + project_dir=Path(__file__).parent.parent.parent / "dev/dags/dbt/altered_jaffle_shop", task_id="run", dbt_cmd_flags=["--models", "multibyte"], install_deps=True,