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

fix: --exclude in dbt sync #109

Merged
merged 1 commit into from
Oct 11, 2022
Merged

fix: --exclude in dbt sync #109

merged 1 commit into from
Oct 11, 2022

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Oct 11, 2022

The --exclude option for dbt nodes was failing for a couple reasons:

  • If a node was excluded without being included in the --select parameters.
  • If a node was referenced twice in the --exclude the second exclusion would fail because the node no longer existed.

Comment on lines -389 to -390
if not select:
return models
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this was wrong. We should only return all models if exclude is also falsy.

@betodealmeida betodealmeida merged commit 629a30a into main Oct 11, 2022
@betodealmeida betodealmeida changed the title fix: prevent node from being excluded twice fix: --exclude in dbt sync Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant