@@ -1644,3 +1644,93 @@ def run()
16441644
16451645Produces data from the DataFrame row by row.
16461646
1647+ < a id = " quixstreams.sources.community.influxdb3.influxdb3" >< / a>
1648+
1649+ # # quixstreams.sources.community.influxdb3.influxdb3
1650+
1651+ < a id = " quixstreams.sources.community.influxdb3.influxdb3.InfluxDB3Source" >< / a>
1652+
1653+ # ## InfluxDB3Source
1654+
1655+ ```python
1656+ class InfluxDB3Source(Source)
1657+ ```
1658+
1659+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sources/ community/ influxdb3/ influxdb3.py# L79)
1660+
1661+ InfluxDB3Source extracts data from a specified set of measurements in a
1662+ database (or all available ones if none are specified).
1663+
1664+ It processes measurements sequentially by gathering/ producing a tumbling
1665+ " time_delta" - sized window of data, starting from ' start_date' and eventually
1666+ stopping at ' end_date' , completing that measurement.
1667+
1668+ It then starts the next measurement, continuing until all are complete.
1669+
1670+ If no ' end_date' is provided, it will run indefinitely for a single
1671+ measurement (which means no other measurements will be processed!).
1672+
1673+ < a id = " quixstreams.sources.community.influxdb3.influxdb3.InfluxDB3Source.__init__" >< / a>
1674+
1675+ < br>< br>
1676+
1677+ # ### InfluxDB3Source.\_\_init\_\_
1678+
1679+ ```python
1680+ def __init__ (
1681+ host: str ,
1682+ token: str ,
1683+ organization_id: str ,
1684+ database: str ,
1685+ key_setter: Optional[Callable[[object ], object ]] = None ,
1686+ timestamp_setter: Optional[Callable[[object ], int ]] = None ,
1687+ start_date: datetime = datetime.now(tz = timezone.utc),
1688+ end_date: Optional[datetime] = None ,
1689+ measurements: Optional[Union[str , list[str ]]] = None ,
1690+ measurement_column_name: str = " _measurement_name" ,
1691+ sql_query: Optional[str ] = None ,
1692+ time_delta: str = " 5m" ,
1693+ delay: float = 0 ,
1694+ max_retries: int = 5 ,
1695+ name: Optional[str ] = None ,
1696+ shutdown_timeout: float = 10 ,
1697+ on_client_connect_success: Optional[ClientConnectSuccessCallback] = None ,
1698+ on_client_connect_failure: Optional[ClientConnectFailureCallback] = None
1699+ ) -> None
1700+ ```
1701+
1702+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ sources/ community/ influxdb3/ influxdb3.py# L94)
1703+
1704+
1705+ < br>
1706+ ** * Arguments:***
1707+
1708+ - `host` : Host URL of the InfluxDB instance.
1709+ - `token` : Authentication token for InfluxDB.
1710+ - `organization_id` : Organization name in InfluxDB.
1711+ - `database` : Database name in InfluxDB.
1712+ - `key_setter` : sets the kafka message key for a measurement record.
1713+ By default, will set the key to the measurement' s name.
1714+ - `timestamp_setter` : sets the kafka message timestamp for a measurement record.
1715+ By default, the timestamp will be the Kafka default (Kafka produce time).
1716+ - `start_date` : The start datetime for querying InfluxDB. Uses current time by default.
1717+ - `end_date` : The end datetime for querying InfluxDB.
1718+ If none provided, runs indefinitely for a single measurement.
1719+ - `measurements` : The measurements to query. If None , all measurements will be processed.
1720+ - `measurement_column_name` : The column name used for appending the measurement name to the record.
1721+ - `sql_query` : Custom SQL query for retrieving data.
1722+ Query expects a `{start_time}` , `{end_time}` , and `{measurement_name}` for later formatting.
1723+ If provided, it overrides the default window- query logic.
1724+ - `time_delta` : Time interval for batching queries, e.g., " 5m" for 5 minutes.
1725+ - `delay` : An optional delay between producing batches.
1726+ - `name` : A unique name for the Source, used as part of the topic name.
1727+ - `shutdown_timeout` : Time in seconds to wait for graceful shutdown.
1728+ - `max_retries` : Maximum number of retries for querying or producing.
1729+ Note that consecutive retries have a multiplicative backoff.
1730+ - `on_client_connect_success` : An optional callback made after successful
1731+ client authentication, primarily for additional logging.
1732+ - `on_client_connect_failure` : An optional callback made after failed
1733+ client authentication (which should raise an Exception ).
1734+ Callback should accept the raised Exception as an argument.
1735+ Callback must resolve (or propagate/ re- raise ) the Exception .
1736+
0 commit comments