Skip to content

Commit

Permalink
Merge pull request #7 from fishtown-analytics/fix/missing_primary_key
Browse files Browse the repository at this point in the history
Ensure compare_relations results are ordered by primary key
  • Loading branch information
Claire Carroll authored Jul 11, 2019
2 parents f2e45a5 + 422c5b7 commit 479461c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion macros/compare_queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ summary_stats as (
-- order by {{ primary_key ~ ", " if primary_key is not none }} in_a desc, in_b desc

select * from summary_stats

order by in_a desc, in_b desc

{% endmacro %}
2 changes: 1 addition & 1 deletion macros/compare_relations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ select
from {{ b_relation }}
{% endset %}

{{ audit_helper.compare_queries(a_query, b_query) }}
{{ audit_helper.compare_queries(a_query, b_query, primary_key) }}

{% endmacro %}

0 comments on commit 479461c

Please sign in to comment.