Somewhat new to influxdb and I was wondering is there a TRUNCATE like command at all? I have an influxdb I want to truncate and completely reset to an empty state on a deployment of some new code.
Only way I can see to make this happen is via a drop and create however this causes issues with the app’s current codebase.
Hello @lukekhamilton,
Thank you for your question. You can drop a database or delete a series. Since InfluxDB is an append-only DB, it doesn’t have as many management commands as SQL. Please take a look at the InfluxDB docs here.
DELETE and TRUNCATE are only for InfluxQL? Are there any equivalent for Flux, since I presume that is the only query language for InfluxDB 2.0. There is the drop() function for Flux, but I tried the following and it is not working for me. The data is still there:
I guess maybe that query function isn’t needed in 2.0, because you can set the data Retention policy? Even so, I would still like to have that DELETE ALL control on hand just in case.