I am working on a task in pyspark. The code runs fine until where I union four tables in the following way.
mainDF = typeAFrame.union(typeCFrame).union(typeDFrame).union(TypeCRedFrame).union(TypeANewFrame).distinct()
This keeps throwing an error "An error was encountered: Invalid status code '400' from http://10.15.104.153:8998/sessions/34/statements/1 with error payload: "requirement failed: Session isn't active."
Then , I tried to perform each union one by one until I reach the main df and used the distinct function at the end in a separate line.
mainDF = typeAFrame.union(typeCFrame)
mainDF = mainDF.union(typeDFrame)
mainDF = mainDF.union(TypeCRedFrame)
mainDF = mainDF.union(TypeANewFrame)
mainDF = mainDF.distinct()
which is still not working. Keep getting the same error.
Can you suggest me a way to deal with this issue, please?
thanks from now for your time and help