SQL cell (Amazon Redshift connection) with python list as parameter

Hi everyone!

I tried to pass a python list as parameter in a SQL cell but i got the following error:

Exception: [42601] ERROR: syntax error at or near “{”
Position: 112

The query is as follows (SQL cell):

select
    id as id_item,
    codigo as sap_id
from
    ventas.ventas.dim_articulos
where
    codigo in {sap_id_list}

where the python list is:

sap_id_list = canastas_revision['sap_id'].to_list()

My Settings (Tools/Database/Query Execution/ User Parameters) are as follow:

Thanks in advance!

0

请先登录再写评论。