I have constructed two dataframes. How can we join multiple Spark dataframes ?
For Example :
PersonDf, ProfileDf with a common col
PersonDf
ProfileDf
you can use
val resultDf = PersonDf.join(ProfileDf, PersonDf("personId") === ProfileDf("personId"))
or shorter and more flexible (as you can easely specify more than 1 columns for joining)
val resultDf = PersonDf.join(ProfileDf,Seq("personId"))