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

Fix config example for dbt_project.yml #4443

Merged
merged 6 commits into from
Nov 15, 2023

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented Nov 12, 2023

Previews

What are you changing in this pull request and why?

Within dbt_project.yml, resource types have dashes (-) instead of underscores (_), so we need to update this code example accordingly.

Backstory

Within the description for #4180, I added some examples of what I guessed the syntax would be, but I didn't specify that these were completely unverified guesses 😬.

This particular example got missed during #4281.

🎩

image

Checklist

  • Review the Content style guide and About versioning so my content adheres to these guidelines.
  • I have verified that the code examples work
  • I have checked that the preview renders correctly

Copy link

vercel bot commented Nov 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2023 11:18pm

@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels Nov 12, 2023
@dbeatty10 dbeatty10 marked this pull request as ready for review November 12, 2023 15:00
@dbeatty10 dbeatty10 requested a review from a team as a code owner November 12, 2023 15:00
Copy link
Contributor

@mirnawong1 mirnawong1 left a comment

Choose a reason for hiding this comment

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

lgtm @dbeatty10 ! though i put the yaml through a validator and it said the meta contents should look like:

semantic-models:
  my_project_name:
    +enabled: true | false
    +group: some_group
    +meta:
      some_key: some_value

@dbeatty10
Copy link
Contributor Author

lgtm @dbeatty10 ! though i put the yaml through a validator and it said the meta contents should look like:

semantic-models:
  my_project_name:
    +enabled: true | false
    +group: some_group
    +meta:
      some_key: some_value

Good idea @mirnawong1 ! I'll make that switch.

More detail

The general format is:

semantic-models:
  <resource-path>:
    +enabled: true | false
    +group: <group_name>
    +meta: {<dictionary>}

Either of these will achieve the same end result:

semantic-models:
  my_project_name:
    +enabled: true | false
    +group: some_group
    +meta:
      some_key: some_value

or

semantic-models:
  my_project_name:
    +enabled: true | false
    +group: some_group
    +meta: {"some_key": "some_value"}

But the syntax you mentioned is more readable and writeable, so it would be best for the code examples.

Thanks for noticing and putting it through the validator 💡

@dbeatty10 dbeatty10 merged commit 8694388 into current Nov 15, 2023
7 checks passed
@dbeatty10 dbeatty10 deleted the dbeatty/semantic-model-config-dbt-project.yml branch November 15, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants