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

chore(dbt-sync): Allow the specification of dbt models using their path #242

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

Vitor-Avila
Copy link
Contributor

@Vitor-Avila Vitor-Avila commented Sep 8, 2023

This PR adds the ability to specify the models that should be synced using their relative path. Both specifying files (for example --select models/my_model.sql) and folders (for example --select models/prod) work. When selecting a folder, it supports the inclusion or not of the last trailing slash(--select models/prod == --select models/prod/).

It's also possible to use * after the folder name, however for this approach it's required to pass the argument as a string -> --select "models/prod/*" otherwise the terminal automatically creates one argument per file, breaking the CLI.

Implements #217 and #171.

@dweaver33
Copy link

Would this allow us to pass the file list like this?

--select models/my_model.sql models/my_model2.sql models/my_model3.sql

@Vitor-Avila
Copy link
Contributor Author

Would this allow us to pass the file list like this?

--select models/my_model.sql models/my_model2.sql models/my_model3.sql

@dweaver33 not really, you would have to add one --select tag per file, or combine the files in a directory and use the directory instead:

--select models/my_model.sql --select models/my_model2.sql --select models/my_model3.sql

@dweaver33
Copy link

Would this allow us to pass the file list like this?
--select models/my_model.sql models/my_model2.sql models/my_model3.sql

@dweaver33 not really, you would have to add one --select tag per file, or combine the files in a directory and use the directory instead:

--select models/my_model.sql --select models/my_model2.sql --select models/my_model3.sql

Ah, ok. I think I can work with this limitation.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

This is awesome!

@Vitor-Avila Vitor-Avila merged commit 8ce534a into main Sep 11, 2023
4 checks passed
@Vitor-Avila Vitor-Avila deleted the dbt_file_name_path branch September 11, 2023 20:49
@dweaver33
Copy link

@Vitor-Avila, what's the timeline for cutting a release with this PR in it? We are eagerly awaiting. 😄

@Vitor-Avila
Copy link
Contributor Author

@dweaver33 wait no more! Just released version 0.2.8 including this change. Let me know if you face any issues to use this functionality.

@dweaver33
Copy link

Thank you! We'll be testing over the next few weeks

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

3 participants