Skip to content
Advertisement

Using createOrReplaceTempView to replace a temp view not working as expected

I have a dataset something similar to this

JavaScript

My spark code is

JavaScript

I am trying to replace the people view by calling createOrReplaceTempView

but i get the following error as below

JavaScript

How do I replace the view in spark?

Advertisement

Answer

So I got the solution to the above question by the following code

JavaScript
Advertisement