I want to pass a parameter value to a SQL Dbt model

I am running an incremental load for a dataset where I have to filter data based on months, the requirement is to pass the month dynamically to the model so that it can filter the data or else it takes the maximum or latest month to process the data.
I did try vars in the dbt model while running through CLI and configured the parameter in the dbt_project.yml

dbt run --select table_name --vars’{“month”:“2024011”}’

But I am getting error as the var is not found in config
Error:" Required var ‘snapshot_param’ not found in config:
Vars supplied to table_name = {
“event_type”: “month_param”,
“param:2024011”: null "
Can someone please help me out?

Read the docs!

https://docs.getdbt.com/docs/build/project-variables

Note: @Dagner Fonseca (Cognitivo.ai) originally posted this reply in Slack. It might not have transferred perfectly.

Hi Hisham, at first glance I don’t see the --vars flag and also 2024011 is not a valid month.

Hi Marcelo,
Thanks for the reply, actually 2024011 is a kind of format available in the data, we call it month but we can call it anything else as well. Flag was there just missed to add it