Was this helpful?
Conversion Rule
Conversion Rule () converts one data type into a different output data type. Like test rules, they generate pass and fail statistics based on conversion, success, or failure. Like function rules they create derived fields of the converted type so that the additional rules can be built using the derived or converted field. Conversion rule are a combination of both function and test rule. Like function rule, they create derived fields to profile and like test rule, they generate pass and fail statistics.
String to Date
 
Description
Converts a string input field value to a date value and populates an output field with the converted value. Also, when this rule is used in a profile, it generates a derived field. Hence, the field parameter is associated with this rule.
For more information, see Derived Fields.
Parameters
1. Click the Field Name dropdown and select a field for the input.
Note:  A default name is provided. However, you can edit or overwrite.
2. Click the Metric Type dropdown and select String to Date.
3. In the Parameters section, a default value is provided for the derived field associated with this rule. However, you can edit or overwrite if required.
4. Click the Date Pattern dropdown and select the required pattern. options are available:
yyyy-M-dd
yyyy-MM-dd
MM/dd/yy
M/dd/yyyy
MM/dd/yyyy
M-dd-yyyy
MM-dd-yyyy
MMM-yy
MMM dd, yyyy
Default is yyyy-MM-dd.
Note:  You can also specify your own pattern in the text box. You can use M for month, y for year, and d for date. The number of symbols vary based on the short or long form of the date part.
Supported Data Types
String (input)
Date (output)
Remarks
Provides pass and fail statistics and generates an output field of type Date.
Supports custom date patterns. This rule uses the Java SimpleDateFormat class.
If the number of pattern letters are more than two, then the year is interpreted literally. For example, using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan. 11, 12 A.D. For more information, see Derived Fields.
String to Double
 
Description
Converts a string input field to a double value populating an output field.
Parameters
A default name is provided. However, you can edit or overwrite the name by clicking the Field text box.
Supported Data Types
String (input)
Double (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Double. For more information, see Derived Fields.
String to Float
 
Description
Converts a string input field to a float value populating an output field.
Parameters
A default name is provided. However, you can edit or overwrite the name by clicking the Field text box.
Supported Data Types
String (input)
Float (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Double. For more information, see Derived Fields.
String to Integer
 
Description
Converts a string input field to an integer value populating an output field.
Parameters
A default name is provided. However, you can edit or overwrite the name by clicking the Field text box.
Supported Data Types
String (input)
Integer (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Double. For more information, see Derived Fields.
String to Long
 
Description
Converts a string input field to a long value populating an output field.
Parameters
A default name is provided. However, you can edit or overwrite the name by clicking the Field text box.
Supported Data Types
String (input)
Long (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Double. For more information, see Derived Fields.
String to Numeric
 
Description
Converts a string input field to a numeric value in an output field.
Parameters
A default name is provided. However, you can edit or overwrite the name by clicking the Field text box.
 
For all supported special characters, see String to Numeric Pattern Parameter.
Supported Data Types
String (input)
Numeric (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Numeric. Comma separated values are supported.
Output value is not formatted to match the pattern specified. For this functionality, see Match Regex.
This rule uses the Java text.DecimalFormat.
String to Time
 
Description
Converts a string field to a time value populating an output field.
Parameters
1. Click the Field text box and provide a name for the input field.
Note:  A default name is provided. However, you can edit or overwrite if required.
2. Click the Time Pattern dropdown and select the required pattern. The following options are available:
HH:mm:ss
HH:mm
hh:mm:ss
hh:mm aa
Default is hh:mm aa.
Supported Data Types
String (input)
Time (output)
Remarks
Provides pass and fail statistics and generates a derived field of type Time. For more information, see Derived Fields.
 
String to TimeStamp
 
Description
Converts a string input field to a timestamp value in an output field.
Parameters
1. Click the Field text box and provide a name for the input field.
Note:  A default name is provided. However, you can edit or overwrite if required.
2. Click the TimeStamp Pattern dropdown and select the required pattern. The following options are available:
yyyy-MM-dd HH:mm:ss
MM/dd/yyyy HH:mm
MMM dd, yyyy HH:mm aa
EEE, dd MMM yyyy HH:mm:ss Z
Default is yyyy-MM-dd HH:mm:ss.
Note:  
- You can also specify your own pattern in the text box. You can use M for month, y for year, and d for date. The number of symbols vary based on the short or long form of the date part.
- ISO 8601 format should be mentioned as yyyy-MM-dd'T'HH:mm:ss+hh:mm. T in this format must be enclosed within single quotes, 'T'.
Supported Data Types
String (input)
TimeStamp (output)
Remarks
Provides pass and fail statistics and generates a derived field of type TimeStamp. For more information, see Derived Fields.
Supports custom timestamp patterns. This rule uses the Java SimpleDateFormat class.
 
Last modified date: 02/09/2024