11-05-2020 05:04 AM
I am using the Join snap with merge to take the output from two different pipeline execute snaps invoked from the same parent pipeline.
Parent pipeline as shown below:
I am passing the same input to both pipeline execute snaps by using the copy snap. There is a chance of the fetchPDF pipeline might fail when it is able to find the respective PDF in which case there will not any input for the same.
Input:
[{
“Path”: “sldb:///ZipDemo/108600000001.xml”
}, {
“Path”: “sldb:///ZipDemo/108600000002.xml”
}, {
“Path”: “sldb:///ZipDemo/108600000003.xml”
}]
=================================
Join snap is producing the below output:
[{
“xmlStorageLocation”: “ZipDemo/storage/108600000001.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000001.xml”
},
“pdfStorageLocation”: “ZipDemo/storage/108600000002.pdf”,
“input1_original”: {
“Path”: “sldb:///ZipDemo/108600000002.xml”
}
}, {
“xmlStorageLocation”: “ZipDemo/storage/108600000002.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000002.xml”
}
}, {
“xmlStorageLocation”: “ZipDemo/storage/108600000003.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000003.xml”
}
}]
=========================
But the expected output should like below:
[{
“xmlStorageLocation”: “ZipDemo/storage/108600000001.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000001.xml”
}
}, {
“xmlStorageLocation”: “ZipDemo/storage/108600000002.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000002.xml”
},
“pdfStorageLocation”: “ZipDemo/storage/108600000002.pdf”,
“input1_original”: {
“Path”: “sldb:///ZipDemo/108600000002.xml”
}
}, {
“xmlStorageLocation”: “ZipDemo/storage/108600000003.xml”,
“original”: {
“Path”: “sldb:///ZipDemo/108600000003.xml”
}
}]
====================================
see the below screenshot:
Can somebody can help me in understanding the behaviour.
pipeline: Join-Behaviour_2020_11_05.slp (9.6 KB)
Solved! Go to Solution.
11-05-2020 05:50 AM
Hi Patan,
You can try left outer join with $original.path as join condition for both left and right paths. Merge will simply combine the left and right docs and if there is a difference in count then it will join incorrectly. With left outer join all the output docs for create will be present with the corresponding fetch results.
Thanks, V
11-05-2020 05:50 AM
Hi Patan,
You can try left outer join with $original.path as join condition for both left and right paths. Merge will simply combine the left and right docs and if there is a difference in count then it will join incorrectly. With left outer join all the output docs for create will be present with the corresponding fetch results.
Thanks, V