Using InfluxQL with this query, one could convert a table from Float
to Integer
:
SELECT value::integer INTO temp FROM measurement;
DROP MEASUREMENT measurement;
SELECT value::integer INTO measurement FROM temp;
DROP MEASUREMENT temp;
How can the same be done using Flux
in InfluxDB 2?
InfluxDB 2 has an InfluxDB 1 compatibility layer, but this doesn't support SELECT ... INTO ...
clauses: https://docs.influxdata.com/influxdb/v2.1/reference/api/influxdb-1x/#influxql-support
So one does have to write the query using Flux
, the new query language.