Transforming data

Input is transformed using a Transform pipeline. This is a series of one or more transforms that are applied in order. Each transform function can be applied to one or more data types and produces a specific data type as a result.

The Linear transform can be applied to either Integer or Double data types and produces a Double result. As you add transforms, the list of available transforms is filtered based on the data type returned by the prior transform. You can reorder transforms. However, if the output data type of a transform is no longer valid input to the next transform or the last transform does not output the specified field type, an error indicator is shown.

This table describes the current transformations.

Name Description Input types Output type Parameters
Direct Does not transform input Any Same as input N/A
To Integer Converts input to an integer value String, integer, double, Boolean Integer Default value
To Double Converts input to a double value String, integer, double, Boolean Double Default value
To Boolean Converts input to a Boolean value String, integer, Boolean Boolean Default value
To String Converts input to a string value String, integer, double, Boolean String Handle Null
Exponent Applies exponent to input value Integer, double Double Exponent*, Use Euler's Number
Root Apply root (fractional exponent) to the input Integer, double Double Numerator*, Denominator*
Log Apply log to the input Integer, double Double Base*, default value
Linear Apply linear transform to the input Integer, double Double Slope*, Intercept*
String To Date Convert a string representation of a date to a DateTime String DateTime Locale, Format Pattern
Date To Year Return the year of a DateTime value DateTime Integer N/A
Hours Since Number of days since a date DateTime Integer Default value, Strict
Days Since Number of days since a date DateTime Integer Default value, Strict
Weeks Since Number of weeks since a date DateTime Integer Default value, Strict
Months Since Number of months since a date DateTime Integer Default value, Strict
Years Since Number of years since a date DateTime Integer Default value, Strict
Hours Until Number of hours until a date DateTime Integer Default value, Strict
Days Until Number of days until a date DateTime Integer Default value, Strict
Weeks Until Number of weeks until a date DateTime Integer Default value, Strict
Months Until Number of months until a date DateTime Integer Default value, Strict
Years Until Number of years until a date DateTime Integer Default value, Strict
Integer to Category Convert integer to String category Integer String Map*, Default value
To String List Converts input value to list of strings String, String list, Integer, Double, Boolean, Boolean list String List N/A

An asterisk (*) indicates the parameter is required.

The Strict parameter for the data relative transforms (Hours, weeks, ... Until/Since) indicates that the default value is returned if the transform results in a negative value. For example, if the input value is a date in the future and the transform is Hours Since, the transformed value is negative. Setting the Strict parameter to true sets the field to Null or the default value if specified.