Skip to content

[FEATURE] DAB: Support for YAML Dictionary variables #1298

Description

@stevenayers-bge

When writing Databricks Asset Bundles, it would be great if we could define things like job cluster configuration as one config block:

targets:
dev:
variables:
spark_version: 14.3.x-scala2.12pool_id: 12334cluster_config:
spark_version: ${var.spark_version}instance_pool_id: ${var.pool_id}data_security_mode: SINGLE_USERruntime_engine: PHOTONspark_conf:
spark.master: local[*, 4]spark.databricks.cluster.profile: singleNodecustom_tags:
ResourceClass: SingleNodespark_env_vars:
PYSPARK_PYTHON: /databricks/python3/bin/python3num_workers: 0prod:
variables:
spark_version: 14.3.x-scala2.12pool_id: aaabbbbcccccluster_config:
spark_version: ${var.spark_version}instance_pool_id: ${var.pool_id}data_security_mode: SINGLE_USERruntime_engine: PHOTONautoscale:
min_workers: 10max_workers: 999999spark_env_vars:
PYSPARK_PYTHON: /databricks/python3/bin/python3resources:
jobs:
job1:
name: job1git_source:
git_url: ${var.git_url}git_provider: ${var.git_provider}git_branch: ${var.git_branch}tasks:
- task_key: task1spark_python_task:
python_file: task1.pysource: GITparameters:
- --environment
- ${bundle.target}job_cluster_key: clusterjob_clusters:
- job_cluster_key: clusternew_cluster: ${var.cluster_config}

It would also be nice to be able to group variables using this method:

variables:
instance_pools:
description: The pools the use for jobsdefault:
driver:
large: id heresmall: id hereworker:
large: id heresmall: id herecluster_config:
spark_version: ${var.spark_version}driver_instance_pool_id: ${var.instance_pools.driver.large}instance_pool_id: ${var.instance_pools.worker.large}data_security_mode: SINGLE_USERruntime_engine: PHOTONautoscale:
min_workers: 10max_workers: 999999spark_env_vars:
PYSPARK_PYTHON: /databricks/python3/bin/python3

Please let me know if this is in progress, and either way I'll see if I can help contribute :)

Metadata

Metadata

Labels

DABsDABs related issuesEnhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions