Batch output sinks (ndjson stdout + per-item files)#26
Open
paulius-krutkis-dcd wants to merge 1 commit into
Open
Batch output sinks (ndjson stdout + per-item files)#26paulius-krutkis-dcd wants to merge 1 commit into
paulius-krutkis-dcd wants to merge 1 commit into
Conversation
Add the two batch output destinations on top of the executor: - createNdjsonStdoutSink: one JSON record per line on stdout, regardless of TTY (the batch default). - createDirectorySink: one <name>.json file per item into a directory (created if needed); names derived from the input URL slug or row index via batchItemFilename, deduped on collision. Both share toBatchRecord so a record looks identical whether streamed or written to a file. Successes carry `result`, failures carry `error`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of 4 for the batch-input feature. Builds on
batch-executor.Adds the two batch output destinations on top of the executor (part 2):
createNdjsonStdoutSink— one JSON record per line on stdout, regardless of TTY (the batch default).createDirectorySink— one<name>.jsonfile per item into a directory (created if needed); names derived from the input URL slug or row index, deduped on collision.Both share
toBatchRecord, so a record is identical whether streamed or written to a file — successes carryresult, failures carryerror.Stack: 1/4 batch-input-parsing → 2/4 batch-executor → 3/4 (this) → 4/4 wire-batch-flags