Skip to content

Commit 4b4476e

Browse files
Update documentation (#856)
Co-authored-by: gwaramadze <1044831+gwaramadze@users.noreply.github.com>
1 parent 10d8d86 commit 4b4476e

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

docs/api-reference/quixstreams.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -4239,7 +4239,7 @@ list_sink[0] # 1
42394239
class InfluxDB3Sink(BatchingSink)
42404240
```
42414241

4242-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/core/influxdb3.py#L43)
4242+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/core/influxdb3.py#L51)
42434243

42444244
<a id="quixstreams.sinks.core.influxdb3.InfluxDB3Sink.__init__"></a>
42454245

@@ -4253,7 +4253,7 @@ def __init__(token: str,
42534253
measurement: MeasurementSetter,
42544254
fields_keys: FieldsSetter = (),
42554255
tags_keys: TagsSetter = (),
4256-
time_key: Optional[str] = None,
4256+
time_setter: Optional[TimeSetter] = None,
42574257
time_precision: TimePrecision = "ms",
42584258
allow_missing_fields: bool = False,
42594259
include_metadata_tags: bool = False,
@@ -4268,7 +4268,7 @@ def __init__(token: str,
42684268
ClientConnectFailureCallback] = None)
42694269
```
42704270

4271-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/core/influxdb3.py#L51)
4271+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/core/influxdb3.py#L59)
42724272

42734273
A connector to sink processed data to InfluxDB v3.
42744274

@@ -4310,10 +4310,12 @@ cannot be both a tag and field.
43104310
- If empty, no tags will be sent.
43114311
>***NOTE***: InfluxDB client always converts tag values to strings.
43124312
Default - `()`.
4313-
- `time_key`: a key to be used as "time" when writing to InfluxDB.
4314-
By default, the record timestamp will be used with "ms" time precision.
4315-
When using a custom key, you may need to adjust the `time_precision` setting
4316-
to match.
4313+
- `time_setter`: an optional column name to use as "time" for InfluxDB.
4314+
Also accepts a callable which receives the current message data and
4315+
returns either the desired time or `None` (use default).
4316+
The time can be an `int`, `string` (RFC3339 format), or `datetime`.
4317+
The time must match the `time_precision` argument if not a `datetime` object, else raises.
4318+
By default, a record's kafka timestamp with "ms" time precision is used.
43174319
- `time_precision`: a time precision to use when writing to InfluxDB.
43184320
Possible values: "ms", "ns", "us", "s".
43194321
Default - `"ms"`.

docs/api-reference/sinks.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ a timeout specified in `retry_after`, and resume them when it's elapsed.
322322
class InfluxDB3Sink(BatchingSink)
323323
```
324324

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)
326326

327327
<a id="quixstreams.sinks.core.influxdb3.InfluxDB3Sink.__init__"></a>
328328

@@ -338,7 +338,7 @@ def __init__(token: str,
338338
measurement: MeasurementSetter,
339339
fields_keys: FieldsSetter = (),
340340
tags_keys: TagsSetter = (),
341-
time_key: Optional[str] = None,
341+
time_setter: Optional[TimeSetter] = None,
342342
time_precision: TimePrecision = "ms",
343343
allow_missing_fields: bool = False,
344344
include_metadata_tags: bool = False,
@@ -353,7 +353,7 @@ def __init__(token: str,
353353
ClientConnectFailureCallback] = None)
354354
```
355355

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)
357357

358358
A connector to sink processed data to InfluxDB v3.
359359

@@ -397,10 +397,12 @@ cannot be both a tag and field.
397397
- If empty, no tags will be sent.
398398
>***NOTE***: InfluxDB client always converts tag values to strings.
399399
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.
404406
- `time_precision`: a time precision to use when writing to InfluxDB.
405407
Possible values: "ms", "ns", "us", "s".
406408
Default - `"ms"`.

0 commit comments

Comments
 (0)