I have some DAGs that use SnowflakeOperator and SnowflakeHook. Both of them are making connections to Snowflake using snowflake_connection
input, which I have saved under Admin > Connections
in Airflow.
SnowflakeHook(
snowflake_conn_id="snowflake_connection",
database='SOME_DB',
schema='PUBLIC'
)
While this arrangement works inside the Airflow environment, I want to run the code as a regular script in my location machine. But it's unable to access that snowflake_connection
, which I have saved inside Airflow. Is there any workaround to this?
Is there a way I can supply a connection string or username/password directly to SnowflakeHook
and SnowflakeOperator
to make a database connection?