airflow.providers.apache.kafka.hooks.client

Module Contents

Classes

KafkaAdminClientHook

A hook for interacting with the Kafka Cluster

class airflow.providers.apache.kafka.hooks.client.KafkaAdminClientHook(kafka_config_id=KafkaBaseHook.default_conn_name)[source]

Bases: airflow.providers.apache.kafka.hooks.base.KafkaBaseHook

A hook for interacting with the Kafka Cluster

Parameters

kafka_config_id – The connection object to use, defaults to “kafka_default”

create_topic(topics)[source]

Creates a topic

Parameters

topics (Sequence[Sequence[Any]]) – a list of topics to create including the number of partitions for the topic and the replication factor. Format: [ (“topic_name”, number of partitions, replication factor)]

Was this entry helpful?