New to Kestra?
Use blueprints to kickstart your first workflows.
Ingest any HTTP JSON dataset into OpenSearch with Kestra. Download, convert to line-delimited JSON with Python, and bulk index with the Load task.
The fastest way to make a dataset searchable is three tasks. This blueprint downloads a public JSON array over HTTP with io.kestra.plugin.core.http.Download, reshapes it into one JSON object per line with a ten-line Python script, and hands the file to io.kestra.plugin.opensearch.Load, which bulk indexes it with each record's id as the document id, so reruns overwrite documents instead of duplicating them.
download_dataset (io.kestra.plugin.core.http.Download) fetches the JSON array and stores it in internal storage, exposed as {{ outputs.download_dataset.uri }}.to_ndjson (io.kestra.plugin.scripts.python.Script on the Process task runner, no container needed) maps the file in through inputFiles, writes one JSON object per line to users.ndjson declared in outputFiles, and emits the record count through Kestra's output protocol as {{ outputs.to_ndjson.vars.record_count }}.index_users (io.kestra.plugin.opensearch.Load) reads the file from {{ outputs.to_ndjson.outputFiles['users.ndjson'] }} and bulk indexes it into the users index. With idKey: id and removeIdKey: false, the record's own id becomes the document id and stays in the source. The task reports {{ outputs.index_users.size }} records sent.notify posts both counts to Slack, converted and sent, so a mismatch surfaces immediately.errors block posts a distinct Slack alert naming the failed execution.A one-off curl-python-bulk script does this once; a flow does it observably forever. Each stage's artifact lands in internal storage, so a failed load reruns without re-downloading, the counts land in Slack and in the execution history, and swapping the source URL or the target index is a one-line change reviewed in version control. Add a schedule and the same three tasks become a refresh pipeline.
users index.Process task runner; only the standard library is used.OPENSEARCH_HOST: OpenSearch endpoint, for example https://opensearch.example.com:9200.OPENSEARCH_USERNAME: OpenSearch username.OPENSEARCH_PASSWORD: OpenSearch password.SLACK_WEBHOOK_URL: Slack incoming webhook URL.users index in OpenSearch Dashboards to see the documents.uri at your real data source and rename the index.Schedule trigger to turn the one-shot ingestion into a recurring refresh.opType: CREATE on the Load task to fail on duplicates instead of overwriting when appending immutable events.io.kestra.plugin.opensearch.Search counting documents in the target index.