Skip to main content

Intro

Sometimes you want to join DataSets together but there is no unique key column to join on. In this case, you can create a unique key column.

Create a Unique Key Column

Follow these steps to create a unique key column:
  1. Open an existing DataFlow in Magic ETL or begin creating a new DataFlow.
  2. Add the Rank and Window tile to the canvas and connect it to your Input DataSet.
  3. Select the Rank & Window tile.
  4. In the configuration pane below the canvas, select Add Function.
    add function.jpg
  5. In step 1, name the new column.
    Screenshot 2024-04-22 at 11.58.45 AM.png
  6. In step 2, expand the Select the function to apply dropdown and select Row Number.
    Screenshot 2024-04-22 at 11.58.57 AM.png
  7. Select Apply.
    apply function.jpg
  8. In step 2, choose a column to order the functions on to determine how to apply the row numbers.
  9. In step 3, choose to order your column by either ascending or descending values.
    Screenshot 2024-04-22 at 12.03.20 PM.png
  10. To have a unique key value for every row of your data, leave the optional What columns make up the partition option blank.
  11. Complete your DataFlow and run it.
After running your DataFlow, the output DataSet has a new column with a unique value for each row.
unique key column.jpg