<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Asset Bundles: Extending complex variables in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/asset-bundles-extending-complex-variables/m-p/148461#M52898</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/215525"&gt;@Daniel_dlh&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;you can try to use YAML anchor, have a look at this example:&lt;BR /&gt;&lt;BR /&gt;before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks.yml
variables:
  my_cluster:
    description: "Base cluster configuration"
    default:
      spark_version: "15.4.x-scala2.12"
      node_type_id: "Standard_DS3_v2"
      num_workers: 1

# my_jobs.yml
resources:
  jobs:
    sample_etl_job:
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            &amp;lt;&amp;lt;: ${var.my_cluster}  # ERROR: map merge requires map or sequence of maps
            custom_tags:
              environment: ${bundle.target}&lt;/LI-CODE&gt;&lt;P&gt;with anchor:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Define base cluster as YAML anchor
definitions:
  base_cluster: &amp;amp;base_cluster
    spark_version: "15.4.x-scala2.12"
    node_type_id: "Standard_DS3_v2"
    num_workers: 1
    spark_conf:
      spark.databricks.cluster.profile: "serverless"
      spark.master: "local[*, 4]"

resources:
  jobs:
    sample_etl_job:
      name: sample_etl_job
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            &amp;lt;&amp;lt;: *base_cluster
            custom_tags:
              environment: ${bundle.target}
              project: dlt_telco
      tasks:
        - task_key: etl_task
          job_cluster_key: etl_cluster
          spark_python_task:
            python_file: ../src/sample_etl.py
      schedule:
        quartz_cron_expression: "0 0 1 * * ?"
        timezone_id: "UTC"
      max_concurrent_runs: 1
      timeout_seconds: 3600&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or explicit fields:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Serverless Jobs Configuration
resources:
  jobs:
    sample_etl_job:
      name: sample_etl_job
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            spark_version: ${var.my_cluster.spark_version}
            node_type_id: ${var.my_cluster.node_type_id}
            num_workers: ${var.my_cluster.num_workers}
            spark_conf: ${var.my_cluster.spark_conf}
            custom_tags:
              environment: ${bundle.target}
              project: dlt_telco
      tasks:
        - task_key: etl_task
          job_cluster_key: etl_cluster
          spark_python_task:
            python_file: ../src/sample_etl.py
      schedule:
        quartz_cron_expression: "0 0 1 * * ?"
        timezone_id: "UTC"
      max_concurrent_runs: 1
      timeout_seconds: 3600&lt;/LI-CODE&gt;&lt;P&gt;The key concept: YAML anchors only work within a single file, so if you want to share an anchor across multiple jobs, you must put the anchor definition AND all the jobs that use it in the SAME file&lt;/P&gt;</description>
    <pubDate>Sun, 15 Feb 2026 23:29:30 GMT</pubDate>
    <dc:creator>Pat</dc:creator>
    <dc:date>2026-02-15T23:29:30Z</dc:date>
    <item>
      <title>Asset Bundles: Extending complex variables</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-extending-complex-variables/m-p/147905#M52791</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;In my Asset Bundle I have some setting for a cluster like in the example at&amp;nbsp;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/variables#define-a-complex-variable" target="_self"&gt;Substitutions and variables in Databricks Asset Bundles&lt;/A&gt;&amp;nbsp;(section&amp;nbsp;Define a complex variable).&lt;/P&gt;&lt;P&gt;Now I want to add some additional attribute when using this variables, like this:&lt;/P&gt;&lt;PRE&gt;resources:&lt;BR /&gt;  jobs:&lt;BR /&gt;    my_job:&lt;BR /&gt;      job_clusters:&lt;BR /&gt;        - job_cluster_key: my_cluster_key&lt;BR /&gt;          new_cluster: &lt;BR /&gt;            &amp;lt;&amp;lt;: ${var.my_cluster}&lt;BR /&gt;            custom_tags:&lt;BR /&gt;              foo: bar&lt;BR /&gt;      tasks:&lt;BR /&gt;        - task_key: hello_task&lt;BR /&gt;          job_cluster_key: my_cluster_key&lt;/PRE&gt;&lt;P&gt;Unfortunately this results in the error "map merge requires map or sequence of maps as the value".&lt;/P&gt;&lt;P&gt;I assume that the YAML map operator is applied first (so while the value is still a string - and thus resulting in the error) and only afterwards the variable would be replaced.&lt;/P&gt;&lt;P&gt;Have you come around a similar problem? If yes, how did you solve it?&lt;/P&gt;&lt;P&gt;Thanks and regards!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 13:15:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-extending-complex-variables/m-p/147905#M52791</guid>
      <dc:creator>Daniel_dlh</dc:creator>
      <dc:date>2026-02-10T13:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundles: Extending complex variables</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-extending-complex-variables/m-p/148461#M52898</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/215525"&gt;@Daniel_dlh&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;you can try to use YAML anchor, have a look at this example:&lt;BR /&gt;&lt;BR /&gt;before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks.yml
