Creating permanent views from dataframes?

bdugar
New Contributor II

Hi:

It's possible to create temp views in pyspark using a dataframe (df.createOrReplaceTempView()), and it's possible to create a permanent view in Spark SQL. But as far as I can tell, there is no way to create a permanent view from a dataframe, something like df.createView().

This is entirely confusing to me - clearly the environment supports permanent views, and it supports creating views from dataframes. There are a lot of scenarios where using python is more convenient for building complex queries instead of trying to construct a SQL string and execute it within a context.

Is support for this something that is eventually planned? Is Databricks beholden to whatever Spark decides to implement at this level? Is there a great reason I, someone who doesn't know much about the inner workings of Spark, am overlooking as to why this isn't possible or is very hard?

Thanks,

Bryce