โ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