DBT breaking up schema.yml file
Asked Answered
N

1

6

We have a large schema.yml file in our DBT folders. It is not the cleanest or easiest to find what we need in it. I am curious if anyone knows of a way to split up this file. I am not trying to overcomplicate things and separate the dbt project into multiple or anything like that but rather just work on cleaning up the schema.yml file for readability etc. Thanks!

Neptune answered 13/10, 2021 at 18:37 Comment(0)
F
5

You can split this up as much as one model per file, and call the files whatever you want.

The way I usually do it is one file per model and name the file the same as the model.

Just make sure you have

version: 2

models:

at the top of your file and you’re good to go!

Furore answered 13/10, 2021 at 20:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.