cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
brickster-sud
Databricks Employee
Databricks Employee

Minimize disruptions for continuous pipelines with Maintenance Windows

In an agentic world, it is more important than ever to make decisions using the latest available data. To achieve this, data engineers use continuously running ETL pipelines. However, running these pipelines presents challenges: engineers need to minimize downtime while keeping them up to date. Runtimes and infrastructure still need upgrades, security patches, and other maintenance, and some of that work requires a restart.

Spark Declarative Pipelines is the best place to run continuous pipelines because it handles this operational work with minimal downtime. Upgrades typically complete in seconds, and checkpoints preserve state so each pipeline resumes where it left off. Even so, we heard from customers that a brief restart at the wrong time can be disruptive. To help with this, we are announcing the General Availability of Maintenance Windows for Spark Declarative Pipelines, which let teams configure when Databricks-initiated restarts occur for continuous pipelines.

What is a Maintenance Window?

A maintenance window specifies the day of the week, start hour, and time zone when platform maintenance may restart a continuous pipeline. When maintenance is due, Databricks waits for the configured window.

  • Databricks schedules runtime upgrades and infrastructure maintenance that require a restart for the start time you selected. The window can be up to 1 hour but updates usually finish within minutes. 
  • Job notifications tell you when the restart begins and ends. You can use email, a webhook, or a notification destination.
  • Databricks may apply critical security patches outside the window when a fix cannot wait.

Configuration

The maintenance window is a setting on the continuous job that runs the pipeline. You can configure it in the UI, with the Jobs REST API, or through Genie using natural language.

With Genie, try a prompt such as: "Configure [pipeline-name] to receive platform upgrades only on Sunday at 10PM". Genie will walk you through the configuration and then apply it with your confirmation. 

In the UI, you can find the setting in either of these locations:

  1. In the Jobs UI, open the job and select Continuous trigger > Advanced > Maintenance window.
  2. In the Pipelines UI, open the pipeline and select Schedule > Advanced settings > Maintenance window.

With the Jobs REST API, set maintenance_window in the job's continuous settings. You can also send maintenance notifications to an on-call address. This example schedules maintenance for 2 a.m. Eastern on Tuesdays:

{
  "continuous": {
    "maintenance_window": {
      "start_hour": 2,
      "day_of_week": "TUESDAY",
      "timezone_id": "America/New_York"
    }
  },
  "email_notifications": {
    "on_maintenance_start": ["oncall@acme.com"],
    "on_maintenance_complete": ["oncall@acme.com"]
  }
}

If maintenance is due when the window opens, you receive a "maintenance starting" notification. The pipeline restarts and resumes from its checkpoint. A "maintenance complete" notification then reports the duration. If no maintenance is due, the window passes without a restart.

Availability

Maintenance Windows are generally available for continuous Spark Declarative Pipelines. See docs for configuration details.