Hi @naga_databricks, The Databricks documentation does not explicitly state that spark.read
BigQuery format will create a Materialized View.
Instead, it mentions that it can read from a BigQuery table or the result of a BigQuery SQL query. When you specify the query
option, it executes the SQL query in BigQuery and loads the result into a DataFrame.
In your case, the materializationDataset
option specifies the BigQuery data set that will be used to store the temporary table resulting from the query execution. This table is materialized in BigQuery for the duration specified by the materializationExpirationTimeInMinutes
option.
However, this does not mean it creates a Materialized View in the BigQuery sense.
In BigQuery, a Materialized View is a precomputed result set of a SQL query that can be used to speed up SQL query execution, especially for complex queries.
So, to answer your question, the Databricks documentation seems accurate based on the given information.
There is no direct way to select if spark.read
you can create a table or a Materialized View in BigQuery. It simply executes the query and loads the result into a DataFrame, and the temporary table made in the process is more of an implementation detail.
Sources - https://docs.databricks.com/external-data/bigquery.html