About disabling and deleting segments

Hi,

I have a use case where the data for current week gets refreshed daily. As such, my go-to approach was to delete the segments created for this week and ingest the new set of data. For this I am doing this -

  1. A POST request to /druid/coordinator/v1/metadata/datasources/<datasource_name>/segments to get the list of segments for the timeframe I need

  2. Do a DELETE request to /druid/coordinator/v1/datasources/{datasource_name}/segments/{segmentId}

Is there an API where I can pass the list of segment IDs in a single API call as opposed to making as many API calls as my segments?

Or is there a better approach than this?

Hi Karthik,

Does using an interval work for you ? /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval} See https://druid.apache.org/docs/latest/operations/api-reference.html

Thanks,

Sashi

With a delete? I will give it a try.

Yes.