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

Update change-way-model-materialized.md #4964

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

BobClaerhoutTropos
Copy link
Contributor

What are you changing in this pull request and why?

Checklist

Adding or removing pages (delete if not applicable):

  • Add/remove page in website/sidebars.js
  • Provide a unique filename for new pages
  • Add an entry for deleted pages in website/static/_redirects
  • Run link testing locally with npm run build to update the links that point to deleted pages

@BobClaerhoutTropos BobClaerhoutTropos requested a review from a team as a code owner February 21, 2024 11:14
Copy link

vercel bot commented Feb 21, 2024

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 Mar 8, 2024 6:34pm

@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 Feb 21, 2024
@mirnawong1
Copy link
Contributor

hey @BobClaerhoutTropos thanks for openign this up! can you give some more info on why the indentation change here?

This current config ensures that:

  • all models within the jaffle_shop namespace (directory) are materialized as tables.
  • all models within the example namespace (directory) are materialized as views.

so the existing block separates the configs for jaffle_shop and example:

models:
  jaffle_shop:
    +materialized: table
  example:
    +materialized: view

@BobClaerhoutTropos
Copy link
Contributor Author

Hi @mirnawong1 ,
I don't see where the jaffle_shop directory would be created? The jaffle_shop is appearing because the tutorial directs you to change the name of the project. That's, according to me, the only way jaffle_shop ends up in this model config, right?

It starts from this example:

models:
  my_new_project:
    # Applies to all files under models/example/
    example:
      +materialized: table

Here you see that the example directory also has more indents compared to the my_new_project item. It was mostly because of this original structure, I made the PR. I just tested this again and it just doesn't work if the indentation is similar to the my_new_project or jaffle_shop

Copy link
Contributor

@nghi-ly nghi-ly left a comment

Choose a reason for hiding this comment

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

@mirnawong1 / @BobClaerhoutTropos : referencing this code comment in https://docs.getdbt.com/docs/build/sql-models#configuring-models , the proposed changes look good to me.

if my understanding is incorrect, tho, happy to revert

@nghi-ly nghi-ly merged commit ee508b0 into dbt-labs:current Mar 8, 2024
4 checks passed
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.

3 participants