astronomer.providers.apache.hive.hooks.hive

This module contains the Apache HiveCli hook async.

Classes

HiveCliHookAsync

HiveCliHookAsync to interact with the Hive using impyla library

Module Contents

class astronomer.providers.apache.hive.hooks.hive.HiveCliHookAsync(metastore_conn_id)[source]

Bases: airflow.hooks.base.BaseHook

HiveCliHookAsync to interact with the Hive using impyla library

Parameters:
  • metastore_conn_id (str) – connection string for the hive

  • auth_mechanism – auth mechanism to use for authentication

conn
auth_mechanism
get_hive_client()[source]

Makes a connection to the hive client using impyla library

async partition_exists(table, schema, partition, polling_interval)[source]

Checks for the existence of a partition in the given hive table.

Parameters:
  • table (str) – table in hive where the partition exists.

  • schema (str) – database where the hive table exists

  • partition (str) – partition to check for in given hive database and hive table.

  • polling_interval (float) – polling interval in seconds to sleep between checks

static parse_partition_name(partition)[source]

Parse partition string into schema, table, and partition.

check_partition_exists(schema, table, partition)[source]

Check whether given partition exist or not.

Parameters:
  • schema (str) – Name of the Hive schema.

  • table (str) – Name of the table.

  • partition (str) – Name of the partition