JupyterLab Extension for INFACore

JupyterLab Extension for INFACore

Validate a state in the United States

Validate a state in the United States

You can apply this function to verify if the entry is a valid state in the United States.
To perform this operation, select the
Validate USA State
function, and specify the data object variable. Then, enter the column name that contains the state names that you want to validate.
When you run the code, the function validates the state name.
For example, the input flat file includes a column named
state
that contains the names of the states in the Unites States.
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_state(FF_DV,"state")
The following snippet shows the output returned with the validation values for the states:
State: string Out_State_Status: string ---- State: [["Punjab","California","California1"]] Out_State_Status: [["Invalid","Valid","Invalid"]]

0 COMMENTS

We’d like to hear from you!