- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 09:40 AM - edited 09-19-2024 09:54 AM
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:
- Create a notebook with a `CREATE MATERIALIZED VIEW IF NOT EXISTS` statement that queries a Lakehouse Federated database.
- Manually create a DLT pipeline that runs this notebook
- 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.