I'm looking for a way to look at the zip code field in my data and determine if it is less than 5 digits in length.
The transform node could gives you any number of ways to do this with some fairly simple Python.
For an even easier solution we can use the Filter node's "Advanced" feature to add the python function of LEN() to count the length of the test and filter record in or out.
simply swap the field name on your input pin for the 'ZipCode' field I created in the example above.
This example filter find all the records with less than (<) a length of 5 characters. You can swap the '<' character for;
One could take this one step further and use a "split" node, which uses the same underlying code as the filter node, but not only do you get the matches for your filter criteria, you get the records that don't match on a 2nd output pin.
In the example above you can see we get the 4 records that are under a length of 5 on the 1st pin and the 11 records that are the perfect length of 5 on the 2nd pin, really cool to progress your flow and still exception manage those 'bad' records with an email alert or writing them off to a file.
Have a play and let us know how you get on :)
You can also use regular expressions in a Transform node to identify strings with a zip or zip+4 formats:
See the attached example data flow
Check_Zip_Code_Validity - 20 May 2022.lna
Thanks to both of you for responding. Both solutions worked great! John, I did have to account for NULL in my data but I just put a split node in front of your filter solution and it worked fine. Thanks again.