Skip to content

Commit

Permalink
Merge pull request #208 from DataRecce/feature/drc-258-bug-value-diff…
Browse files Browse the repository at this point in the history
…-does-not-work-in-postgres

[Bug] Fix value diff not working in postgres 14
  • Loading branch information
popcornylu authored Mar 5, 2024
2 parents 1d469db + d7d9f7c commit 359c425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recce/tasks/valuediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _verify_primary_key(self, dbt_context: DBTContext, primary_key: str, model:

query = r"""{{ adapter.dispatch('test_unique', 'dbt')(relation, column_name) }}"""
sql = dbt_context.generate_sql(query, base=False, context=context)
sql_test = f"""SELECT COUNT(*) AS INVALIDS FROM ({sql})"""
sql_test = f"""SELECT COUNT(*) AS INVALIDS FROM ({sql}) AS T"""

response, table = dbt_context.adapter.execute(sql_test, fetch=True)
for row in table.rows:
Expand Down

0 comments on commit 359c425

Please sign in to comment.