05-28-2018 06:00 AM
I have a mapper and I have a expression as below
$.hasOwnProperty(‘query’) ? $query : ‘not present in input’
The expression is working fine if input comes to mapper. But if there is no input/input doest contain query it should return ‘not present in input’. ‘not present in input’ is coming if input doesnt contain query. This should work if no input is passed to Mapper right. If that is not the case how can I overcome If no input is passed to mapper.
Tried “snap.in.totalCount” also. No result.
Solved! Go to Solution.
05-30-2018 08:31 AM
Sandeep,
Many snaps will do nothing if there is no input at all from a previous snap. In order to get around this, you can create a JSON Generator to produce a dummy document and merge it with your normal input using the JOIN snap. Check the link below for an example.
05-30-2018 08:31 AM
Sandeep,
Many snaps will do nothing if there is no input at all from a previous snap. In order to get around this, you can create a JSON Generator to produce a dummy document and merge it with your normal input using the JOIN snap. Check the link below for an example.
05-30-2018 11:52 PM
@brettdorsey, Got your point and Implemented the same…