JupyterLab Extension for INFACore

JupyterLab Extension for INFACore

Validate the Unites States zip code

Validate the Unites States zip code

You can validate if the input data is a five-digit United States zip code.
To perform this operation, select the
Validate USA Zipcode
function, and specify the data object variable. Then, enter the column name that contains the United States zip codes that you want to validate.
When you run the code, the function validates if the zip code is valid.
For example, the input flat file includes a column named
zipcode
that contains the Unites States zip codes.
The following snippet is the input code when you apply the function:
import informatica.infacore as ic FF_DV = ic.get_data_source("Flat File").get_connection("DR_FlatFile").get_data_object("input.csv") dqf = ic.DataQualityFunctions() dqf.validate_usa_zipcode(FF_DV,"zipcode")
The following snippet shows the validation values for the zip codes:
ZIPCode: string Validation_Status: string ---- ZIPCode: [["99501","000","12340"]] Validation_Status: [["Valid","Invalid","Invalid"]]

0 COMMENTS

We’d like to hear from you!