Skip to content

Commit

Permalink
Merge pull request #2414 from mikaelene/alias_returned_columns
Browse files Browse the repository at this point in the history
alias for schema tests macros
  • Loading branch information
beckjake authored May 7, 2020
2 parents 784ab79 + 868a447 commit 0f4a369
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ validation_errors as (
)
)

select count(*)
select count(*) as validation_errors
from validation_errors

{% endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}

select count(*)
select count(*) as validation_errors
from {{ model }}
where {{ column_name }} is null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set column_name = kwargs.get('column_name', kwargs.get('from')) %}


select count(*)
select count(*) as validation_errors
from (
select {{ column_name }} as id from {{ model }}
) as child
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}

select count(*)
select count(*) as validation_errors
from (

select
Expand Down

0 comments on commit 0f4a369

Please sign in to comment.