When you use the Profiling perspective of the studio to analyze phone numbers in a database, you can later generate a ready-to-use Job that will give a correct format to the phone numbers in the specified column.
For further information on phone number indicators, see Phone number statistics.
Prerequisite(s):A column analysis on phone numbers has been created and executed in the Profiling perspective of the studio. For detailed steps on how to create a column analysis, see Defining the columns to be analyzed and setting indicators.
To standardize phone numbers in an analyzed column, do the following:
From the Profiling perspective of the studio, set Phone Number Statistics indicators on the specified column that holds phone numbers.
Execute this analysis and click the Analysis Results tab at the bottom of the analysis editor to open the corresponding view.
For more information, see Finalizing and executing the column analysis and How to access the detailed view of the analysis results.
In the Phone Number Statistics table and in the Count list, right-click Valid Phone Number Count, Possible Phone Number Count or Well formed National Number Count and then select Generate a standardization phone number job from the contextual menu.
The Integration perspective opens in the Studio showing the generated Job with the tStandardizePhoneNumber component. For more information on this component, see the data quality chapter in the Talend Components Reference Guide.
A node for the newly generated Job shows as well under the Job design folder in the Repository tree view of the Integration perspective.
In the generated Job, the input and the tStandardizePhoneNumber components are already configured according to the connection you use for the column analysis and according to the column you are analyzing.
The output component is a file component, but you can replace it with a database output component to write the standardize phone numbers directly in a specific database, for example.
To decide the format to be used to standardize the phone numbers:
Double-click the tStandardizePhoneNumber component to open the Component view.
From the Phone number format for output list, select the format according to which you want to standardize the phone numbers in the selected column.
Save your changes.
To configure the output component:
Double-click the output component and in the File Name field, set the path to the output file that will hold the phone number analysis results.
In the Sheet Name field, set the name of the excel sheet in which you want to write the standardization results.
Save the Job and press F6 to execute it.
The phone number standardization results are written to the specified excel sheet.
If required, right-click tFileOutputExcel in the generated Job and select Data Viewer.
A preview of the standardized data is open in the studio.