-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Output a warning when star finds no columns, not '*' (#732)
* Change star() behaviour when no columns returned * Code review: return a * in compile mode
- Loading branch information
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
with data as ( | ||
|
||
select | ||
{{ dbt_utils.star(from=ref('data_star'), except=['field_1', 'field_2', 'field_3']) }} | ||
-- if star() returns `*` or a list of columns, this query will fail because there's no comma between the columns | ||
1 as canary_column | ||
from {{ ref('data_star') }} | ||
|
||
) | ||
|
||
select * from data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters