Hello, I use the Flux language on Influxdb like here
And I would like to know if we can rename the name of the devices with an “AS” for example as in sql for the “topic” here
Thank you for your answers
Hello, I use the Flux language on Influxdb like here
And I would like to know if we can rename the name of the devices with an “AS” for example as in sql for the “topic” here
Thank you for your answers
Have you tried replacing the last line with something like this?
|> yield(name: "desired_name")
How about using a rename function?
rename(columns: {topic: "eui_name"})
Also, this may help others in the future: TL;DR InfluxDB Tech Tips: Converting InfluxQL Queries to Flux Queries | InfluxData
Thank you for your help, I found solution in an other topic
|> map(fn: (r) => ({ r with _field: if r._field == “field_name” then “device_name” else “” }) )