Dynamic Data Column
This component allows you to add a new calculated column to the current pipeline data set. By default, the column name cannot already exists; however, you can optionally skip this component if the column name is already found in the data set.
You can specify the data type of this field by choosing from one of the available data types in the dropdown field. If you need more control over certain data types, such as specifying the length of string fields, or decimal values, use the Apply Schema component instead as it offers more powerful control over schema manipulation.
The expression used in the specification of the column can either be:
- A SQL Expression: When choosing this option, you need to specify a simplified expression that will be used
as the default value for this field. In addition, this field will become real-only and any fields it depends on cannot be
removed for the duration of the pipeline execution.
len(name)
- A DataZen Function: Apply a DataZen function that will be evaluated for every row. For example, you can add a
new column with a unique guid, or add a constant value to another field. Unlike the SQL Expression method, a new field calculated
using a DataZen function is not marked read-only, and if you use another field in the formula, the field can be removed at a later time
in the data pipeline if desired.
#rndguid()
#increment({{age}}, 5)
#len({{name}}
From time to time, you may have a way to perform the same operation using either an SQL Expression or a DataZen function. Consider that while executing DataZen functions will almost always be slower, the evaluation does not create a dependency with the fields used in the calculation.