Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 18789

How to create a persistent view from a pyspark dataframe

$
0
0

I have a pyspark dataframe df, and would like to save it as a persistent view. Is that possible?

I tried to do the following:

df.createOrReplaceTempView("temp_view")spark.sql('CREATE VIEW my_view AS SELECT * FROM temp_view'))

And I got the following error message: "Not allowed to create a permanent view my_view by referencing a temporary view temp_view"


Viewing all articles
Browse latest Browse all 18789

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>