Hi,
If I have barcode "dog" in a cache and barcode " dog" (with 2 leading spaces) in a datastream, they are getting merged/joined by Join Data from Cache.
Is that expected behavior?
Thank you for any insights.
Best,
Andrew
Hi,
If I have barcode "dog" in a cache and barcode " dog" (with 2 leading spaces) in a datastream, they are getting merged/joined by Join Data from Cache.
Is that expected behavior?
Thank you for any insights.
Best,
Andrew
Andrew, this is weird and I don't have an answer for you, other to say that I did the experiment with writing to a file instead of a cache, and I see the same behavior. The file has the data correctly padded (I used two spaces before dog, and another with two spaces after dog), but the join component (in this case, join data from file) treats them as the trimmed string on the join.
Thanks very much for confirming the behavior, James. I'll admit it doesn't seem ideal handling to me, especially unadvertised.
I agree that this behavior should probably be mentioned on the component help. I'll take care of that. However, looking at it from another angle, many people can have spurious, unknown whitespace in their data set values which can lead to some non-obvious troubleshooting when trying to figure out why seemingly identical values (to the eye) are NOT being joined. Seen that way, trimming leading and trailing whitespace seems reasonable, IMHO.
Thanks for the reply, Craig .. apologies for my delay .. I forgot I wasn't getting alerts on the post. Yes, yes .. I can completely understand use cases where whitespace trimming could help .. though, I will assert similar levels of perplexment if one isn't aware of which version (+ or - whitespace) is coming out of the join stream .. that is, does the cache have the extra whitespace or does the data stream have the extra whitespace? If it is the data stream, then you have to keep perpetuating unannounced trimming behaviors downstream etc. to help save/prevent data artifacts. Certainly, data are not perfect .. smile. Thanks again.