cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Managing Default Start State for Continuous Streaming Jobs in Databricks Asset Bundles

mnissen1337
New Contributor II

 

’ve created a notebook that uses Spark Structured Streaming and runs continuously, so I’ve deployed the corresponding Databricks job using the continuous trigger mode.

What I’d like is for this job to start automatically only in certain environments (for example, prod) when deploying with DABs.

I noticed there is a lifecycle property with a started field that appears to control the startup state during deployment, but according to the documentation, this only applies to apps, clusters, and SQL warehouses — not jobs.

For scheduled batch jobs, we can configure the pause state (PAUSED or UNPAUSED) per environment, which provides a nice way to control whether jobs start automatically after deployment. I’m looking for similar functionality for continuous/always-on streaming jobs.

One option is to handle this in the CI/CD pipeline, for example:

 
if target = prod:
databricks bundle run streaming_job

But I’m wondering if there’s a more elegant or native way to manage the default start behavior of continuous jobs across environments when using DABs.

1 ACCEPTED SOLUTION

Accepted Solutions

mnissen1337
New Contributor II

I figured out that the continuous property has a pause_status aswell, not sure why I did not see this. So I think the above is solved!

View solution in original post

1 REPLY 1

mnissen1337
New Contributor II

I figured out that the continuous property has a pause_status aswell, not sure why I did not see this. So I think the above is solved!