Open jtcohen6 opened 1 year ago
Related: Interactive command documentation
As discussed in refinement:
Exp/IDE. They will need to start passing --indirect-selection empty when doing --select interactive compiles/previews.
@jtcohen6 What is the timeline on this?
@jtcohen6 What is the timeline on this?
I believe they're now doing this (slack thread), so no outstanding blockers here
Housekeeping
Short description
When "interactive"
dbt compile
ordbt show
are passed selection criteria that selects a single node, always include that node's compiled/previewed result in the logs.If:
defined_in
version config--select path:<path/to/file>
method to unambiguously identify that resource (plus--indirect-selection empty
to exclude any tests defined on that model)Current state: Because the model's
name
is not explicitly included in the--select
argument, the compiled/previewed result is missing from the logs.Acceptance state:
dbt show
always includes the compiled/previewed result if exactly one node has been selected for compilation/preview.Acceptance criteria
Following the test case described above — a versioned model with a
name
different from itsdefined_in
file name, with generic tests defined on it:dbt compile --select path:<path/to/versioned/model/file> --indirect-selection empty
anddbt show --select path:<path/to/versioned/model/file> --indirect-selection empty
do not include the compiled/previewed result in the logsImpact to Other Teams
Exp/IDE. They will need to start passing
--indirect-selection empty
when doing--select
interactive compiles/previews.Will backports be required?
1.5.latest + 1.6.latest
Context
Currently, both "interactive" commands (
dbt compile
anddbt show
) require that a model'sname
be explicitly included in the--select
argument, when deciding which compiled / previewed result(s) to include in log output:https://github.com/dbt-labs/dbt-core/blob/582faa129e8516bae38a4d42d4f8ed7892d4a99a/core/dbt/task/compile.py#L79-L83
https://github.com/dbt-labs/dbt-core/blob/582faa129e8516bae38a4d42d4f8ed7892d4a99a/core/dbt/task/show.py#L67-L70
While this is nice as a way of supporting
dbt show --select model_one model_two
, it also limits the other types of selection criteria (namelypath:
selection) that can be used to unambiguously select a single resource.