InfluxConfig¶
- class kafkaconnect.influxdb_sink.config.InfluxConfig(name: str, connect_influx_url: str, connect_influx_db: str, tasks_max: int, connect_influx_username: str, connect_influx_password: str, connect_influx_error_policy: str, connect_influx_max_retries: str, connect_influx_retry_interval: str, connect_progress_enabled: bool, tags: str, remove_prefix: str, topics: str = '', connect_influx_kcql: str = '', connector_class: str = 'com.datamountaineer.streamreactor.connect.influx.InfluxSinkConnector')¶
Bases:
ConnectorConfig
InfluxDB connector configuration.
Attributes Summary
KCQL queries to extract fields from topics.
Stream reactor InfluxDB Sink connector class.
Comma separated list of Kafka topics to read from.
Methods Summary
asjson
()Convert dataclass instance into JSON.
format_field_names
(fields)Rename a field name by replacing '_' with '.'.
update_config
(topics[, timestamp])Update connector config.
Attributes Documentation
- connect_influx_kcql: str = ''¶
KCQL queries to extract fields from topics. Computed.
We assume that a topic has a flat structure so that
SELECT * FROM
will retrieve all topic fields. This is configuration is derived from the list of topics and from the timestamp to use as the InfluxDB time.
- connector_class: str = 'com.datamountaineer.streamreactor.connect.influx.InfluxSinkConnector'¶
Stream reactor InfluxDB Sink connector class.
- topics: str = ''¶
Comma separated list of Kafka topics to read from.
Methods Documentation
- asjson() str ¶
Convert dataclass instance into JSON.
- static format_field_names(fields: List[Tuple[str, Any]]) Dict[str, str] ¶
Rename a field name by replacing ‘_’ with ‘.’.
Dictionary factory used with the dataclasses.asdict() method.
- update_config(topics: Set[str], timestamp: str = '') None ¶
Update connector config.
- Parameters:
topics (
Set
) – List of kafka topics.timestamp (
str
) – Timestamp used as influxDB time.