Skip to content

snowflake_conn_id not a template_field in SnowflakeSqlApiOperator #46421

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

Activity

  1. boring-cyborg commented on Feb 4, 2025

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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