Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildable indirect selection mode #2568

Closed
1 task done
dbeatty10 opened this issue Dec 13, 2022 · 0 comments · Fixed by #2858
Closed
1 task done

buildable indirect selection mode #2568

dbeatty10 opened this issue Dec 13, 2022 · 0 comments · Fixed by #2858
Labels
content Improvements or additions to content dbt-core v1.4 Docs impact for the v1.4 release (Jan 2023)

Comments

@dbeatty10
Copy link
Contributor

Contributions

  • I am a PM or subject matter expert at dbt who is responsible for this feature.

Where does this content belong?

https://docs.getdbt.com/reference/node-selection/test-selection-examples#indirect-selection

Link to source material

Links

Who will use this feature?

The intended audience is an analytics engineer iteratively developing a subset of the DAG, likely modifying pre-existing models.

Feature description how it will help people

"This will benefit developers who are testing changes on a subset of the graph, rather than building the entire graph."
The author's organization typically has tests that compare models with their dependencies. e.g. confirm that the transactions add up to the same amount -- if they differ, that would be bad! During development, the'd want to run the minimal number of nodes to check that things are working rather than running the entire DAG.

Customer feedback and research

Community member @AGPapa recognized the need and opened a pull request with a solution 💪 @MichelleArk has dealt with similarly complex and specialized selection criteria with a large DAG shared over multiple teams.

How can we test or use this feature?

  1. Create model model_a (probably as a seed file)
  2. Create model model_b that depends only on model_a
  3. Create model model_c that depends only on model_b
  4. Create test test_ab that depends on model_a and model_b
  5. Create test test_cb that depends on model_c and model_b

To compare the 3 modes:

dbt test --select model_b --indirect-selection=buildable
dbt test --select model_b --indirect-selection=cautious
dbt test --select model_b --indirect-selection=eager

Screenshot

Example of which modes will select each multi-parent test:

image

🚧 How could the existing page be improved?

A few things within this section:

  1. There is no stand-alone example for indirect_selection: cautious in a yaml selector
  2. The indirect selection section is verbose, but some of us aren't good at reading long text (this guy!) 😬
  3. $ dbt test --select customers orders is included, but not explained
@dbeatty10 dbeatty10 added content Improvements or additions to content idea Proposes an idea for new content dbt-core v1.4 Docs impact for the v1.4 release (Jan 2023) labels Dec 13, 2022
@jtcohen6 jtcohen6 added the blocked_by_dev Awaiting merge of PR with associated functionality label Jan 2, 2023
@jtcohen6 jtcohen6 added dbt-core v1.4 Docs impact for the v1.4 release (Jan 2023) and removed dbt-core v1.4 Docs impact for the v1.4 release (Jan 2023) blocked_by_dev Awaiting merge of PR with associated functionality labels Jan 10, 2023
@runleonarun runleonarun removed the idea Proposes an idea for new content label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt-core v1.4 Docs impact for the v1.4 release (Jan 2023)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants