Input Table A
catgId1 catg id2 catg id3 catg id4 catg id5
123 456 789 1011 1213
Table B
catgId
123
456
789
1011
1213
Output:Need to join two tables I tried like
val results = df1.join(broadcast(df2),Array("catg Id").toSeq,"left_outer")
.join(broadcast(df2),Array("catg Id").toSeq,"left_outer")
Like this i tried 5 times renaming the column and i joined. Is there any better way apart from this. Please suggest.
Re queried output joining of two table i need few more columns i didn't mention here.