Unfortunately I have a measurement that have fields with an number as the “_value” but the type is a string instead of an integer.
I want to convert the “_value” to integer (overwrite). How can I convert this?
Unfortunately I found no easy way to do this.
That’s why I write a query to get this measurement convert this to integer and write this to a new bucket:
datatoconvert = from(bucket: "telegraf") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "asset_vm_cmdb") |> toInt() datatoconvert |> filter(fn: (r) => exists r._value) |> to(bucket: "typeconversion", org: "<MY_ORG>")
I can’t run this query, maybe because of reaching the timeout.
So I thought I can prevent this by create a “task” for this. But the task always fails with following error message: could not execute task run; Err: context canceled: context canceled
Can someone help me?