Hello, everyone!
I'm writing a process that extracts ~1.5 millions rows from a SQL Stored Procedure to one single JSON file, and put it in a DynamoDB table using AWS CLI command.
My currently workflow below:

I'm using the ExecuteSQLRecord to extract the data from the SQL Stored Procedure. My JSON output looks exactly like this:
[ {
"CUSTOMER_ID" : "11111111111",
"TRANSACTION_TYPE" : "G",
"ID_TRANSACTION" : 3,
"ACCOUNT_ID" : 111111111,
"TRANSACTION_VALUE" : "100.00"
}, {
"CUSTOMER_ID" : "22222222222",
"TRANSACTION_TYPE" : "G",
"ID_TRANSACTION" : 10,
"ACCOUNT_ID" : 222222222,
"TRANSACTION_VALUE" : "1000.00"
}, {
"CUSTOMER_ID" : "33333333333",
"TRANSACTION_TYPE" : "R",
"ID_TRANSACTION" : 8,
"ACCOUNT_ID" : 333333333,
"TRANSACTION_VALUE" : "3000.00"
}
]
Each row from the resultset is an item in the JSON file.
After that, I use the PutFile to save the JSON file in my local machine, then I'm going to use the ExecuteStreamCommand to execute the AWS CLI command.
The question is: How can I format my JSON output file to a JSON format file that respects the DynamoDB rules (with the RequestItems and TableName attributes)?
Any help will be appreciated
Thanks!