Replicate SAS merge happening in loop in PySpark
I need to replicate a SAS behaviour in PySpark. In SAS the merge between two datasets is not a 1*1 key merge but a m*n key merge involving multiple keys. The datasets can have many-to-many join keys. In SAS the merge is an iteration of 5 loops, each a different one. There are 5 key fields on which the merge happens, after each iteration one key from 5 are reduced: Iteration 1 Key - a, b, c, d, g Iteration 2 Key - a, b, c, d Iteration 3 Key - a, b, c, Iteration 4 Key - a, b Iteration 5 key - a deal table (right): a b c d g deal_id NYB Subs CI Corporate Wholesale 1 abcefgh NYB Subs CI Corporate
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.