I’m using join snap to with a condition NOT, surprisingly the validation is giving me output, but when i’m running the pipeline it is giving me an error, Can someone please help me understand what i’m doing wrong
ERROR message: Not comparable objects: String abc and Boolean false
Hi Can anyone help me with this?
Hi @dd_snaplogic,
The two entities that you’re trying to compare, should be of the same data type. Adding a !(not) in front of your $abc field which I presume is of a type String, will turn that field into a boolean value - false. So you’ll end up comparing boolean and string.
If I understand correctly, you want the records that do not match? If that’s the case, you can open an error view on the Join snap, and select the ‘Unmatched data to error view’ option:
Hope this helps,
Regards,
Bojan
@bojanvelevski / @dd_snaplogic - I would recommend against sending all of the unmatched to an error view. These errors wind up in the jcc.logs and can cause space issues if there is a large volume of records that go down that path.
Instead, I would recommend that you use a Left Outer join condition and either Filter or Router the results for matched and unmatched records.
@bojanvelevski Yes i saw that options of sending unmatched data in error view, but that will also send the data to my error pipeline so route options to error view is not an option.
At the end i used the path similar to what @koryknick suggested. used left outer join and with a filter $input1_abc ==null as my condition for unmatched data.
I do remember earlier it was not like that, I could use !(NOT) condition in the path itself and it used to work.
@dd_snaplogic - If you can find a case where this is working the way you originally described, I would be very interested. The snap always uses an equality join, so “left path value == right path value” is the only way this snap works. By adding the not operator (!) to either of the values would simply make it a boolean value meaning that it evaluates as true only when the incoming value is null, zero, or empty string.
I’m checking with our developers, but perhaps the snap’s datatype checking has been improved so that it is now throwing the error that boolean is not comparable to a string value. But the evaluation still would not have been the behavior that I believe you were intending. (i.e. “true” == “abc” )