RCo
New Contributor III

That is a great point!

I did some testing and I was able to re-create your issue in my own environment by doing the following:

  1. Create a notebook with a `CREATE MATERIALIZED VIEW IF NOT EXISTS` statement that queries a Lakehouse Federated database.
  2. Manually create a DLT pipeline that runs this notebook
  3. Try to query the materialized view using Serverless SQL

Is this also the process you used to create the materialized view?

 

The documentation (https://learn.microsoft.com/en-us/azure/databricks/views/materialized) suggests that, instead of "manually" creating the DLT pipeline as outlined above, the "CREATE MATERIALIZED VIEW" statement should be ran on a pro or serverless SQL Warehouse.

I tried doing this, but encountered networking/firewall related errors for both pro and serverless warehouses.

 

I think this all suggests that trying to "SELECT" from a materialized view using a pro/serverless SQL Warehouse (when the materialized view create statement was not run using a pro/serverless SQL Warehouse) will implicitly try to refresh the materialized view.