Powershell - Send DROP command

I’m using InfluxDB 1.7 as host data for my Grafana.
I’m using Powershell (Module Influx) to grab data and send them to my InfluxDB.
I’ve one serie for which I need only fresh data, so I’d like to drop all data before sending updated one in.
Question : How can I send an "DELETE FROM " to my Influx using Powershell ?
Thanks for helping

Hi @Thierry,

It doesn’t look like that Powershell module supports deleting or dropping data. The full list of cmdlets is here.

Your use case sounds somewhat unusual; most users do not drop all data from a series each time they insert new data. Why do you feel it is necessary to do so?

If you are concerned about disk space, would retention policies help? They allow you to drop all data older than a certain date.

If you only want to query data from one “collection”, is it possible to query by time range, or add a tag identifying each different dataset you want to query?

Hi @noahcrowley ,

Thanks to confirm.
As you explain to me, retention policies will do the job.

Thanks for helping.

1 Like