Andrew Rodriguez Posted August 29, 2023 Share Posted August 29, 2023 Hi guys! I have a fairly small dataset with a Key variable generated through an enum() function. Is there a straightforward way to generate all the “pairs” of different keys? Want to know more? Link to comment Share on other sites More sharing options...
Alessandro Piazza Posted September 1, 2023 Share Posted September 1, 2023 (edited) Hi Andrew! Yes, you can make it through a join task with a certain configuration. Imagine that your key variable is the ID on the screen: 1. You can create a copy of the same dataset by connecting it to another datamanager. Then, you can input both datamanagers into a join task: 2. Now, you need to configure the join as "Inner join", select the IDs as Matching attributes and "<" as Operator: 3. And you are done! If you want to refine your result, you can also apply a Reshape to Long task on top of this (after dataman3) after creating another variable that identifies the “Pair ID” (you can create it just with an enum()), just to remove the dependence on the attributes ID and ID_1. This will be the final result: Please be aware that this method will not work with a large dataset, as the join computation could lead to memory issues. Edited September 1, 2023 by Alessandro Piazza Want to know more? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.