Disabling/removing intervals of data


I’d like to be able to remove a specified data interval from a datasource (not necessarily completely remove from deep storage, just make the interval look empty in Druid). I’ve found this post claiming the correct way to do that is by adding an interval-based drop rule, and indeed, it worked out fine for me. However, there are a few issues with this approach I’m not quite happy about:

  1. Drop rules seem to be persistent (correct me if I’m wrong): by setting one, I essentially tell Druid to keep this interval empty forever. I don’t want that; I just want to remove my mistakenly inserted data once. Of course, I could set the drop rule, wait for the data to be disabled, then delete the rule, but maybe there’s a better/more intuitive way to do it?

  2. I’d like to be able to issue remove commands programmatically, via console command or a script, but the docs recommend using Coordinator console for rule configuration. I couldn’t find the mentioned http endpoinds for programmatic rule configuration in coordinator docs either; it just seems possible to access the rules via /druid/coordinator/v1/rules/{dataSourceName}, not to add or remove one.


Ah, I’ve found a better way eventually: disable the datasource, send a kill task with the specified interval, and enable the datasource back.