Forum Discussion
Welcome @ausman - you are correct that you cannot “save” a value back to pipeline parameters, but there are a some easy ways to do what you are looking to do.
One simple method is to have a main pipeline that reads from the SQS queue then calls a child pipeline to do the work on that file. Then the main pipeline can use the $original object value that returns from the Pipeline Execute snap to get the object that was originally passed into the child pipeline.
Another way (which in my opinion is a little more cumbersome) is to use the Copy snap after the SQS read and a Join snap using the Merge merge type after you have completed the work on the file so you can re-use that original value that was returned from the SQS queue.
I’m sure some other clever folks could give you other ways to solve the same issue, but these are pretty simple to understand and implement.
Hope this helps!
- j_angelevski4 years agoContributor III
Hi @SL12345,
Just use a JSON Splitter and split on
$CarDetails
array, but make sure you have enabled “Include scalar parents” option in the JSON Splitter.Result:
thank you, that is really what i wanted 🙂 and is it possible to wrap this content into object so from this:
{ "CompanyName": "TestCompany", "CompanyAddress": "TestAddress", "Brand": "BMW", "Year": "2020", "Fuel": "Petrol" } , { "CompanyName": "TestCompany", "CompanyAddress": "TestAddress", "Brand": "Jaguar", "Year": "2020", "Fuel": "Diesel" }
create this? Adding “Cars” as header or envelope for body/content?
{ "Cars": { "CompanyName": "TestCompany", "CompanyAddress": "TestAddress", "Brand": "BMW", "Year": "2020", "Fuel": "Petrol" } , { "CompanyName": "TestCompany", "CompanyAddress": "TestAddress", "Brand": "Jaguar", "Year": "2020", "Fuel": "Diesel" } }
- JensDeveloper4 years agoContributor II
Hi @SL12345 ,
Have you tried putting a groupByN snap behind it and as target field $Cars.
Regards
Jens
Related Content
- 3 months ago
- 3 years ago
- 5 years ago