Intro
This article describes how to configure the available Utility tiles in Magic ETL. Learn how to use tiles in a Magic ETL DataFlow.
- Add Constants tile
- Add Formula tile
- Alter Columns tile
- Duplicate Column tile
- Get Schema tile
- Limit tile (beta)
- Meta Select tile
- Order tile (beta)
- Select Columns tile
- Series tile (beta)
- SQL tile
- Value Mapper tile
Add Constants Tile

- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by clicking
Edit (pencil icon) and entering the name you want.
- Enter the name of the new column.
-
Select the column type.
Text Contains text and numbers (which are treated as text).
Floating Decimal Contains numbers in decimal notation. Fixed Decimal Contains decimal numbers with a fixed number of digits after the decimal point.
Integer Contains numbers without a decimal part. Date Contains date values. Timestamp Contains date and time values. -
Enter the constant value, date, date and time, or leave it blank.

-
Select Done.

Add Formula Tile

- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by clicking
Edit (pencil icon) and entering the name you want.
- Enter the name of the new column.
- Enter the formula you would like to perform. Learn how to write functions for the Add Formula tile, including with the help of the AI SQL Assistant.
-
Select Done.

Alter Columns



Note: Before the transformation, the values were actually date-time values but did not display as such because they were set to a Text data type. After the transformation, the actual values display properly as date-time values.
- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by clicking
Edit (pencil icon) and entering the name you want.
-
For each column where you want to change the data type, do the following:
- Select the column you want to set.
- (Optional) Rename the column if needed.
-
Select the new data type for the column. The available
data types are listed above.

- (Optional) Repeat as many times as needed.
-
Select Done.

Duplicate Column Tile

- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by selecting
Edit (pencil icon) and entering the name you want.
- Choose the column in the DataSet to replace.
- Choose the column in the DataSet to duplicate. You can only choose from columns that have the same data type as the column you are replacing.
-
Select Done.

Get Schema Tile
The Get Schema tile generates a table with schema information for the input table that can be modified and consumed by the Meta Select tile. Learn how to use the Meta Select and Get Schema tiles together.Limit Tile (Beta)

- Enter the number of rows to include—the limit.
- Enter the zero-based row index for the limit to start on—the offset. If you want the included rows to begin at row 1, leave this blank.
Meta Select Tile
The Meta Select tile uses one table to define how to select columns from another table. Learn how to use the Meta Select tile.Order Tile (Beta)


Note: The Order tile may also be used to improve the performance of downstream functions in the DataFlow since having values ordered can improve the performance of filter and join operations.
Select Columns Tile

- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by selecting
Edit (pencil icon) and entering the name you want.
-
(Optional) Select the columns you want to include (or exclude) by doing any of the following:
- Select Add Column and choose a column you want to include. Repeat to add other columns.
-
Select Add All Columns, then exclude columns by selecting Remove (X icon) for the column.

-
(Optional) Reorder columns by using the handle beside a column name to drag it to the correct position for your configuration.

-
(Optional) Enter a new name for each column you want to rename in the appropriate field.

Rename Fields with the Select Columns Tile (video)
Series Tile (Beta)

- Enter the number of rows to generate in the new column.
- Enter a name for the new column.
Row count.

SQL Tile

Note: You can use the SQL tile to convert an existing SQL DataFlow to Magic ETL.
Known Limitations
- Stored procedures and variables are not supported.
- Non-SELECT statements are not supported.
Configure the SQL Tile
-
Drag the SQL tile onto the Magic ETL canvas from the Utility section in the left panel and connect it to a valid input tile.
In the Code tab of the tile editor, the SQL pane is populated with a SELECT * from the input tile.
Any tables you connect display on the left side of the tile editor.

-
-
Select
Down to expand a table to see a list of included columns.
-
Use the search bar to locate a specific column.

-
Select
-
- Write your own SQL in the code pane or use the AI SQL Assistant to create your SQL.
Use the AI SQL Assistant: At the bottom of the code pane, choose
AI Assistant to open the prompt field.Enter your query in natural language, using column names from your input data to get a better response. You will receive a warning that the SQL generated by the assistant will replace all current SQL in the pane.
AI Assistant to open the prompt field.Enter your query in natural language, using column names from your input data to get a better response. You will receive a warning that the SQL generated by the assistant will replace all current SQL in the pane.
- As needed, connect other tiles to the output of the SQL tile. You can use a mix of SQL tiles and standard Magic ETL tiles.
Leverage Analytic and Window Functions and Aggregations
Analytic and window functions and aggregations allow you to explore data iteratively through running totals, rankings, moving averages, and cumulative counts directly in your Magic ETL DataFlow. Use these analytic and window functions within your SQL tile:- CUME_DIST
- DENSE_RANK
- LAG
- LEAD
- NTH_VALUE
- PERCENT_RANK
- RANK
- APPROXIMATE_COUNT_DISTINCT
- AVG
- CORR
- COUNT, including COUNT(*) and COUNT(DISTINCT…)
- COVAR_POP
- COVAR_SAMP
- FIRST_VALUE, including FIRST_VALUE(…IGNORE NULLS)
- LAST_VALUE, including LAST_VALUE(… IGNORE NULLS)
- MAX
- MEDIAN
- MIN
- STDDEV_POP
- STDDEV_SAMP
- SUM
- VARIANCE_POP
- VARIANCE_SAMP
Convert SQL DataFlow to Magic ETL
The Edit as Magic ETL option is available for MySQL and Redshift DataFlows. Follow these steps to use it:-
Open your MySQL or Redshift DataFlow in the Data Center.

-
Select
Options (three vertical dots icon) > Edit as Magic ETL.
Your DataFlow opens in a Magic ETL canvas.

Value Mapper Tile



Note: This example shows values written to a new column. If configured, the values could overwrite values in the original column instead.
- Select the tile to open the tile editor below the canvas. Complete the remaining steps inside the tile editor.
-
(Optional) Rename the tile by selecting
Edit (pencil icon) and entering the name you want.
- Select the column you want to search.
-
Select whether the values overwrite the values in the specified column or appear in a new column.
- (Conditional) If writing values to a new column, enter the name of the column.
-
Select whether to write the original value or a default value when a match is not found in a row.
- (Conditional) If writing a default value, enter the value.
- For each value mapping you want, enter the value to search for and the value to replace with.
- (Conditional) If you want to add a mapping, then click Add Mapping.
