You are here: Processor Library > Transformation > Convert String to Number

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

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.

Configuration

Inputs

A single String attribute that you wish to convert to a Number data type.

Options

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

Outputs

Data attributes

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

Flags

Flag attribute

Purpose

Possible Values

[Attribute Name].ConvertToNumberSuccess

 

Indicates which data has been successfully converted to a number

Y/N

Execution

Execution Mode

Supported

Batch

Yes

Real time Monitoring

Yes

Real time Response

Yes

Results Browsing

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

Additional Information

Click on the Additional Information button to show the above statistics as percentages.

Output Filters

The following output filters are available from the Convert String to Number processor:

Example

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 9.0
Copyright © 2006,2011 Oracle and/or its affiliates. All rights reserved.