[CT-3096] Refactor selection + dbt list
output, for better consistency across node types
#8599
Labels
behavior_change_flag
Impact: Exp
paper_cut
A small change that impacts lots of users in their day-to-day
tech_debt
Behind-the-scenes changes, with little direct impact on end-user functionality
Based on conversation in #8546 / #8589 (comment)
What's the problem?
It's a bit odd that, for the purposes of listing & selection, we so strongly distinguish between:
(these are my recently invented terms, not officially established anywhere, and by no means set in stone)
Specific behaviors
dbt list
includes{node_type}:{node_package}.{node_name}
for the "pointer" node types, but then{node_fqn}
for the "logical" node typessource:*
,metric:*
), but this is not possible for "logical" nodesfqn:*
selection method only includes "logical" node typesAs an example:
The
models
are displayed by FQN. Thesemantic_models
are displayed bysemantic_model:{package}.{name}
. The idea is, you could copy-paste / pipe those string outputs and use as selectors. But wouldn't it be better if it were more consistent, and you could use them as selectors?Why is it like this?
This feels like an organic outgrowth of
source_name
+ tablename
).How could this be better?
Some potential acceptance criteria:
fqn:*
selector should actually include all nodes. Then we wouldn't need this wonky default selector.{node_type}:
syntax - either{node_type}:{node_fqn_part}
, or{node_type}:*
to select all nodes of that type. (Today, the workaround for "select all snapshots" is something like--select config.materialized:snapshot
, which is janky and not really documented.)resource_type:{type}
selection method, similar to the--resource-type
flag, but as an actual method that can be combined with other selection methods in unions/intersections.dbt list
should change to{node_type}:{node_fqn}
for all node types — or the default--output
should beunique_id
instead ofselector
.dbt ls
should include all resource types by default. The fact that it excludes analyses by default (and only analyses) is pretty confusing.Out of scope
Unrelated pet peeves about
dbt list
:print
orfire_event
depending on the--log-format
(!)--quiet
by default fordbt list --output json
#7994The text was updated successfully, but these errors were encountered: