You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section compare_column_values -> Advanced usage - dbt Cloud contains a code snippet for replacing the .print_table() function, but the code snippet does not work in dbt cloud.
Steps to reproduce
Use the code snippet
{# in dbt Develop #}
{% set old_etl_relation_query %}
select * from public.dim_product
where is_latest
{% endset %}
{% set new_etl_relation_query %}
select * from {{ ref('dim_product') }}
{% endset %}
{% set audit_query = audit_helper.compare_column_values(
a_query=old_etl_relation_query,
b_query=new_etl_relation_query,
primary_key="product_id",
column_to_compare="status"
) %}
{% set audit_results = run_query(audit_query) %}
{% do log(audit_results.column_names, info=True) %}
{% for row in audit_results.rows %}
{% do log(row.values(), info=True) %}
{% endfor %}
As suggested by the readme, where the last 4 lines include the suggested code change to make this compatible with dbt cloud.
The actual expected results can be obtained by instead directly invoking the macro:
{# in dbt Develop #}
{% set old_etl_relation_query %}
select * from public.dim_product
where is_latest
{% endset %}
{% set new_etl_relation_query %}
select * from {{ ref('dim_product') }}
{% endset %}
{{ audit_helper.compare_column_values(
a_query=old_etl_relation_query,
b_query=new_etl_relation_query,
primary_key="product_id",
column_to_compare="status"
) }}
The text was updated successfully, but these errors were encountered:
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.
Describe the bug
The section
compare_column_values -> Advanced usage - dbt Cloud
contains a code snippet for replacing the.print_table()
function, but the code snippet does not work in dbt cloud.Steps to reproduce
Use the code snippet
As suggested by the readme, where the last 4 lines include the suggested code change to make this compatible with dbt cloud.
The actual expected results can be obtained by instead directly invoking the macro:
The text was updated successfully, but these errors were encountered: