subhramit commented on code in PR #73522:
URL: https://github.com/apache/airflow/pull/73522#discussion_r4088154462
##########
providers/influxdb/src/airflow/providers/influxdb/utils.py:
##########
@@ -28,3 +28,20 @@
def _convert_dataframe_to_records(dataframe: pd.DataFrame) -> list[dict[str,
Any]]:
"""Convert a query result DataFrame into a JSON-serializable list of
dictionaries."""
return json.loads(dataframe.to_json(orient="records", date_format="iso"))
+
+
+def _first_cell_is_truthy(dataframe: pd.DataFrame) -> bool:
+ """Return whether the first cell meets the sensor condition."""
+ import pandas as pd
Review Comment:
There is. See https://github.com/apache/airflow/pull/33483
(The rationale I understand) `utils.py` is imported by the operator and
trigger modules during Dag parsing and trigger loading. Module-level import
would load it whenever those modules are imported, even if no influxdb query or
sensor poke is executed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]