forked from astronomer/astronomer-cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for dbt
selector
arg for DAG parsing (astronomer#755)
=This PR adds support for a new `selector` arg in `RenderConfig` so users can reference[ dbt yaml selectors](https://docs.getdbt.com/reference/node-selection/yaml-selectors) when rendering a project using dbt ls by adding the `--selector` arg to the cli command. This was pretty straightforward for dbt ls, though in order to support custom and manifest filtering we would need to add logic for translating the yaml selector definitions in follow up PR(s). Added a coverage test and integration test here, and a small update in `tests/dbt/test_graph.py` to use a fixture for a ProfileConfig that is repeated 9 times. An open question I have is whether we want to log a warning in `RenderConfig.__post_init__` if a user uses both `select`/`exclude` with `selector`. dbt docs [here](https://docs.getdbt.com/reference/node-selection/syntax#examples) state that when using `--selector` with `--exclude` and/or `--select` the select/exclude flags are ignored (no error or warnings are logged by dbt if both are used). Closes astronomer#718
- Loading branch information
Showing
5 changed files
with
170 additions
and
83 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
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
Oops, something went wrong.