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

Update reference-models-in-another-project.md #4209

Merged
merged 13 commits into from
Oct 10, 2023
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions website/docs/faqs/Models/reference-models-in-another-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ title: How can I reference models or macros in another project?
description: "Use packages to add another project to your dbt project"
sidebar_label: 'Reference models or macros in another project'
id: reference-models-in-another-project

keywords:
- project dependency, project dependencies, ref project, dbt mesh, multi-project, mesh, cross-project dependencies
---

You can use [packages](/docs/build/packages) to add another project to your dbt
project, including other projects you've created. Check out the [docs](/docs/build/packages)
for more information!
In dbt, you can manage dependencies across multiple dbt projects using:

1. **Packages**: You can install [packages](/docs/build/packages) as a way to add another project to your dbt project, including other projects you've created. When you install a project as a package, you bring in its entire source code, making its macros and models available in your own project.

While this is useful for reusing code and sharing macros, it may not be the best approach for large-scale collaboration, especially in larger organizations.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
While this is useful for reusing code and sharing macros, it may not be the best approach for large-scale collaboration, especially in larger organizations.
This is a useful way to share macros between projects, but is impractical for sharing models at scale because the importing project has to process the full source code of the upstream project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gotcha, thanks for testing that @joellabes ! I've added the lowercase redirect but i don't think there's any other way around it. I'm going to cc @john-rock @JKarlavige or @breezyfasano in case they have more insight?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok tested it and it worked! thanks @joellabes !

Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding a redirect is definitely the quickest fix. I have a task to look into the Vercel URLs to see how we can serve the same page both lower and capital case in URLs. Here's a link to the ticket https://app.asana.com/0/1200099998847559/1205508339405074/f


2. **Project dependencies**: You can use [project dependencies](/docs/collaborate/govern/project-dependencies) as an exciting way to depend on another project using the metadata service in dbt Cloud. It instantly resolves references to public models defined in other projects. You don't need to execute or analyze these upstream models yourself. Instead, you treat them as an API that returns a dataset. The responsibility for maintaining the quality and stability of these public models lies with their respective maintainers.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

This approach offers more flexibility and scalability for collaboration, making it easier to work with external projects while ensuring data quality and consistency.