Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 08:19 PM
It looks like you’re hitting one of the current limitations of Databricks serverless jobs. Even though the API supports passing an environments object, only certain fields are honored right now. In particular:
- The environment_version parameter will default to the latest supported runtime (currently Serverless Environment 3), and you can’t override it with "1" or other values yet.
- Custom dependencies aren’t picked up from the job JSON directly. For serverless jobs, dependency management has to be handled through Databricks Asset Bundles, package installation in the notebook itself (e.g., %pip install), or by referencing volumes/libraries within the task.
So in your example, the JSON is valid, but the fields you’re setting are ignored because serverless doesn’t currently allow custom environment pinning or inline dependency injection.
If you need strict control over environment/dependencies, you’ll want to either:
- Use a standard job cluster with your desired runtime + libraries.
- Or package dependencies in a wheel/requirements file and install them at task start in the serverless job.
I’d also keep an eye on the Jobs API release notes, since Databricks has been expanding serverless features fairly quickly.
siennafaleiro