Use case
This component is extremely versatile and can be used to perform a wide range of calculations on your data. For example, you can use it to:- Perform mathematical operations, such as calculating year-over-year growth.
- Perform string manipulations, such as converting email addresses to lower case.
- Perform operations with conditions, such as assigning values to customers based on their total spend.
- To profile your data, identify data quality issues, and improve the quality of your dataset, use Data Cleanse.
- To extract JSON or semi-structured data, use Extract Nested Data or Flatten Variant.
- To implement simple filters, use Filter.
- To make changes to data types, use Convert Type.
Properties
A human-readable name for the component.
When Yes, all input columns are mapped without modification. When No, the component will output only columns that have been mapped manually via the expression editor. The default setting is Yes.
A list of SQL expressions calculated per row of data. The name of the expression becomes the output column.Click the field to open the Calculations dialog.Expressions: The panel on the left lists the named expressions. The name of each expression becomes an output column in the result.
- +: Click + to add a new expression.
- -: Click - to remove the selected expression.
AND, OR, NOT, +, -, *, /, ||, =, !=, <, <=, =>, >.Expressions can refer to an earlier expression by enclosing the existing expression name in double quotes.To use warehouse functions or variables in this field, type the name of the function or variable prefixed by the dollar symbol and surrounded by { } brackets, as follows: ${variable}. Once you type ${, a drop-down list of autocompleted suggested functions and variables will appear. This list updates as you type; for example, if you type ${DAY, functions and variables containing DAY will be listed. This list also shows the type of each function or variable.You can also use the Prompt Maia to write expressions field at the top of the editor to generate expressions using AI. Review any expressions generates before saving them.To use grid variables, toggle Use Grid Variable on at the bottom of the dialog. For more information, read Grid variables.