Hi; I'm new to Databricks, so apologies if this is a dumb question.
I have a notebook with SQL cells that are selecting data from various Delta tables into temporary views. Then I have a query that joins up the data from these temporary views.
I'd like to use that query to populate a materialized view, however, the CREATE statement throws an error complaining that the temp views cannot be found. This is course rubbish, because it finds the views just fine when it's just a SELECT. The error only happens when the CREATE AS is appended to the front.
So,
"SELECT foo, bar FROM viewa" -- works fine.
"CREATE OR REPLACE MATERIALIZED VIEW matview AS SELECT foo, bar FROM viewa" -- says viewa cannot be found.
I just ran this with CREATE OR REPLACE TABLE instead, and that worked. So I guess this is a limitation of materialized views? If so, 1) can this limitation be noted in the mat view documentation, and b) can the error message be corrected to explain that?