10-21-2024 09:05 AM
Hi,
I have a parent pipeline that is receiving an array of client_code. I have mapped and routed it to two child pipelines and would like to execute the each of the child pipeline for each of the code.
Let's say for 3 incoming client_codes. I want to execute each out of two child pipeline 3 times (so six parallel executions). Following is screenshot of parent pipeline.
Solved! Go to Solution.
a month ago
If thats the case then, in a Mapper Snap(befor the JSON Splitter), parse the String to JSON using JSON.parse function.
10-21-2024 09:22 AM
Hey @pranjbhatt
You will need to split the incoming array of client codes using JSON Splitter Snap and then you will have the elements of the array as a separate documents.
10-21-2024 10:15 AM - edited 10-21-2024 10:15 AM
Hi,
I am calling the client_code as JSON Object {"clients" : [{ "client_code": "OHSU"}, {"client_code":"scj"}]}
in pipeline parameter before mapping, but it converts into a string before passing to JSON Splitter Snap.
This throws error.
10-22-2024 02:32 AM
Why you are passing the object as a pipeline parameter?
You should split the clients array, and then pass the array elements as inputs to the child pipelines.
10-22-2024 09:59 AM - edited 10-22-2024 09:59 AM
Hi @SpiroTaleski
I am receiving client details and their tokens in pipeline parameters via airflow. They are in JSON object now, as follows-
{
"clients": [
{
"client_code": "OHSU",
"client_token": "xxxxxx"
},
{
"client_code": "scj",
"client_token": "xxxxxx"
}
]
}
But, JSON Splitter snap still throws error, as pipeline parameters defaults it to String. Is there a way to parse above JSON before sending to child pipelines?