> ## Documentation Index
> Fetch the complete documentation index at: https://www.domo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Join DataSets by Adding a Unique Key Column

## 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](/docs/s/article/360042922814 "ETL Actions: Rank and Window") tile to the canvas and connect it to your Input DataSet.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EM5w000005vOxE.png?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=ec5e2292574ab7d9bf3a19ca62e324f4" width="496" height="332" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EM5w000005vOxE.png" />
   </Frame>
3. Select the **Rank & Window** tile.
4. In the configuration pane below the canvas, select **Add Function**.

   <Frame>
     <img alt="add function.jpg" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nTda.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=81e2e467202655c2e569870528cb2084" width="2428" height="566" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nTda.jpg" />
   </Frame>
5. In step 1, name the new column.

   <Frame>
     <img alt="Screenshot 2024-04-22 at 11.58.45 AM.png" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUHt.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=52cb855b04697c36f676436239c76e2c" width="698" height="536" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUHt.jpg" />
   </Frame>
6. In step 2, expand the **Select the function to apply** dropdown and select **Row Number**.

   <Frame>
     <img alt="Screenshot 2024-04-22 at 11.58.57 AM.png" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUJW.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=bbf99aa403bbdb7715e996c3cca68d4c" width="792" height="922" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUJW.jpg" />
   </Frame>
7. Select **Apply**.

   <Frame>
     <img alt="apply function.jpg" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUUn.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=a2eca29e89e96695212b7dc4a06e9ce8" width="2410" height="944" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUUn.jpg" />
   </Frame>
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.

   <Frame>
     <img alt="Screenshot 2024-04-22 at 12.03.20 PM.png" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUjJ.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=4eb6ca8cfd1579979c4fb709d5b3fbef" width="1416" height="564" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nUjJ.jpg" />
   </Frame>
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.

<Frame>
  <img alt="unique key column.jpg" src="https://mintcdn.com/domoinc/weM-Hpu2AJmK2b0H/images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nRLe.jpg?fit=max&auto=format&n=weM-Hpu2AJmK2b0H&q=85&s=32a878a5e6647d6dde1f5ea489580461" width="3056" height="1004" data-path="images/kb/ka0Vq0000000l8b-00N5w00000Ri7BU-0EMVq000000nRLe.jpg" />
</Frame>
