Bird
0
0

You want to create a dbt package that includes models, macros, and tests. Which folder structure is correct inside your package?

hard📝 Application Q8 of 15
dbt - Packages and Reusability
You want to create a dbt package that includes models, macros, and tests. Which folder structure is correct inside your package?
Amy_package/ package.yml models/ macros/ tests/
Bmy_package/ dbt_project.yml models/ macros/ tests/
Cmy_package/ package.yml sql/ macros/ tests/
Dmy_package/ dbt_project.yml sql/ macros/ tests/
Step-by-Step Solution
Solution:
  1. Step 1: Identify required files and folders for a package

    A package needs package.yml and folders like models/, macros/, and tests/.
  2. Step 2: Differentiate from project structure

    dbt_project.yml is for projects, not packages. The folder sql/ is not standard for packages.
  3. Final Answer:

    my_package/ package.yml models/ macros/ tests/ -> Option A
  4. Quick Check:

    Package structure = package.yml + models/macros/tests folders [OK]
Quick Trick: Packages use package.yml, not dbt_project.yml [OK]
Common Mistakes:
MISTAKES
  • Using dbt_project.yml inside package
  • Using sql/ folder instead of models/
  • Missing package.yml file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes