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

support dbt packages that are not located at the root directory of a repo #275

Closed
drewbanin opened this issue Feb 3, 2017 · 7 comments · Fixed by #3267
Closed

support dbt packages that are not located at the root directory of a repo #275

drewbanin opened this issue Feb 3, 2017 · 7 comments · Fixed by #3267
Labels
deps dbt's package manager enhancement New feature or request

Comments

@drewbanin
Copy link
Contributor

drewbanin commented Feb 3, 2017

via dbt slack:

question on dependency management. we initially have 2 services that we want to ‘own’ the initial model (transform) in our DW DB. specifically, we want them to run automated tests (in circleci) so that developers are prevented from making breaking changes to the source OLTP schema.

[2:54]
i believe ergonomically that means our service-a and service-b github repos have a ./dbt subfolder with some basic models (edited)

[2:55]
which the service can run/test as part of the normal release for the service (edited)

[2:55]
and then a shared bizint-models repo that consumes those base models for more complex analyses

[2:56]
however, it doesn’t look like the existing dependency management in dbt supports pulling from a small subdirectory in a (fairly large) service repo

@drewbanin drewbanin added the enhancement New feature or request label Feb 3, 2017
@jthandy
Copy link
Member

jthandy commented Oct 12, 2017

@cmcarthur take a look--this might be relevant to the stuff you're working on right now.

@cmcarthur
Copy link
Member

thanks @jthandy . there will indeed be an option to point to a local directory in a near future release

@jthandy jthandy added this to the Stephen Girard milestone Oct 25, 2018
@drewbanin drewbanin removed this from the Stephen Girard milestone Oct 29, 2018
@drewbanin drewbanin added the wontfix Not a bug or out of scope for dbt-core label Aug 6, 2019
@drewbanin
Copy link
Contributor Author

this is doable today with local packages - closing this.

@dmateusp
Copy link
Contributor

I understand the specific use case mentioned in the issue is handled by the local installation option.

Would you consider still adding the feature of supporting sub directories? In pip you can specify &subdirectory so we can just run one pip install rather than doing a separate git clone, I'd like to be able to do the same in dbt.

@jtcohen6
Copy link
Contributor

Would you consider still adding the feature of supporting sub directories?

@dmateusp I'm open to this! What do you have in mind?

Given that dbt deps is totally dependent on git for packages hosted on git providers or hub.getdbt.com, we'd need some git-friendly way to do this. I see that sparse checkout now exists as an experimental feature...

@dmateusp
Copy link
Contributor

@jtcohen6 I think the sparse checkout could be a good solution! I looked into how pip supports it, and it seems that they clone the whole repo https:/pypa/pip/blob/0dd3a2b84997e6d0cebcb7cf3e090e03bc2eedd9/src/pip/_internal/vcs/git.py#L358

@dmateusp
Copy link
Contributor

Should be ready for review: #3267

@jtcohen6 jtcohen6 reopened this Apr 15, 2021
@jtcohen6 jtcohen6 added packages Functionality for interacting with installed packages and removed wontfix Not a bug or out of scope for dbt-core labels Apr 15, 2021
yu-iskw pushed a commit to yu-iskw/dbt that referenced this issue Aug 17, 2021
@jtcohen6 jtcohen6 added deps dbt's package manager and removed packages Functionality for interacting with installed packages labels Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps dbt's package manager enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants