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

Bug when using tags and multiple sub-projects #195

Open
OlegIvashov opened this issue Nov 27, 2024 · 0 comments
Open

Bug when using tags and multiple sub-projects #195

OlegIvashov opened this issue Nov 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@OlegIvashov
Copy link

Scenario:

I have models and snapshots in my dbt sub-project. I tagged the models in dbt_project.yml, but not the snapshots. When running the build using the --select switch and tags, for example:

dbt_wrapper run-all investment --select "tag:investment"
The build correctly creates "model" notebooks and skips the snapshots notebook. However, it generates master_investment_notebook_(NN) incorrectly. For example, master_investment_notebook_1 will have a blank list of notebooks to run, as shown in the Function section:

notebook_files1 = []  # type: ignore
run_order1 = 1  # type: ignore

# Define a function to execute a notebook and return the results
@dataclass

To Reproduce
Steps to reproduce the behavior:

  1. Create a sub-project. the sub-project should have models and snapshots. Let's assume that sub-project name is "investment"
  2. tag models only in dbt_project.yml, use tag "investment"
  3. run the build using tags: dbt_wrapper run-all statestreet --select "tag:statestreet"
  4. Check the output (target folder). one of the master_investment_notebook_s will have blank list of notebooks to run

Expected behavior
The dbt should build the DAG correctly and skip snapshots as they are not tagged.

Screenshots
image

image

@OlegIvashov OlegIvashov added the bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant