astronomer.providers.snowflake.triggers.snowflake_trigger

Module Contents

Classes

SnowflakeTrigger

Snowflake Trigger inherits from the BaseTrigger,it is fired as

Functions

get_db_hook(snowflake_conn_id)

Create and return SnowflakeHookAsync.

astronomer.providers.snowflake.triggers.snowflake_trigger.get_db_hook(snowflake_conn_id)[source]

Create and return SnowflakeHookAsync. :return: a SnowflakeHookAsync instance.

class astronomer.providers.snowflake.triggers.snowflake_trigger.SnowflakeTrigger(task_id, polling_period_seconds, query_ids, snowflake_conn_id)[source]

Bases: airflow.triggers.base.BaseTrigger

Snowflake Trigger inherits from the BaseTrigger,it is fired as deferred class with params to run the task in trigger worker and fetch the status for the query ids passed

Parameters
  • task_id (str) – Reference to task id of the Dag

  • polling_period_seconds (float) – polling period in seconds to check for the status

  • query_ids (List[str]) – List of Query ids to run and poll for the status

  • snowflake_conn_id (str) – Reference to Snowflake connection id

serialize(self)[source]

Serializes SnowflakeTrigger arguments and classpath.

async run(self)[source]

Makes a series of connections to snowflake to get the status of the query by async get_query_status function