Edit Columns
Add new expression-based columns, rename and retype columns
Last updated
Add new expression-based columns, rename and retype columns
Last updated
The Edit Columns tool is most often used immediately following an import tool. It can be used in two common ways:
To rename and retype columns
Or to add a new column, based on an expression
Drag an Edit Columns tool to your workflow canvas. Connect a downstream tabular-data output to the input of of your Edit Columns tool. Click it once to see the tool preview. Click it again to open and configure the tool.
Input | Output |
---|---|
Any single table | A single table with all original input columns and any new expression-based columns |
On the right side, you will see your results table, it represents the output of the tool. On the left side, is the configuration panel. Left/right buttons control which column is selected. Column metadata for the selected column is shown underneath.
Adjust the metadata fields for the selected column. Make your changes and hit Enter
. Changes can be identified in the results table by looking for the green column header. Reconfigurable column details include:
Name: Provide a new name for a column, effectively works as a rename
Type: Assign a specific data type to a column (String, Number-Whole, Number-Decimal, Percent, Datetime, Duration, Boolean)
Description: Collaborate with team members, provide a column description for others to see
Format: Assign a specific format to certain data types
Columns can be reordered left to right, from the results table. Using your cursor, grab a column by the column-header, drag it to a new location, and release. The final column order will be represented in the tool output.
To add a new column from the results table, click the dropdown in any column header, then select Insert Right or Insert Left to add a column. Alternately, you can scroll to the far-right of your results table and click the plus button.
Either selection will open the Expression Builder, near your new column. From the top controls, you may provide a name for your column and you can reposition the Expression Builder using the drag handle on the right. Under the controls is where you write your expression.
Adding derived columns is key to advancing an analysis. The Expression Builder, baked into the Edit Columns tool, is ideal for this task. It's potential is capped only by your imagination (and maybe your source data).
Use Expression Builder to:
Write an expression based on the columns from the input table, in a simple math formula (as in the example above). See a list of Expression Operators supported by Cascade.
Mark an entire column a Boolean True or False.
Tag an entire column with a Text String or a Date Time.
Reference a Global Variable on your canvas.
Write a Function, from wide selection of functions, including: Aggregate, Conversion, Datetime, Logical, Math, Table, and Text functions.
Hint: Use Enter
to save and calculate anything you have written in Expression Builder. Be sure to save your expression before exiting the Edit Columns tool.