astronomer.providers.apache.hive.triggers.hive_partition

Module Contents

Classes

HivePartitionTrigger

A trigger that fires and it looks for a partition in the given table

class astronomer.providers.apache.hive.triggers.hive_partition.HivePartitionTrigger(table, partition, polling_interval, metastore_conn_id, schema)[source]

Bases: airflow.triggers.base.BaseTrigger

A trigger that fires and it looks for a partition in the given table in the database or wait for the partition.

Parameters:
  • table (str) – the table where the partition is present.

  • partition (str) – The partition clause to wait for.

  • schema (str) – database which needs to be connected in hive.

  • metastore_conn_id (str) – connection string to connect to hive.

  • polling_period_seconds – polling period in seconds to check for the partition.

serialize()[source]

Serializes HivePartitionTrigger arguments and classpath.

async run()[source]

Simple loop until the relevant table partition is present in the table or wait for it.