I have one big data of DataFrame A.
I want to apply some filter to that and make a DataFrame B, and make another DataFrame C for not filtered data.
In summary, it's similar to following pseudo code.
A.foreach(_ => {
if (isFiltered(_)) addToDF_B()
else addToDF_C()
})
And, B and C will be written to different tables.
I tried to filter B firstly and use A.except(B) to make C, but it doesn't work if scheme has complex type(map or array).
Except filtering twice, is any other way to do it at once?
Thanks in advance.