TableTransformer
Input type: Table
Output type: Table
Description
Applies a transform on each value of a column. The input port type of the used transform has to match the type of the input column.
Example 1
transform CelsiusToFahrenheit {
from Celsius oftype decimal;
to Fahrenheit oftype decimal;
Fahrenheit: (Celsius * 9/5) + 32;
}
block CelsiusToFahrenheitTransformer oftype TableTransformer {
inputColumns: ['temperature'];
outputColumn: 'temperature';
use: CelsiusToFahrenheit;
}
Given a column "temperature" with temperature values in Celsius, it overwrites the column with computed values in Fahrenheit by using the CelsiusToFahrenheit
transform. The transform itself is defined elsewhere in the model.
Example 2
transform CelsiusToFahrenheit {
from Celsius oftype decimal;
to Fahrenheit oftype decimal;
Fahrenheit: (Celsius * 9/5) + 32;
}
block CelsiusToFahrenheitTransformer oftype TableTransformer {
inputColumns: ['temperatureCelsius'];
outputColumn: 'temperatureFahrenheit';
use: CelsiusToFahrenheit;
}
Given a column "temperatureCelsius" with temperature values in Celsius, it adds a new column "temperatureFahrenheit" with computed values in Fahrenheit by using the CelsiusToFahrenheit
transform. The transform itself is defined elsewhere in the model.