-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-stepfunctions: add keyPath
parameter to the S3JsonItemReader constructor
#29889
Comments
Thanks @Lykan9999 for reaching out. Correct me if I understood it wrong. You want to make the keys dynamic so I think best way to implement this would be to make 'key' field accept dynamic values rather than hardcoded string. |
This would be useful to us as well. We'r trying to iterate over a fetched SQL table. The simplest way for Athena to iterate over rows is to store the SELECT as a .csv whose output location we cannot specify ahead of time. |
I still would like to be able to use a dynamic key. I have a StateMachine with a lot of dynamic steps that follow each other and I have to get the file_key from the previous_step:
Currently I'm not able to switch to this construct and have to keep using a CustomState object. |
Describe the feature
add an optional
keyPath
parameter to theS3JsonItemReader
constructor, that would allow for more dynamic S3 object fetching. Right now thekey
field only accepts a hard-coded string values. and we can't specify an object key that might be generated dynamically from a previous stepUse Case
DistributedMaps are great for orchestrating iterable tasks on big data, imagine a flow where the first step is a data fetching task that reads a huge dataset from a data vendor and writes a JSON dump of the responses in a S3 bucket, then you want to iterate over each of the responses in a DistributedMap, the data fetching service can generate the objectKey dynamically and set it to for example
$.data.objectKey
the the DistributedMap can reference it as follows:-Proposed Solution
Add a
keyPath
parameter to theS3JsonItemReader
constructorOther Information
I am not sure if there is an existing way we can do this, if yes then please enlighten me and mind my ignorance.
Acknowledgements
CDK version used
2.131.0
Environment details (OS name and version, etc.)
MacOS Sonoma 14.4.1 (23E224)
The text was updated successfully, but these errors were encountered: