Forum Discussion
@Supratim, Thanks for the inputs. My requirement is to handle both things e.g. I want to assign the value ‘S’ in mapper if it’s NULL OR its S.
How I can do it, please suggest.
($input0.final_document.Pipeline_Status==‘S’ OR NULL) && ($input1.final_document.Pipeline_Status==‘S’ OR NULL) && ($input2.final_document.Pipeline_Status==‘S’ OR NULL)
You’re quite close:
($input0.final_document.Pipeline_Status=='S' || $input0.final_document.Pipeline_Status== null) && ($input1.final_document.Pipeline_Status=='S' || $input1.final_document.Pipeline_Status== null) && ($input2.final_document.Pipeline_Status=='S' || $input2.final_document.Pipeline_Status== null)
Or, other thing that you can try is the following:
$input0.final_document.Pipeline_Status matches 'S'|null && $input1.final_document.Pipeline_Status matches 'S'|null && $input2.final_document.Pipeline_Status matches 'S'|null
- bojanvelevski4 years agoValued Contributor
Hey @darshthakkar,
You have couple of options here:
- Group by/Gate, and a maper after with $group.length function
- Aggregate snap
- snap.in.totalCount combined with Tail snap
Third one is a bit abstract and I’m not a big fan of, but I listed it as an option anyway.
Hope this helps,
BR- darshthakkar3 years agoValued Contributor
Thanks @bojanvelevski, all of them worked.
My personal favorite is suggestion 1 as 2 has an overhead to the performance of the pipeline.Closing this thread now.
Related Content
- 10 months ago
- 5 years ago
- 2 years ago
- 4 years ago