Using of vars in Hooks Query

Hello All

Can we use vars in Hooks query?
Iam trying to run below dbt command and it’s fails with below error:
e[0m16:47:20.468451 [error] [MainThread]: e[33mObject of type date is not JSON serializablee[0m

dbt command: dbt snapshot --select customer_snapshot --vars ‘{execution_date:2022-11-05}’

DBT Model
{% snapshot customer_snapshot %}
{{
config(
unique_key=‘customer_id’,
strategy=‘check’,
check_cols=[‘customer_id’, ‘customer_name’],
post_hook=[“delete project.dataset.customer_details set status= ‘Y’ where ingestion_date =‘{{var(‘execution_date’)}}’”]
) }}
select * from project.dataset.customer_details
where ingestion_date = “{{ var(‘execution_date’) }}” and status= ‘N’
{% endsnapshot %}

Regards
Minhaj Pasha

Have you tried quoting the key-value pairs, like this?

dbt snapshot --select customer_snapshot --vars '{"execution_date":"2022-11-05"}'

@joellabes -exactly the same as you mentioned, i tried both and it failed with same error

@minhajpasha
can you try this once

dbt snapshot --select customer_snapshot --vars 'execution_date: 2022-11-05'