Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Nov 3, 2023
1 parent 90d2af8 commit ef1e1f7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
38 changes: 24 additions & 14 deletions website/docs/reference/resource-configs/resource-path.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: Resource path
description: "Learn how to use resource paths to configure resource types in dbt."
id: resource-path
sidebar_label: "About resource paths"
---

The `<resource-path>` nomenclature is used in this documentation when documenting how to configure resource types like models, seeds, snapshots, tests, sources, and others, from your `dbt_project.yml` file.

It represents the nested dictionary keys that provide the path to a directory of that resource type, or a single instance of that resource type by name.
Expand All @@ -13,7 +20,7 @@ It represents the nested dictionary keys that provide the path to a directory of
## Example
The following examples are for models, but the same concepts apply for seeds, snapshots, tests, sources, and other resource types.
The following examples are mostly for models and a source, but the same concepts apply for seeds, snapshots, tests, sources, and other resource types.
### Apply config to all models
Expand Down Expand Up @@ -108,16 +115,19 @@ In the following project, this would only apply to the `payments` model:
   └── payments.sql

```
**Note**: To disable a source nested in a YAML file in a subfolder, you will need to supply the path to that YAML file, as well as the source name in the `dbt_project.yml` file. For example:
<File name='dbt_project.yml'>
```yaml
sources:
your_project_name:
subdirectory_name:
source_yaml_file_name:
source_name:
+enabled: false # This will apply to sources nested in subfolders.
```
</File>
### Apply config source nested in a subfolder
To disable a source nested in a YAML file in a subfolder, you will need to supply the path to that YAML file, as well as the source name in the `dbt_project.yml` file.<br /><br />
The following example shows how to disable a source nested in a YAML file in a subfolder:
<File name='dbt_project.yml'>
```yaml
sources:
your_project_name:
subdirectory_name:
source_yaml_file_name:
source_name:
+enabled: false # This will apply to sources nested in subfolders.
```
</File>
22 changes: 11 additions & 11 deletions website/docs/reference/source-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ You can disable sources imported from a package to prevent them from rendering i

- **Note**: To disable a source nested in a YAML file in a subfolder, you will need to supply the path to that YAML file plus the source name in the dbt_project.yml file. For example:

<File name='dbt_project.yml'>

```yml
sources:
your_project_name:
subdirectory_name:
source_yaml_file_name:
source_name:
+enabled: false # This will apply to sources nested in subfolders.
```
</File>
<File name='dbt_project.yml'>

```yml
sources:
your_project_name:
subdirectory_name:
source_yaml_file_name:
source_name:
+enabled: false # This will apply to sources nested in subfolders.
```
</File>
Expand Down

0 comments on commit ef1e1f7

Please sign in to comment.