Re: Create multiple rows from elements in array on a single row

2015-06-08 Thread Jeetendra Gangele
mapTopair that time you can break the key. On 8 June 2015 at 23:27, Bill Q bill.q@gmail.com wrote: Hi, I have a rdd with the following structure: row1: key: Seq[a, b]; value: value 1 row2: key: seq[a, c, f]; value: value 2 Is there an efficient way to de-flat the rows into? row1: key:

Create multiple rows from elements in array on a single row

2015-06-08 Thread Bill Q
Hi, I have a rdd with the following structure: row1: key: Seq[a, b]; value: value 1 row2: key: seq[a, c, f]; value: value 2 Is there an efficient way to de-flat the rows into? row1: key: a; value: value1 row2: key: a; value: value2 row3: key: b; value: value1 row4: key: c; value: value2 row5: