You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
tl;dr: Unions should be able to handle empty sets. There is no programming language which crashes when doing the union of empty arrays/list/sets/etc.
When doing unions in an evolving project, models will come and go (and thus some selections/sets may be empty). However, dbt seems unable to handle this, and returns an error instead.
For example: dbt ls -s something,tag:one something,tag:two ...
If the last tag:one or tag:two model is removed from something, then the entire selection will fail, and as a result the entire job/pipeline will fail also.
Error message:
Compilation Error
The selection criterion 'something,tag:one|two' does not match any enabled nodes
Expected Behavior
Empty sets are simply ignored.
Or maybe introduce a new parameter in the CLI, something like --ignore-empty-sets, or --ignore-empty-selection. It should be a fairly simple change: if the parameter is set, do not throw this error. It would be the most explicit option, while also preserving backward-compatibility.
Alternatives Considered
Excluding anything which is neither tag:one or tag:two (i.e. dbt ls -s something --exclude tag:not_one_or_two), but there is no way to do this currently.
Is this a new bug in dbt-core?
Current Behavior
tl;dr: Unions should be able to handle empty sets. There is no programming language which crashes when doing the union of empty arrays/list/sets/etc.
When doing unions in an evolving project, models will come and go (and thus some selections/sets may be empty). However, dbt seems unable to handle this, and returns an error instead.
For example:
dbt ls -s something,tag:one something,tag:two ...
If the last
tag:one
ortag:two
model is removed fromsomething
, then the entire selection will fail, and as a result the entire job/pipeline will fail also.Error message:
Expected Behavior
Empty sets are simply ignored.
Or maybe introduce a new parameter in the CLI, something like
--ignore-empty-sets
, or--ignore-empty-selection
. It should be a fairly simple change: if the parameter is set, do not throw this error. It would be the most explicit option, while also preserving backward-compatibility.Alternatives Considered
tag:one
ortag:two
(i.e.dbt ls -s something --exclude tag:not_one_or_two
), but there is no way to do this currently.dbt ls -s something,selector:one_or_two
), but that is not supported currently (edit: see issue [Feature] addselector:
method to combine YAML selectors with command line selection #10992).Steps To Reproduce
Do a union with an empty set. See above for more details.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
Any.
Additional Context
No response
The text was updated successfully, but these errors were encountered: