dbt-labs / dbt-audit-helper

Useful macros when performing data audits
https://hub.getdbt.com/dbt-labs/audit_helper/latest/
Apache License 2.0
329 stars 40 forks source link

compare_all_columns not working on Presto #89

Closed evabilski closed 2 months ago

evabilski commented 12 months ago

Describe the bug

Function compare_all_columns does not work on Presto.

Steps to reproduce

Create test in Presto environment:

{{ audit_helper.compare_all_columns(
    a_relation=ref('test__old'),
    b_relation=ref('test__new'),
    primary_key="col_a"
)}}

Models to test (same query for each one):

select
 'a' AS col_a,
 'b' AS col_b

Screenshots and log output

line 29:7: mismatched input 'with'. Expecting: '(', 'SELECT', 'TABLE', 'VALUES'

System information

Which database are you using dbt with?

The output of dbt --version: dbt-labs/audit_helper version: 0.9.0

Additional context

line 45-51, WITH main as((WITH double parenthesis followed by WITH does not seem to be allowed. It works with one parenthesis.

Are you interested in contributing the fix?

I am going to suggest a PR

remilepriol commented 8 months ago

This would be very helpful for me as well. Meanwhile I am adding it as a project-wise adapter. Thank you for the fix @evabilski !

github-actions[bot] commented 2 months ago

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.

github-actions[bot] commented 2 months ago

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.