Skip to content

feat: add bulk-ingest helper command#119

Merged
JoshMock merged 4 commits into
mainfrom
helpers/bulk-ingest
Apr 13, 2026
Merged

feat: add bulk-ingest helper command#119
JoshMock merged 4 commits into
mainfrom
helpers/bulk-ingest

Conversation

@flobernd
Copy link
Copy Markdown
Member

Summary

  • Add elastic es helpers bulk-ingest command for convenient bulk document ingestion
  • Supports three input modes: single file (--input-file), directory with glob patterns (--input-dir --glob), or piped stdin
  • Auto-detects JSON array vs NDJSON format per file
  • Automatic batching by byte size (--flush-bytes), configurable concurrency (--concurrency), and retries with exponential backoff (--retries, --retry-delay)
  • Recursive directory traversal by default, disable with --no-recursive
  • Reports progress to stderr and returns a structured summary

Depends on #118

…ion)

Extract error utilities into shared `src/es/errors.ts` so both the
existing ES handler and new helper commands can reuse them. Add shared
helper utilities (NDJSON parsing, bulk body builder, retry with backoff,
concurrency runner, progress reporter, glob file discovery) and register
an empty `helpers` group under the `es` command tree.
Add `elastic es helpers bulk-ingest` for convenient bulk document
ingestion with automatic batching, concurrency control, and retries.

Supports three input modes: single file (--input-file), directory with
glob patterns (--input-dir --glob), or piped stdin. Accepts both JSON
arrays and NDJSON format, auto-detected per file.
Base automatically changed from helpers/foundation to main April 13, 2026 16:30
@JoshMock JoshMock force-pushed the helpers/bulk-ingest branch from d051f7d to c2bb1a1 Compare April 13, 2026 18:20
Sending JSON-formatted errors to stderr happened in an upstream commit.
@JoshMock JoshMock enabled auto-merge (squash) April 13, 2026 19:02
@JoshMock JoshMock merged commit 422f2e3 into main Apr 13, 2026
16 checks passed
@JoshMock JoshMock deleted the helpers/bulk-ingest branch April 13, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants