You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Divya Gehlot <di...@gmail.com> on 2016/01/25 03:34:59 UTC

Group by Dynamically

Hi,
I have two files
File1
Group by     Condition
Field1           Y
Field 2           N
Field3             Y

File2 is data file having field1,field2,field3 etc..
field1 field2 field3 field4 field5
data1 data2 data3 data4 data 5
data11 data22 data33 data44 data 55

Now my requirement is to group by based on th conditions in file 1
For instance , as mentioned above if field1 and field3 is Y(true)
Need to group by based on only field 1 and field 3

Would really appreciate your help.

Thanks,
Divya