Convert String to Number |
The Convert String to Number transformer takes values in a String attribute, recognizes them using a reference list of number formats, and attempts to convert them to a standard Number format.
Use Convert String to Number when you have numeric values held in a String attribute and wish to perform number-specific processing on them - for example to run them through a Number Profiler.
In order to find numeric values in a String attribute, run the Data Types Profiler. To isolate records that do not have the expected data type in a given attribute, run a Data Type Check.
Note: The Convert String to Number processor itself can do this in isolation, as it will "fail to convert"; that is, convert as null, any values that are not recognized as numbers using its reference list.
In order to convert a String attribute into the Number format, the processor needs to recognize numeric values correctly. This is achieved using a reference list with a standard set of numeric formats. A default standard Number Formats list is provided for this purpose.
One or more String attributes for conversion to a Number data type.
Note: If multiple attributes are submitted for conversion and one fails the entire record is marked as having failed, although the valid attributes will be correctly converted.
|
Option |
Type |
Purpose |
Default Value |
|
List of recognized number formats |
Reference Data (Number Formatting Category) |
Recognizes numbers in a variety of different formats. The reference data is checked in order, so numbers are recognized according to the first matching row in the list. |
*Number Formats |
|
Data attribute |
Type |
Purpose |
Value |
|
[Attribute Name].StringToNumber |
Derived |
Stores the result of the String to Number conversion |
The original attribute value, converted to a standard Number |
|
Flag attribute |
Purpose |
Possible Values |
|
StringToNumberSuccess
|
Flags whether or not the String->Number conversion was successful for all records. |
Y/N |
|
Execution Mode |
Supported |
|
Batch |
Yes |
|
Real time Monitoring |
Yes |
|
Real time Response |
Yes |
The Convert String to Number transformer produces the following summary statistics of its processing:
|
Statistic |
Meaning |
|
Success |
The number of records where the String -> Number conversion was successful |
|
Failure |
The number of records where the String -> Number conversion was unsuccessful |
Click on the Additional Information button to show the above statistics as percentages.
The following output filters are available from the Convert String to Number processor:
The Employees table in the example Service Management data has an Extension attribute that should hold a numeric extension number, but which is stored as a String, that is, not as a controlled Number attribute.
Using the standard *Number Formats reference list to recognize numeric values, these are the results of the String -> Number conversion:
Summary View
Success Drill-down
Failure Drill-down
Note that where a value is not recognized as a number, because it is null or because it contains a value that is not recognized as a number, the converted Number value is null.
Oracle ® Enterprise Data Quality Help version 11
Copyright ©
2006,2013 Oracle and/or its affiliates. All rights reserved.