Skip to content

Commit

Permalink
[Docs] Add docstring for KafkaTarget (#5463)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper committed Apr 28, 2024
1 parent b95a34f commit 842aaca
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mlrun/datastore/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,25 @@ def as_df(self, columns=None, df_module=None, **kwargs):


class KafkaTarget(BaseStoreTarget):
"""
Kafka target storage driver, used to write data into kafka topics.
example::
# define target
kafka_target = KafkaTarget(
name="kafka", path="my_topic", brokers="localhost:9092"
)
# ingest
stocks_set.ingest(stocks, [kafka_target])
:param name: target name
:param path: topic name e.g. "my_topic"
:param after_step: optional, after what step in the graph to add the target
:param columns: optional, which columns from data to write
:param bootstrap_servers: Deprecated. Use the brokers parameter instead
:param producer_options: additional configurations for kafka producer
:param brokers: kafka broker as represented by a host:port pair, or a list of kafka brokers, e.g.
"localhost:9092", or ["kafka-broker-1:9092", "kafka-broker-2:9092"]
"""

kind = TargetTypes.kafka
is_table = False
is_online = False
Expand Down

0 comments on commit 842aaca

Please sign in to comment.