@@ -242,7 +242,7 @@ a timeout specified in `retry_after`, and resume it when it's elapsed.
242242class InfluxDB3Sink(BatchingSink)
243243```
244244
245- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L23 )
245+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L38 )
246246
247247< a id = " quixstreams.sinks.core.influxdb3.InfluxDB3Sink.__init__" >< / a>
248248
@@ -255,19 +255,20 @@ def __init__(token: str,
255255 host: str ,
256256 organization_id: str ,
257257 database: str ,
258- measurement: str ,
259- fields_keys: Iterable[ str ] = (),
260- tags_keys: Iterable[ str ] = (),
258+ measurement: MeasurementSetter ,
259+ fields_keys: FieldsSetter = (),
260+ tags_keys: TagsSetter = (),
261261 time_key: Optional[str ] = None ,
262- time_precision: WritePrecision = WritePrecision.MS ,
262+ time_precision: TimePrecision = " ms" ,
263+ allow_missing_fields: bool = False ,
263264 include_metadata_tags: bool = False ,
264265 batch_size: int = 1000 ,
265266 enable_gzip: bool = True ,
266267 request_timeout_ms: int = 10_000 ,
267268 debug: bool = False )
268269```
269270
270- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L24 )
271+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L46 )
271272
272273A connector to sink processed data to InfluxDB v3.
273274
@@ -292,24 +293,34 @@ from the backpressured topic partition until the "retry_after" timeout elapses.
292293- `host` : InfluxDB host in format " https://<host>"
293294- `organization_id` : InfluxDB organization_id
294295- `database` : database name
295- - `fields_keys` : a list of keys to be used as " fields" when writing to InfluxDB.
296- If present, it must not overlap with " tags_keys" .
297- If empty, the whole record value will be used.
296+ - `measurement` : measurement name as a string.
297+ Also accepts a single- argument callable that receives the current message
298+ data as a dict and returns a string.
299+ - `fields_keys` : an iterable (list ) of strings used as InfluxDB " fields" .
300+ Also accepts a single- argument callable that receives the current message
301+ data as a dict and returns an iterable of strings.
302+ - If present, it must not overlap with " tags_keys" .
303+ - If empty, the whole record value will be used.
298304> *** NOTE *** The fields' values can only be strings, floats, integers, or booleans.
299305Default - `()` .
300- - `tags_keys` : a list of keys to be used as " tags" when writing to InfluxDB.
301- If present, it must not overlap with " fields_keys" .
302- These keys will be popped from the value dictionary
303- automatically because InfluxDB doesn' t allow the same keys be
304- both in tags and fields.
305- If empty, no tags will be sent.
306+ - `tags_keys` : an iterable (list ) of strings used as InfluxDB " tags" .
307+ Also accepts a single- argument callable that receives the current message
308+ data as a dict and returns an iterable of strings.
309+ - If present, it must not overlap with " fields_keys" .
310+ - Given keys are popped from the value dictionary since the same key
311+ cannot be both a tag and field.
312+ - If empty, no tags will be sent.
306313> *** NOTE *** : InfluxDB client always converts tag values to strings.
307314Default - `()` .
308315- `time_key` : a key to be used as " time" when writing to InfluxDB.
309316By default, the record timestamp will be used with " ms" time precision.
310317When using a custom key, you may need to adjust the `time_precision` setting
311318to match.
312319- `time_precision` : a time precision to use when writing to InfluxDB.
320+ Possible values: " ms" , " ns" , " us" , " s" .
321+ Default - `" ms" ` .
322+ - `allow_missing_fields` : if `True ` , skip the missing fields keys, else raise `KeyError ` .
323+ Default - `False `
313324- `include_metadata_tags` : if True , includes record' s key, topic,
314325and partition as tags.
315326Default - `False ` .
0 commit comments