variables:
  my_cluster:
    description: "Base cluster configuration"
    default:
      spark_version: "15.4.x-scala2.12"
      node_type_id: "Standard_DS3_v2"
      num_workers: 1

# my_jobs.yml
resources:
  jobs:
    sample_etl_job:
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            &amp;lt;&amp;lt;: ${var.my_cluster}  # ERROR: map merge requires map or sequence of maps
            custom_tags:
              environment: ${bundle.target}&lt;/LI-CODE&gt;&lt;P&gt;with anchor:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Define base cluster as YAML anchor
definitions:
  base_cluster: &amp;amp;base_cluster
    spark_version: "15.4.x-scala2.12"
    node_type_id: "Standard_DS3_v2"
    num_workers: 1
    spark_conf:
      spark.databricks.cluster.profile: "serverless"
      spark.master: "local[*, 4]"

resources:
  jobs:
    sample_etl_job:
      name: sample_etl_job
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            &amp;lt;&amp;lt;: *base_cluster
            custom_tags:
              environment: ${bundle.target}
              project: dlt_telco
      tasks:
        - task_key: etl_task
          job_cluster_key: etl_cluster
          spark_python_task:
            python_file: ../src/sample_etl.py
      schedule:
        quartz_cron_expression: "0 0 1 * * ?"
        timezone_id: "UTC"
      max_concurrent_runs: 1
      timeout_seconds: 3600&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or explicit fields:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Serverless Jobs Configuration
resources:
  jobs:
    sample_etl_job:
      name: sample_etl_job
      job_clusters:
        - job_cluster_key: etl_cluster
          new_cluster:
            spark_version: ${var.my_cluster.spark_version}
            node_type_id: ${var.my_cluster.node_type_id}
            num_workers: ${var.my_cluster.num_workers}
            spark_conf: ${var.my_cluster.spark_conf}
            custom_tags:
              environment: ${bundle.target}
              project: dlt_telco
      tasks:
        - task_key: etl_task
          job_cluster_key: etl_cluster
          spark_python_task:
            python_file: ../src/sample_etl.py
      schedule:
        quartz_cron_expression: "0 0 1 * * ?"
        timezone_id: "UTC"
      max_concurrent_runs: 1
      timeout_seconds: 3600&lt;/LI-CODE&gt;&lt;P&gt;The key concept: YAML anchors only work within a single file, so if you want to share an anchor across multiple jobs, you must put the anchor definition AND all the jobs that use it in the SAME file&lt;/P&gt;</description>
      <pubDate>Sun, 15 Feb 2026 23:29:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-extending-complex-variables/m-p/148461#M52898</guid>
      <dc:creator>Pat</dc:creator>
      <dc:date>2026-02-15T23:29:30Z</dc:date>
    </item>
  </channel>
</rss>

