diff --git a/website/docs/docs/build/sql-models.md b/website/docs/docs/build/sql-models.md index a019508d370..bbf07986222 100644 --- a/website/docs/docs/build/sql-models.md +++ b/website/docs/docs/build/sql-models.md @@ -266,7 +266,7 @@ You can also document and test models — skip ahead to the section on [test - + diff --git a/website/docs/docs/dbt-versions/core-upgrade/09-upgrading-to-v1.6.md b/website/docs/docs/dbt-versions/core-upgrade/09-upgrading-to-v1.6.md index a989217b3cf..bbb2535a74c 100644 --- a/website/docs/docs/dbt-versions/core-upgrade/09-upgrading-to-v1.6.md +++ b/website/docs/docs/dbt-versions/core-upgrade/09-upgrading-to-v1.6.md @@ -75,7 +75,7 @@ Support for BigQuery coming soon. [**Deprecation date**](/reference/resource-properties/deprecation_date): Models can declare a deprecation date that will warn model producers and downstream consumers. This enables clear migration windows for versioned models, and provides a mechanism to facilitate removal of immature or little-used models, helping to avoid project bloat. -[Model names](/faqs/Models/unique-model-names) can be duplicated across different namespaces (projects/packages), so long as they are unique within each project/package. We strongly encourage using [two-argument `ref`](/reference/dbt-jinja-functions/ref#ref-project-specific-models) when referencing a model from a different package/project. +[Model names](/faqs/Project/unique-resource-names) can be duplicated across different namespaces (projects/packages), so long as they are unique within each project/package. We strongly encourage using [two-argument `ref`](/reference/dbt-jinja-functions/ref#ref-project-specific-models) when referencing a model from a different package/project. More consistency and flexibility around packages. Resources defined in a package will respect variable and global macro definitions within the scope of that package. - `vars` defined in a package's `dbt_project.yml` are now available in the resolution order when compiling nodes in that package, though CLI `--vars` and the root project's `vars` will still take precedence. See ["Variable Precedence"](/docs/build/project-variables#variable-precedence) for details. diff --git a/website/docs/faqs/Models/unique-model-names.md b/website/docs/faqs/Models/unique-model-names.md deleted file mode 100644 index 6d8bd18ac00..00000000000 --- a/website/docs/faqs/Models/unique-model-names.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Do model names need to be unique? -description: "Unique model names to build dependencies" -sidebar_label: 'Model names need to be unique' -id: unique-model-names - ---- - -Within one project: yes! To build dependencies between models, you need to use the `ref` function, and pass in the model name as an argument. dbt uses that model name to uniquely resolve the `ref` to a specific model. As a result, these model names need to be unique, _even if they are in distinct folders_. - -A model in one project can have the same name as a model in another project (installed as a dependency). dbt uses the project name to uniquely identify each model. We call this "namespacing." If you `ref` a model with a duplicated name, it will resolve to the model within the same namespace (package or project), or raise an error because of an ambiguous reference. Use [two-argument `ref`](/reference/dbt-jinja-functions/ref#ref-project-specific-models) to disambiguate references by specifying the namespace. - -Those models will still need to land in distinct locations in the data warehouse. Read the docs on [custom aliases](/docs/build/custom-aliases) and [custom schemas](/docs/build/custom-schemas) for details on how to achieve this. diff --git a/website/docs/faqs/Project/unique-resource-names.md b/website/docs/faqs/Project/unique-resource-names.md new file mode 100644 index 00000000000..1792f21c0f7 --- /dev/null +++ b/website/docs/faqs/Project/unique-resource-names.md @@ -0,0 +1,12 @@ +--- +title: Do ref-able resource names need to be unique? +description: "Unique resource names to build dependencies" +sidebar_label: 'Resource names need to be unique' +id: unique-resource-names +--- + +Within one project: yes! To build dependencies between resources (such as models, seeds, and snapshots), you need to use the `ref` function, and pass in the resource name as an argument. dbt uses that resource name to uniquely resolve the `ref` to a specific resource. As a result, these resource names need to be unique, _even if they are in distinct folders_. + +A resource in one project can have the same name as a resource in another project (installed as a dependency). dbt uses the project name to uniquely identify each resource. We call this "namespacing." If you `ref` a resource with a duplicated name, it will resolve to the resource within the same namespace (package or project), or raise an error because of an ambiguous reference. Use [two-argument `ref`](/reference/dbt-jinja-functions/ref#ref-project-specific-models) to disambiguate references by specifying the namespace. + +Those resource will still need to land in distinct locations in the data warehouse. Read the docs on [custom aliases](/docs/build/custom-aliases) and [custom schemas](/docs/build/custom-schemas) for details on how to achieve this. diff --git a/website/docs/guides/azure-synapse-analytics-qs.md b/website/docs/guides/azure-synapse-analytics-qs.md index ea70030d351..4f0285e6623 100644 --- a/website/docs/guides/azure-synapse-analytics-qs.md +++ b/website/docs/guides/azure-synapse-analytics-qs.md @@ -297,7 +297,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/docs/guides/bigquery-qs.md b/website/docs/guides/bigquery-qs.md index e608efeffc7..19a4ff8fbb0 100644 --- a/website/docs/guides/bigquery-qs.md +++ b/website/docs/guides/bigquery-qs.md @@ -299,7 +299,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/docs/guides/databricks-qs.md b/website/docs/guides/databricks-qs.md index bb248e09320..700da7198f6 100644 --- a/website/docs/guides/databricks-qs.md +++ b/website/docs/guides/databricks-qs.md @@ -425,7 +425,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/docs/guides/manual-install-qs.md b/website/docs/guides/manual-install-qs.md index b68c43db42d..2e10cdac07c 100644 --- a/website/docs/guides/manual-install-qs.md +++ b/website/docs/guides/manual-install-qs.md @@ -421,7 +421,7 @@ This time, when you performed a `dbt run`, separate views/tables were created fo ### FAQs {#faq-2} - + ### Next steps diff --git a/website/docs/guides/microsoft-fabric-qs.md b/website/docs/guides/microsoft-fabric-qs.md index c3800e63f7a..157ab2e6b89 100644 --- a/website/docs/guides/microsoft-fabric-qs.md +++ b/website/docs/guides/microsoft-fabric-qs.md @@ -314,7 +314,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/docs/guides/redshift-qs.md b/website/docs/guides/redshift-qs.md index 544c18a75d5..67b0da1b2d8 100644 --- a/website/docs/guides/redshift-qs.md +++ b/website/docs/guides/redshift-qs.md @@ -391,7 +391,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index 27ce6eebbd4..ede32a47f7e 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -921,7 +921,6 @@ metrics: - This semantic model uses simple metrics to focus on customer metrics and emphasizes customer dimensions like name, type, and order dates. It uniquely analyzes customer behavior, lifetime value, and order patterns. ## Test and query metrics diff --git a/website/docs/guides/snowflake-qs.md b/website/docs/guides/snowflake-qs.md index 01646691c8e..bc27d1e1a4f 100644 --- a/website/docs/guides/snowflake-qs.md +++ b/website/docs/guides/snowflake-qs.md @@ -408,7 +408,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + ## Build models on top of sources diff --git a/website/docs/guides/starburst-galaxy-qs.md b/website/docs/guides/starburst-galaxy-qs.md index 3863d80a1b8..316e392483d 100644 --- a/website/docs/guides/starburst-galaxy-qs.md +++ b/website/docs/guides/starburst-galaxy-qs.md @@ -414,7 +414,7 @@ Later, you can connect your business intelligence (BI) tools to these views and #### FAQs {#faq-2} - + diff --git a/website/vercel.json b/website/vercel.json index 0d45a879f4a..8fdf311e72f 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -2,6 +2,11 @@ "cleanUrls": true, "trailingSlash": false, "redirects": [ + { + "source": "/faqs/Models/unique-model-names", + "destination": "/faqs/Project/unique-resource-names", + "permanent": true + }, { "source": "/docs/deploy/dashboard-status-tiles", "destination": "/docs/collaborate/data-tile",