Create Column

The Create Column transformation is used to create a new column in a dataset based on existing column(s) and a specified function or formula. This transformation is useful when you need to perform calculations or data manipulations on existing columns and store the results in a new column.

Parameters

  • Source Column(s): Select one or more columns that you want to use as input for the function or formula. This is a required field.
  • Destination Column: Enter the new name for the column that will hold the results of the function or formula. This is a required field.
  • Function or Formula: Define the function or formula to apply to the source column(s). This is a required field.

Usage

To use the Create Column transformation in Mantium, follow these steps:

  1. Select the transformation from the list of available transformations in the Mantium user interface.
  2. Configure the Source Column(s) parameter by selecting the column(s) that you want to use as input for the function or formula.
  3. Configure the Destination Column parameter by specifying the new name for the column that will hold the results of the function or formula.
  4. Configure the Function or Formula parameter by defining the function or formula to apply to the source column(s).
  5. Run the transformation by clicking the Run button. The resulting dataset will have a new column with the specified name containing the results of the function or formula applied to the source column(s).

Example 1

Suppose you have a dataset containing product sales data, and you want to calculate the total sales value for each product by multiplying the quantity sold by the price.

Sample Dataset:

ProductQuantityPrice
A1050
B1530

Config:

Source Column(s): [Quantity, Price]
Destination Column: Total Sales
Function or Formula: "Quantity * Price"

Expected Result Dataset:

ProductQuantityPriceTotal Sales
A1050500
B1530450

Example 2

Suppose you have a dataset containing temperature data in Fahrenheit and you want to convert the temperature to Celsius.

Sample Dataset:

CityTemperature (F)
New York68
Los Angeles75

Config:

Source Column(s): [Temperature (F)]
Destination Column: Temperature (C)
Function or Formula: "(Temperature (F) - 32) * 5/9"

Expected Result Dataset: