Skip to content

Commit 58b6976

Browse files
Update documentation (#997)
Co-authored-by: tim-quix <[email protected]>
1 parent 03e6c09 commit 58b6976

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

docs/api-reference/quixstreams.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7342,7 +7342,7 @@ This module contains Sinks developed and maintained by the members of Quix Strea
73427342
class TDengineSink(BatchingSink)
73437343
```
73447344

7345-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L40)
7345+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L50)
73467346

73477347
<a id="quixstreams.sinks.community.tdengine.sink.TDengineSink.__init__"></a>
73487348

@@ -7355,7 +7355,7 @@ def __init__(host: str,
73557355
subtable: SubtableNameSetter,
73567356
fields_keys: FieldsSetter = (),
73577357
tags_keys: TagsSetter = (),
7358-
time_key: Optional[str] = None,
7358+
time_setter: Optional[TimeSetter] = None,
73597359
time_precision: TimePrecision = "ms",
73607360
allow_missing_fields: bool = False,
73617361
include_metadata_tags: bool = False,
@@ -7370,10 +7370,12 @@ def __init__(host: str,
73707370
verify_ssl: bool = True,
73717371
username: str = "",
73727372
password: str = "",
7373-
token: str = "")
7373+
token: str = "",
7374+
max_retries: int = 5,
7375+
retry_backoff_factor: float = 1.0)
73747376
```
73757377

7376-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L41)
7378+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L51)
73777379

73787380
A connector to sink processed data to TDengine.
73797381

@@ -7416,10 +7418,12 @@ cannot be both a tag and field.
74167418
- If empty, no tags will be sent.
74177419
>***NOTE***: always converts tag values to strings.
74187420
Default - `()`.
7419-
- `time_key`: a key to be used as "time" when convert to InfluxDB line protocol.
7420-
By default, the record timestamp will be used with "ms" time precision.
7421-
When using a custom key, you may need to adjust the `time_precision` setting
7422-
to match.
7421+
- `time_setter`: an optional column name to use as "time" when convert to InfluxDB line protocol.
7422+
Also accepts a callable which receives the current message data and
7423+
returns either the desired time or `None` (use default).
7424+
The time can be an `int`, `string` (RFC3339 format), or `datetime`.
7425+
The time must match the `time_precision` argument if not a `datetime` object, else raises.
7426+
By default, a record's kafka timestamp with "ms" time precision is used.
74237427
- `time_precision`: a time precision to use when convert to InfluxDB line protocol.
74247428
Possible values: "ms", "ns", "us", "s".
74257429
Default - `"ms"`.
@@ -7444,6 +7448,11 @@ client authentication, primarily for additional logging.
74447448
client authentication (which should raise an Exception).
74457449
Callback should accept the raised Exception as an argument.
74467450
Callback must resolve (or propagate/re-raise) the Exception.
7451+
- `max_retries`: maximum number of retries for failed requests.
7452+
Default - `5`.
7453+
- `retry_backoff_factor`: a backoff factor applied between retry attempts starting from the second retry.
7454+
The sleep duration between retries is calculated as `{backoff factor} * (2 ** ({number of previous retries}))` seconds.
7455+
Default - `1.0`.
74477456

74487457
<a id="quixstreams.sinks.community.tdengine.date_utils"></a>
74497458

docs/api-reference/sinks.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ Callback must resolve (or propagate/re-raise) the Exception.
22262226
class TDengineSink(BatchingSink)
22272227
```
22282228

2229-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L40)
2229+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L50)
22302230

22312231
<a id="quixstreams.sinks.community.tdengine.sink.TDengineSink.__init__"></a>
22322232

@@ -2256,7 +2256,9 @@ def __init__(host: str,
22562256
verify_ssl: bool = True,
22572257
username: str = "",
22582258
password: str = "",
2259-
token: str = "")
2259+
token: str = "",
2260+
max_retries: int = 5,
2261+
retry_backoff_factor: float = 1.0)
22602262
```
22612263

22622264
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L51)
@@ -2334,4 +2336,9 @@ client authentication, primarily for additional logging.
23342336
client authentication (which should raise an Exception).
23352337
Callback should accept the raised Exception as an argument.
23362338
Callback must resolve (or propagate/re-raise) the Exception.
2339+
- `max_retries`: maximum number of retries for failed requests.
2340+
Default - `5`.
2341+
- `retry_backoff_factor`: a backoff factor applied between retry attempts starting from the second retry.
2342+
The sleep duration between retries is calculated as `{backoff factor} * (2 ** ({number of previous retries}))` seconds.
2343+
Default - `1.0`.
23372344

0 commit comments

Comments
 (0)