Hi,
The _quality_monitoring_summary table is an internal table created by the Data Quality Anomaly Detector in Databricks Lakehouse Monitoring. Unfortunately, the full DDL is not publicly documented in detail, and trying to manually create it can lead to data type mismatches, as you've encountered.
However, you can try the following workaround:
Enable the anomaly detector in a test environment where managed tables are allowed.
Let it create the _quality_monitoring_summary table automatically.
Use the following command to extract the DDL:
SHOW CREATE TABLE <catalog>.<schema>._quality_monitoring_summary;
This will give you the exact DDL with the correct data types.
If setting up a test environment isn't feasible, an alternative is to create an external table and configure the Lakehouse Monitoring to use it by specifying a different target location using Unity Catalog or your desired catalog pathโensuring the system has permissions to write to that location.