I have a spark RDD (myData) that has been mapped as a list. The output of myData.collect() yields the following:
['x', 'y', 'z']
What operation can I perform on myData to map to or create a new RDD containing a list of all permutations of xyz? For example newData.collect() would output:
['xyz', 'xzy', 'zxy', 'zyx', 'yxz', 'yzx']
I've tried using variations of cartesian(myData), but as far as I can tell, the best that gives is different combinations of two-value pairs.