Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add acceptance test for $${...} escape in bundle variable references
Test that $${source_file} in a job parameter is treated as an escaped
literal and reaches the API as ${source_file} (not resolved as a bundle
variable reference).

Co-authored-by: Isaac
  • Loading branch information
denik committed Sep 2, 2026
commit b92af44668feef8059a050a5f9ecea0b1f9bae34
23 changes: 23 additions & 0 deletions acceptance/bundle/variables/escape/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bundle:
name: test-bundle

variables:
catalog:
default: main

resources:
jobs:
ingest:
name: ingest-job
tasks:
- task_key: run_notebook
notebook_task:
notebook_path: /notebooks/ingest
base_parameters:
# $${...} is the escape for a literal ${...} that the Databricks
# runtime should interpret, not the bundle variable system.
# Mixed: ${var.catalog} is a real bundle variable; $${source_file}
# is a literal that should reach the API as "${source_file}".
catalog: ${var.catalog}
source_file: $${source_file}
date_range: $${business_date[0..9]}
3 changes: 3 additions & 0 deletions acceptance/bundle/variables/escape/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions acceptance/bundle/variables/escape/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

>>> [CLI] bundle validate -o json
{
"catalog": "main",
"date_range": "${business_date[0..9]}",
"source_file": "${source_file}"
}
1 change: 1 addition & 0 deletions acceptance/bundle/variables/escape/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trace $CLI bundle validate -o json | jq '.resources.jobs.ingest.tasks[0].notebook_task.base_parameters'