Lakehouse Monitoring API – Timeout Error When Enabling Monitors for All Tables in a Catalog

esalazar
New Contributor II

I'm using the Databricks Lakehouse Monitoring API to enable monitoring across every table in a catalog. I wrote a script that loops through all schemas and tables and calls the create_monitor API for each one. However, when running the script from a notebook, I consistently get a Timed out after 0:05:00 error.

It seems like enabling monitors sequentially for a large number of tables is exceeding the execution timeout, especially if each API call takes a few seconds.

Questions:

  • Is there a recommended way to avoid this timeout when enabling monitors at scale?

  • Should I implement parallelism or batching in the script?

  • Is there a way to increase the execution timeout in a Databricks notebook?

Any guidance or best practices would be appreciated!