I am performing a batch transform on my ES index (only transforming for once and not a continuous job). Is there an API or indicator that returns a response once the transformation is done (so that I could then stop the transform job)?
Batch transform auto-stop, so there is no task being leftover after it is done. The only "left-over" beside the transformed data are 2 tiny documents in an internal index.
If you are looking for a callback you can use in code, you can call _stop
with wait_for_completion
and wait_for_checkpoint
being set to true
. wait_for_completion
will tell it to block and wait_for_checkpoint
will tell it to not stop the transform in an intermediate state but let it run until a checkpoint is ready (Batch transforms have just 1 checkpoint).
Just a quick follow up, to set a query parameter for the _stop api, is this how I should do it?
curl -X POST "localhost:9200/_transform/<jobID>/_stop?pretty" -d'
{
"query": {
"wait_for_completion": true,
"wait_for_checkpoint": true
}
}
'
query parameters go into the URL part:
curl -X POST "localhost:9200/_transform/ecommerce_transform/_stop?wait_for_completion=true&wait_for_checkpoint=true"
(I removed pretty
, its not needed)
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.