airflow.providers.apache.kafka.hooks.client¶
Classes¶
| A hook for interacting with the Kafka Cluster. | 
Module Contents¶
- 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]¶
- Create a topic. - Parameters:
- topics (collections.abc.Sequence[collections.abc.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)] 
 
 - delete_topic(topics)[source]¶
- Delete a topic. - Parameters:
- topics (collections.abc.Sequence[str]) – a list of topics to delete.