So a python list will render like ["a", "b", "c"...]
which SQL will see as invalid syntax.
I have some python code that sets an xcom variable
#tried with () and []
y = ("2020-10-01", "2020-10-02")
kwargs['ti'].xcom_push(key='refresh_dates', value=y)
Then in my sql I do
where start_date IN {{ task_instance.xcom_pull(key='refresh_dates', task_ids='prep_dag_task')
However this gets rendered as a python list like ["2020-10-01", "2020-10-02"]
which sql can't reconize. How can I pass a proper sql list? If I create a string like "("2020-10-01", "2020-10-02")"
it will get rendered as a string and not a list.. so how can I accomplish this?