How to combine f string and jinja template to pass dbt --vars using kubernetespodoperator in airflow

Hello everyone, I am struggling to find correct syntax that can use the airflow configuration json variable passed on dag trigger and use it inside dbt run --vars

Here is my exact problem
I pass to airflow dag my configuration json:

{“my_date”: “2024-04-01”}

then inside my dag py file, i save it to variable like this

my_date = “{{ dag_run.conf[‘my_date’] }}”

Then I do
dbt run --vars f’{{“my_date”: “{my_date }”}}’ inside kubernetpodoperator of airflow
but it does not like this syntax. can anyone help me ?

Try some like this for Jinja2 templating in your dags:
dbt build --models {{ model_path_dbt }}.* --vars “{{ ‘{{ ti.xcom_pull(task_ids=[“dbt_init_data_transform”])[0] }}’|safe }}”
OR
subprocess.run(f’'‘echo $({PATH}miniconda/envs/airflow_env/bin/dbt show -s {{ post_run_details_model }} --vars ‘{ {{ post_run_details_params|tojson }} }’ --limit 1 --output=json) | grep -o {{ ‘{{.*}}’|safe }} | jq ‘.show[0]’ ‘’’)

These examples from my dags