Refine
This commit is contained in:
@@ -1460,7 +1460,7 @@ def query_SCADA_data_by_device_ID_and_timerange(query_ids_list: List[str], start
|
||||
flux_query = f'''
|
||||
from(bucket: "{bucket}")
|
||||
|> range(start: {utc_start_time.isoformat()}, stop: {utc_end_time.isoformat()})
|
||||
|> filter(fn: (r) => r["device_ID"] = {device_id} and r["_field"] == "monitored_value")
|
||||
|> filter(fn: (r) => r["device_ID"] == "{device_id}" and r["_field"] == "monitored_value")
|
||||
|> pivot(rowKey: ["_time"], columnKey: ["device_ID"], valueColumn: "_value")
|
||||
|> sort(columns: ["_time"])
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user