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
"