Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Implement Map ItemReader #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agrare
Copy link
Member

@agrare agrare commented Nov 5, 2024

The ItemReader looks a lot like a Task state in that it has a "Resource" URI field

https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemreader.html

Ref: https://states-language.net/#map-state

Reading Items

A Map State MAY have an "ItemReader" field, whose value MUST be a JSON object and is called the ItemReader Configuration. The ItemReader Configuration causes the interpreter to read items from the resource identified by the ItemReader Configuration’s "Resource" field.

The ItemReader Configuration MUST have a "Resource" field, whose value MUST be a URI that uniquely identifies the specific task to execute. The States language does not constrain the URI scheme nor any other part of the URI. The ItemReader Configuration MAY have a "Parameters" field, whose value MUST be a Payload Template. The ItemReader Configuration MAY have a "ReaderConfig" field whose value is a JSON object which MAY have a "MaxItems" field which MUST be a positive integer. The interpreter MAY define additional "ReaderConfig" fields.

The ItemReader Configuration causes the interpreter to read items from the task identified by the ItemReader’s "Resource" field. The interpreter will limit the number of items to the maximum number of items specified by the "ReaderConfig"’s "MaxItems" field. The "MaxItems" can be provided indirectly. A "ReaderConfig" field MAY have "MaxItemsPath" field which MUST be a Reference Path which, when resolved, MUST select a field whose value is a positive integer. A "ReaderConfig" field MUST NOT include both "MaxItems" and "MaxItemsPath".

The default result for "ItemReader" is "$", which is to say the whole effective input.

#241

@agrare agrare requested a review from Fryguy as a code owner November 5, 2024 19:17
@agrare agrare changed the title Implement Map ItemReader [WIP] Implement Map ItemReader Nov 5, 2024
@agrare agrare mentioned this pull request Nov 12, 2024
7 tasks
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.

1 participant