Is there a way to get the dataframe that union dataframe in loop?
This is a sample code:
var fruits = List( \"apple\" ,\"orange\" ,\"melon\" )
If you have different/multiple dataframes you can use below code, which is efficient.
val newDFs = Seq(DF1,DF2,DF3) newDFs.reduce(_ union _)