Skip to content

snowflake_conn_id not a template_field in SnowflakeSqlApiOperator #46421

@bbossy

Description

@bbossy

Apache Airflow Provider(s)

snowflake

Versions of Apache Airflow Providers

apache-airflow-providers-snowflake==5.8.1

Apache Airflow version

2.10.4

Operating System

Debian Bookwork

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

SnowflakeSqlApiOperator's snowflake_conn_id field is not templatable, unlike the other Snowflake Operators where snowflake_conn_id is a template_field.

What you think should happen instead

SnowflakeSqlApiOperator's snowflake_conn_id field should be a template_field to be consistent with the other operators.

How to reproduce

from airflow import DAG
from airflow.providers.snowflake.operators.snowflake import SnowflakeSqlApiOperator
import pendulum

with DAG(
  dag_id='snowflake',
  start_date=pendulum.datetime(2025,1,1),
  schedule=None,
  catchup=False,
):
  SnowflakeSqlApiOperator(
    task_id='snowflake',
    snowflake_conn_id='snowflake-{{var.value.some_var}}',
    sql='select 'hello' as hello;'
  )

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions