Zip + 4 Problem

I have a source Excel file with zip codes. Most of these are 5 digit zip codes. The result of a KNIME workflow on these is OK. There are a few ZIP+4 codes. I am using a STRING MANIPULATION node to shorten these to 5 digit zip code (substr($Zip/Postal Code$,0,5)). This appears to work, but the result of the workflow is “?”. Any ideas?


Ballard, Jeff should be found in the second row as well.

Hi @Bob_Nelson,

i cannot quite grasp your problem…
Would it be possible to give an example workflow? (or at least some dummy data of your input / desired output?)

1 Like

Hello @Bob_Nelson,

possible some type mismatch. How are you populating Send Lead To column?

Br,
Ivan

1 Like

Excel can format the data to ZIP or ZIP+4. Ideally, I like the leading zeros.

Using STRING MANIPULATION, I can shorten the RAW Data. However, the resulting value is not able to be found in a JOIN performing a lookup.

image

Hello @Bob_Nelson,

to have leading zeroes use padLeft() function in String Manipulation node. Something like this:

padLeft( $yourColumnName$, 5 , "0")

Not sure if this will fix your joining issue. As @AnotherFraudUser mentioned above input data and desired output help a lot :wink:

Br,
Ivan

2 Likes

I am performing a JOIN lookup on zipcode. As shown in row 377, Ballard, Jeff is found properly for Zip5 95051. However, in row 391, he is not found for the same Zip5.

image

Hello @Bob_Nelson,

as said maybe it’s some type mismatch, maybe wrong Joiner configuration, maybe a bug but it’s all guessing from our side unless you share workflow with data. Understand if data is confidential. In that case can you anonymize part that is giving you incorrect results? Additionally you can try Cell Replacer node if you are only adding one column to your data set.

Br,
Ivan

1 Like

Adding the leading 0s with PAD LEFT has fixed it. I’m not entirely sure why, but I’m just glad it’s working.

2 Likes

Glad to hear it @Bob_Nelson.
Ivan

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.