InfluxQL does not offer ways to alter the structure of InfluxDB metadata (measurements, series, fields, tags, …). This has been a known limitation for a very long time, see for example the following open feature requests:
As a workaround to these limitations, we, at ABC Arbitrage developed infix, a command line tool designed to apply rules to
infix support rules like
infix will scan your data and wal directories and apply a set of rules directlty to
wal files, rewriting them.
We’d like to get feedback from the community. Feel free to download and try the tool. If you think a rule is missing, please fill an issue or open a Pull Request if you want to contribute your own rule.