Whoops you need to instantiate your write client like so:
_write_client = client.write_api(write_options=WriteOptions(batch_size=1000,
flush_interval=10_000,
jitter_interval=2_000,
retry_interval=5_000))
@Ashish_Sikarwar,
You can use the to() flux function to write the data to a new measurement like so:
|> to(bucket: “test”, measurementColumn: “Total_Processor_Time” ) assuming that you already have a measurement with that name in that bucket. Otherwise you could just write the data to a new bucket.
@Anaisdg one more thing.
I need to query last 30 days data but only wants mean of data points with certain timestamp with five minutes of interval (not all the data of last 30 days)
like from
11:00 am to 11:05 am, 11:05 am to 11:10 am
There is a function which help to get hourly data but i need hours+minute
|> hourSelection(start: date.hour(t: now()), stop: date.hour(t: now()))
Will “date” package be of any help and how can i use it. https://docs.influxdata.com/flux/v0.65/stdlib/date/
@Ashish_Sikarwar Is there not a _time column when you run the query as-is (with the mean() call commented out? mean() itself is an aggregate function, which does remove the _time column, but if you’re running the query as you pasted it in, it should still have a time column.