- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 10:42 PM
For example here I extract the schedule parameter as a complex type variable:
variables:
schedule:
description: schedule time
type: complex
default:
quartz_cron_expression: '0 22 17 * * ?'
timezone_id: Asia/Shanghai
pause_status: "UNPAUSED"
And here is how I use in my job definition:
resources:
jobs:
my_workflow_job:
name: ……
schedule: ${var.schedule}
When I validate the yaml file via command: `databricks bundle validate -t dev -o json`, it told me:
Error: no value assigned to required variable schedule. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_schedule environment variable
I don’t know what’s wrong with my code, I follow the example in the document https://docs.databricks.com/en/dev-tools/bundles/settings.html#define-a-complex-variable to define the complex type variable
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 02:25 AM
You are right, I solved the issue by upgrade the Databricks CLI. My local CLI version is 0.221. According to the release note, it looks like they support the complex variable since 0.222 only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 01:30 AM
It’s strange, it can pass the validation on my colleague’s laptop. I still cannot pass the validation even restart my Terminal and Macbook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 02:17 AM - edited 08-02-2024 02:22 AM
If the validation is fine on your colleague's laptop and not on yours, my first assumption would be that it's a version issue. Do you have the same Databricks CLI version as your colleagues? You can check with
databricks --version
Also according to this documentation, you need Databricks CLI version 0.218.0 or higher to use bundles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 02:25 AM
You are right, I solved the issue by upgrade the Databricks CLI. My local CLI version is 0.221. According to the release note, it looks like they support the complex variable since 0.222 only.

