Hi @kalebkemp ,
The error you're encountering (com.databricks.sql.io.FileReadException) when creating a materialized view that reads from two different schemas in the same catalog might not necessarily be a Databricks limitation. It is more likely related to permissions, configuration issues, or unsupported behavior in the way the materialized view accesses the data. Let’s walk through potential reasons and solutions.
- Check permissions: Ensure SELECT and USAGE privileges are granted for all referenced schemas and tables.
- Verify storage locations: Ensure both tables are in compatible storage systems and paths.
- Create intermediate views or tables: Consolidate data from both schemas into a single source before creating the materialized view.
- Check for broken file references: Verify and repair any issues with the underlying Delta tables.
- Consider using standard views: If materialized views are too restrictive, use standard views for flexibility.
By following these steps, you should be able to resolve the FileReadException and create the materialized view successfully. Let me know if you need further clarification or assistance!
Regards!
Alfonso Gallardo
-------------------
I love working with tools like Databricks, Python, Azure, Microsoft Fabric, Azure Data Factory, and other Microsoft solutions, focusing on developing scalable and efficient solutions with Apache Spark