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

clarify macro properties aren't supported in dbt_project.yml #3989

Merged
merged 45 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0a8b4bf
clarify macro aren't support in project.yml file
mirnawong1 Aug 30, 2023
907fde4
Merge branch 'current' into mwong-macro-yml
mirnawong1 Aug 31, 2023
cda991a
add snippet and rephrase
mirnawong1 Aug 31, 2023
66ff1df
Update dbt_project.yml.md
mirnawong1 Aug 31, 2023
293e437
Merge branch 'current' into mwong-macro-yml
mirnawong1 Aug 31, 2023
b163c5b
Update website/docs/reference/macro-properties.md
mirnawong1 Aug 31, 2023
ddd2c63
Update website/docs/reference/macro-properties.md
mirnawong1 Aug 31, 2023
237f6da
Merge branch 'mwong-macro-yml' of https://github.com/dbt-labs/docs.ge…
mirnawong1 Aug 31, 2023
6d8ce4e
update lang
mirnawong1 Aug 31, 2023
0b5a949
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 4, 2023
49d7b63
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 6, 2023
9a9627a
tweak snippet and add versionblock
mirnawong1 Sep 6, 2023
a56d9a8
remove break
mirnawong1 Sep 6, 2023
db04b02
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 7, 2023
3d8dbd6
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 11, 2023
d22b7e9
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 11, 2023
a24c149
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 11, 2023
b01215a
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 13, 2023
d5c881f
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 13, 2023
a453e7a
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 13, 2023
f4ccb57
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 14, 2023
30c7c4d
Merge branch 'current' into mwong-macro-yml
mirnawong1 Sep 18, 2023
02fb137
adding jerco's great feedback
mirnawong1 Sep 18, 2023
1872ce1
clarify
mirnawong1 Sep 18, 2023
56fbe0a
change yaml to `properties.yml`
mirnawong1 Sep 18, 2023
75b1457
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 6, 2023
b5e6f28
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 7, 2023
5ec1c05
add table
mirnawong1 Nov 7, 2023
95b430d
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 8, 2023
ef8c3bc
Update configs-and-properties.md
mirnawong1 Nov 8, 2023
06740f1
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 9, 2023
02a3cae
Remove trailing space
dbeatty10 Nov 10, 2023
fa206ce
Merge branch 'current' into mwong-macro-yml
dbeatty10 Nov 10, 2023
f353599
Merge branch 'current' into mwong-macro-yml
dbeatty10 Nov 10, 2023
29c32df
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 13, 2023
6c4a0c6
Merge branch 'current' into mwong-macro-yml
dbeatty10 Nov 13, 2023
5baf269
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 15, 2023
ca47c06
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 20, 2023
e332c34
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 22, 2023
a1a8e7f
Update docs.md
mirnawong1 Nov 22, 2023
169f759
Merge branch 'current' into mwong-macro-yml
mirnawong1 Nov 29, 2023
e27bb9d
Merge branch 'current' into mwong-macro-yml
dbeatty10 Dec 17, 2023
7ad36fd
Update dbt_project.yml.md
dbeatty10 Dec 17, 2023
c26bc39
Remove extra newline
dbeatty10 Dec 17, 2023
9225af1
Merge branch 'current' into mwong-macro-yml
mirnawong1 Dec 18, 2023
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
5 changes: 3 additions & 2 deletions website/docs/reference/dbt_project.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ By default, dbt will look for `dbt_project.yml` in your current working director

</VersionBlock>

The following is a list of all available configurations in the `dbt_project.yml` file.

:::info YAML syntax

dbt uses YAML in a few different places. If you're new to YAML, it would be worth taking the time to learn how arrays, dictionaries and strings are represented.
:::

The following is a list of all available configurations in the `dbt_project.yml` file. Something to note, [Macro properties](/reference/macro-properties) aren't supported in the `dbt_project.yml` file:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Recommend updating this note to mention that these configurations aren't supported in dbt_project.yml:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks so much @jtcohen6 , this is so clear to me now so i really appreciate you breaking it down 🙏

this issue #3997 makes it seems that semantic models are configs, not properties -- is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh wait, sorry! i see the issue is related to groups only!


<File name='dbt_project.yml'>

```yml
Expand Down
4 changes: 2 additions & 2 deletions website/docs/reference/macro-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Macro properties
---

Macro properties can be declared in `.yml` files.
Macro properties can be declared in `.yml` files, except in the `dbt_project.yml` files.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders.
You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in sub-folders.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

<File name='macros/<filename>.yml'>

Expand Down
78 changes: 67 additions & 11 deletions website/docs/reference/resource-configs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,35 @@ default_value: {show: true}
{ label: 'Macros', value: 'macros', },
]
}>

<TabItem value="models">

You can use the docs property in YAML files, including the `dbt_project.yml`:
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

<File name='dbt_project.yml'>

```yml
name: "your_dbt_project_name"
version: "1.0.0"
config-version: 2

models:
- name: model_name
docs:
show: true | false
```
</File>

<File name='models/schema.yml'>


```yml
version: 2

models:
- name: model_name
docs:
show: true | false

```

</File>
Expand All @@ -43,6 +60,22 @@ This property is not implemented for sources.

<TabItem value="seeds">

You can use the docs property in YAML files, including the `dbt_project.yml`:

<File name='dbt_project.yml'>

```yml
name: "your_dbt_project_name"
version: "1.0.0"
config-version: 2

seeds:
- name: seed_name
docs:
show: true | false
```
</File>

<File name='seeds/schema.yml'>

```yml
Expand All @@ -52,15 +85,29 @@ seeds:
- name: seed_name
docs:
show: true | false

```

</File>

</TabItem>

<TabItem value="snapshots">

You can use the docs property in YAML files, including the `dbt_project.yml`:

<File name='dbt_project.yml'>

```yml
name: "your_dbt_project_name"
version: "1.0.0"
config-version: 2

snapshots:
- name: snapshot_name
docs:
show: true | false
```
</File>

<File name='snapshots/schema.yml'>

```yml
Expand All @@ -70,15 +117,29 @@ snapshots:
- name: snapshot_name
docs:
show: true | false

```

</File>

</TabItem>

<TabItem value="analyses">

You can use the docs property in YAML files, including the `dbt_project.yml`:
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

<File name='dbt_project.yml'>

```yml
name: "your_dbt_project_name"
version: "1.0.0"
config-version: 2

analyses:
- name: analysis_name
docs:
show: true | false
```
</File>
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

<File name='analysis/schema.yml'>

```yml
Expand All @@ -89,16 +150,13 @@ analyses:
docs:
show: true | false
```

</File>

</TabItem>

<TabItem value="macros">

<!----
To-do: check this
--->
You can use the docs property in YAML files, _except_ in `dbt_project.yml`. [Macro properties](/reference/macro-properties) _are not_ supported in the `dbt_project.yml` file.

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

Expand All @@ -109,9 +167,7 @@ macros:
- name: macro_name
docs:
show: true | false

```

</File>

</TabItem>
Expand Down
Loading