# Enforce dbt model schema file location

**URL:** https://discourse.getdbt.com/t/enforce-dbt-model-schema-file-location/17709
**Category:** Help
**Tags:** testing, dbt-core
**Created:** [January 14, 2025, 1:16am UTC](https://discourse.getdbt.com/t/enforce-dbt-model-schema-file-location/17709 "2025-01-14T01:16:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yongchaozhao](https://avatars.discourse-cdn.com/v4/letter/y/5e9695/32.png) [@yongchaozhao](https://discourse.getdbt.com/u/yongchaozhao)
#### Post date: [January 14, 2025, 1:16am UTC](https://discourse.getdbt.com/t/enforce-dbt-model-schema-file-location/17709/1 "2025-01-14T01:16:06Z")

</div>

## The problem I’m having

Trying to enforce the dbt model reads schema.yml from a different location

## The context of why I’m trying to do this

There were some dbt packages models and schmea.yml will be recreated every single time when it runs dbt deps, those models are using the the auto generated schema.yml file in the same folder.

I would like have these models using different schema.yml file which saved in a different folder

## What I’ve already tried

Try edit dbt\_project.yml with different options, does not seems to be working

any points is much appreciated

## Some example code or error messages

```auto
dbt/
├── projects/
│ └── project_pacakges/
│ └── schema_folder/
│ └── vendor_a_new.yml
│ └── dbt_packages/
│ └── vendor_a/
│ └── models/
│ └── sql_1.sql
│ └── sql_2.sql
│ └── vendor_a.yml

```

**current** : everything under dbt\_packages/ will be recreate every single time run dbt deps, sql\_1.sql and sql\_2.sql are reading vendor\_a.yml file.  
**what i like to achieve** : sql\_1.sql and sql\_2.sql are reading vendor\_a\_new.yml file under schema\_folder
