Home > database >  Snowflake operator (airflow) not rendering SQL properly
Snowflake operator (airflow) not rendering SQL properly

Time:05-26

I am trying to run a simple SQL Query using Airflow provider Snowflake (1.3.0)

 SnowflakeOperator(
        task_id=f'task',
        snowflake_conn_id='snowflake_conn',
        parameters={
            "table": "dummy_table",
        },
        sql=["delete from %(table)s"],
        autocommit=True,
        dag=dag,
    )

The SQL it is rendering is delete from ''dummy''. I want to get rid of '' but have tried everything and nothing seems to be working

CodePudding user response:

To parametrize table name enter image description here

thus the query that will be submitted to Snowflake is:

delete from dummy_table
  • Related