# How to configure snapshot in dbt\_project.yml file

**URL:** <https://discourse.getdbt.com/t/how-to-configure-snapshot-in-dbt-project-yml-file/14079>\
**Category:** Help\
**Tags:** snapshots, best-practice\
**Created:** [July 5, 2024, 3:35pm UTC](https://discourse.getdbt.com/t/how-to-configure-snapshot-in-dbt-project-yml-file/14079 "2024-07-05T15:35:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysreenu](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/ysreenu/32/3589_2.png) [@ysreenu](https://discourse.getdbt.com/u/ysreenu)\
**Post date:** [July 5, 2024, 3:35pm UTC](https://discourse.getdbt.com/t/how-to-configure-snapshot-in-dbt-project-yml-file/14079/1 "2024-07-05T15:35:46Z")

</div>

Hello everyone,  
**I have succesfully created snapshot in config block.**.  
Now  
I have been attempting to set up a snapshot in the **dbt\_project.yml** file. I created the **order\_snap\_pro.sql** file and placed it in the **snapshots** folder, and added the configuration below in the dbt\_project.yml file. However, I am encountering the following error when running **dbt snapshot --select order\_snap\_pro.**

(see attached screen shot)  
**error:**  
15:31:04 Running with dbt=1.7.14  
15:31:04 Registered adapter: mysql=1.7.0  
15:31:04 Unable to do partial parsing because a project config has changed  
15:31:10 [WARNING]: Configuration paths exist in your dbt\_project.yml file which do not apply to any resources.  
There are 1 unused configuration paths:

- snapshots.analytics.order\_s  
15:31:10 Found 3 models, 2 snapshots, 2 seeds, 4 tests, 2 sources, 0 exposures, 0 metrics, 499 macros, 0 groups, 0 semantic models  
15:31:10 The selection criterion ‘order\_snap\_pro’ does not match any nodes  
15:31:10  
15:31:10 Nothing to do. Try checking your model configs and model specification args  
(dbt\_venv) PS G:\dbt\analytics\>

please suggest me if i miss anything here.

 ![dbt snapshot issue](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/2X/b/b4adc064c2878d8380928bedf65d4593321784ab.png)

---

<div class="post-metadata">

**Author:** ![brunoszdl](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/brunoszdl/32/4113_2.png) [@brunoszdl](https://discourse.getdbt.com/u/brunoszdl)\
**Post date:** [July 5, 2024, 8:40pm UTC](https://discourse.getdbt.com/t/how-to-configure-snapshot-in-dbt-project-yml-file/14079/2 "2024-07-05T20:40:11Z")

</div>

Snapshots have to be defined inside a snapshot block (see [Add snapshots to your DAG | dbt Developer Hub](https://docs.getdbt.com/docs/build/snapshots), note the {% snapshot orders\_snapshot %})

ex:

```auto
{% snapshot orders_snapshot %}

{{
    config(
      target_database='analytics',
      target_schema='snapshots',
      unique_key='id',

      strategy='timestamp',
      updated_at='updated_at',
    )
}}

select * from {{ source('jaffle_shop', 'orders') }}

{% endsnapshot %}

```

Also why in your dbt\_project.yml you have order\_s, and the name of the file is order\_snap\_pro?
