Skip to content

Commit 1b3f543

Browse files
authored
2 parents 7a28340 + be1c0eb commit 1b3f543

File tree

1 file changed

+48
-8
lines changed
  • website/docs/reference/resource-configs

1 file changed

+48
-8
lines changed

website/docs/reference/resource-configs/docs.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,24 @@ default_value: {show: true}
2020

2121
<TabItem value="models">
2222

23-
<File name='models/schema.yml'>
23+
You can configure `docs` behavior for many resources at once by setting in `dbt_project.yml`. You can also use the `docs` config in `properties.yaml` files, to set or override documentation behaviors for specific resources:
24+
2425

26+
<File name='dbt_project.yml'>
2527

2628
```yml
29+
models:
30+
[<resource-path>](/reference/resource-configs/resource-path):
31+
+docs:
32+
show: true | false
33+
34+
```
35+
36+
</File>
37+
38+
<File name='models/schema.yml'>
39+
40+
```yml
2741
version: 2
2842

2943
models:
@@ -32,7 +46,6 @@ models:
3246
show: true | false
3347
node_color: "black"
3448
```
35-
3649
</File>
3750
3851
</TabItem>
@@ -45,6 +58,20 @@ This property is not implemented for sources.
4558
4659
<TabItem value="seeds">
4760
61+
You can use the docs property in YAML files, including the `dbt_project.yml`:
62+
63+
<File name='dbt_project.yml'>
64+
65+
```yml
66+
seeds:
67+
[<resource-path>](/reference/resource-configs/resource-path):
68+
+docs:
69+
show: true | false
70+
71+
```
72+
73+
</File>
74+
4875
<File name='seeds/schema.yml'>
4976

5077
```yml
@@ -61,6 +88,20 @@ seeds:
6188

6289
<TabItem value="snapshots">
6390

91+
You can use the docs property in YAML files, including the `dbt_project.yml`:
92+
93+
<File name='dbt_project.yml'>
94+
95+
```yml
96+
snapshots:
97+
[<resource-path>](/reference/resource-configs/resource-path):
98+
+docs:
99+
show: true | false
100+
101+
```
102+
103+
</File>
104+
64105
<File name='snapshots/schema.yml'>
65106

66107
```yml
@@ -77,6 +118,9 @@ snapshots:
77118

78119
<TabItem value="analyses">
79120

121+
You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Analysis properties](/reference/analysis-properties) for more info.
122+
123+
80124
<File name='analysis/schema.yml'>
81125

82126
```yml
@@ -93,9 +137,7 @@ analyses:
93137

94138
<TabItem value="macros">
95139

96-
<!----
97-
To-do: check this
98-
--->
140+
You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Macro properties](/reference/macro-properties) for more info.
99141

100142
<File name='macros/schema.yml'>
101143

@@ -109,16 +151,14 @@ macros:
109151
```
110152
</File>
111153

112-
Also refer to [macro properties](/reference/macro-properties).
113-
114154
</TabItem>
115155

116156
</Tabs>
117157

118158
## Definition
119159
The docs field can be used to provide documentation-specific configuration to models. It supports the doc attribute `show`, which controls whether or not models are shown in the auto-generated documentation website. It also supports `node_color` for some node types.
120160

121-
**Note:** hidden models will still appear in the dbt DAG visualization but will be identified as "hidden.”
161+
**Note:** Hidden models will still appear in the dbt DAG visualization but will be identified as "hidden.”
122162

123163
## Default
124164
The default value for `show` is `true`.

0 commit comments

Comments
 (0)