I am using influxDB instead of MySQL for time series analysis. In my database data
, I have a series which is called /HFT/Data_HFT/OrderBook/DCIX_OB
. That name is irrelevant and it was created by error. That series has 89 million lines, so it would be very long to recreate that series.
So this is not a solution for me:
SELECT * INTO new_name FROM old_name
DROP MEASUREMENT old_name
I tried that solution, but it didn't work at all. Here is the error :
> RENAME MEASUREMENTS 'OLD_NAME' to 'NEW_NAME'
ERR: error parsing query: found RENAME, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1
How could I rename it?
SELECT * INTO new_name FROM old_name
will convert all your tags into fields of type string and your data will be corrupt. There is no current way to rename. To do the copy properly, see my solution below.