@@ -322,7 +322,7 @@ a timeout specified in `retry_after`, and resume them when it's elapsed.
322
322
class InfluxDB3Sink(BatchingSink)
323
323
```
324
324
325
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L43 )
325
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L51 )
326
326
327
327
< a id = " quixstreams.sinks.core.influxdb3.InfluxDB3Sink.__init__" >< / a>
328
328
@@ -338,7 +338,7 @@ def __init__(token: str,
338
338
measurement: MeasurementSetter,
339
339
fields_keys: FieldsSetter = (),
340
340
tags_keys: TagsSetter = (),
341
- time_key : Optional[str ] = None ,
341
+ time_setter : Optional[TimeSetter ] = None ,
342
342
time_precision: TimePrecision = " ms" ,
343
343
allow_missing_fields: bool = False ,
344
344
include_metadata_tags: bool = False ,
@@ -353,7 +353,7 @@ def __init__(token: str,
353
353
ClientConnectFailureCallback] = None )
354
354
```
355
355
356
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L51 )
356
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sinks/ core/ influxdb3.py# L59 )
357
357
358
358
A connector to sink processed data to InfluxDB v3.
359
359
@@ -397,10 +397,12 @@ cannot be both a tag and field.
397
397
- If empty, no tags will be sent.
398
398
> *** NOTE *** : InfluxDB client always converts tag values to strings.
399
399
Default - `()` .
400
- - `time_key` : a key to be used as " time" when writing to InfluxDB.
401
- By default, the record timestamp will be used with " ms" time precision.
402
- When using a custom key, you may need to adjust the `time_precision` setting
403
- to match.
400
+ - `time_setter` : an optional column name to use as " time" for InfluxDB.
401
+ Also accepts a callable which receives the current message data and
402
+ returns either the desired time or `None ` (use default).
403
+ The time can be an `int ` , `string` (RFC3339 format ), or `datetime` .
404
+ The time must match the `time_precision` argument if not a `datetime` object , else raises.
405
+ By default, a record' s kafka timestamp with "ms" time precision is used.
404
406
- `time_precision` : a time precision to use when writing to InfluxDB.
405
407
Possible values: " ms" , " ns" , " us" , " s" .
406
408
Default - `" ms" ` .
0 commit comments