Kafka BasicAuth
onetl.connection.db_connection.kafka.kafka_basic_auth.KafkaBasicAuth
Bases: KafkaAuth, GenericOptions
Connect to Kafka using sasl.mechanism="PLAIN".
For more details see Kafka Documentation <https://kafka.apache.org/documentation/#security_sasl_plain>_.
.. versionadded:: 0.9.0
Examples
Auth in Kafka with user and password:
.. code:: python
from onetl.connection import Kafka
auth = Kafka.BasicAuth(
user="some_user",
password="abc",
)
Source code in onetl/connection/db_connection/kafka/kafka_basic_auth.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
parse(options)
classmethod
If a parameter inherited from the ReadOptions class was passed, then it will be returned unchanged. If a Dict object was passed it will be converted to ReadOptions.
Otherwise, an exception will be raised
Source code in onetl/impl/generic_options.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |