<?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: Dynamic job cluster insertion in jobs in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/asset-bundles-dynamic-job-cluster-insertion-in-jobs/m-p/57546#M30820</link>
    <description>&lt;P&gt;Tnanks for the reply! Will dive into this, but we would prefer to keep it within the codebase and not sure if this solution will work with the multiline job cluster definitions.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 08:28:41 GMT</pubDate>
    <dc:creator>Cas</dc:creator>
    <dc:date>2024-01-17T08:28:41Z</dc:date>
    <item>
      <title>Asset Bundles: Dynamic job cluster insertion in jobs</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-dynamic-job-cluster-insertion-in-jobs/m-p/57349#M30757</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;As we are migrating from dbx to asset bundles we are running into some problems with the dynamic insertion of job clusters in the job definition as with dbx we did this nicely with jinja and defined all the clusters in one place and a change in the cluster definitions changed automatically all the jobs and there is no need to duplicate code.&lt;/P&gt;&lt;P&gt;With asset bundles i have tried it using variables and with a conf file using the sync option. But nevertheless I can't get it to work, and the cluster part of the job is just empty in every scenario with the conf file. With variables I can't get a multiline variable to be passed.&lt;/P&gt;&lt;P&gt;So i am wondering, what is the way of working to achieve this??&lt;/P&gt;&lt;P&gt;Structure of project:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.
└── bundle/
    ├── resources/
    │   └── job.yaml
    ├── conf/
    │   └── cluster.yaml
    ├── src/
    │   └── test.py
    └── databricks.yaml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Databricks.yaml:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;artifacts:
  cluster_file:
    files:
      - source: cluster.yaml
    path: conf
    type: yaml

targets:
    dev:
    mode: production
    default: true
    workspace:
      profile: dev
      host: host.azuredatabricks.net
      root_path: /${bundle.name}/${bundle.git.commit}
      artifact_path: /${bundle.name}/${bundle.git.commit}
    run_as:
      user_name: xxxx
    sync:
      include:
      - conf/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Job.yaml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    BUNDLE_ARTIFACT_TEST:
      name:  ${bundle.target} cluster test
      schedule:
        quartz_cron_expression: 0 30 0 ? * SUN *
        timezone_id: Europe/Amsterdam
        pause_status: UNPAUSED
      tasks:
        - task_key: test_task
          spark_python_task:
            python_file: ../src/test.py
          job_cluster_key: cluster_5_nodes_16gb
          libraries:
            - whl: ../dist/*.whl
      job_clusters:
        ${bundle.name}/${bundle.git.commit}/files/conf/cluster.yaml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cluster.yaml:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  - job_cluster_key: cluster_5_nodes_16gb
    new_cluster:
      spark_version: 13.3.x-scala2.12
      node_type_id: Standard_D4s_v5
      spark_env_vars:
        DEVOPS_ARTIFACTS_TOKEN: "{{secrets/devops/artifacts}}"
      runtime_engine: PHOTON
      num_workers: 5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 10:15:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-dynamic-job-cluster-insertion-in-jobs/m-p/57349#M30757</guid>
      <dc:creator>Cas</dc:creator>
      <dc:date>2024-01-15T10:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundles: Dynamic job cluster insertion in jobs</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-dynamic-job-cluster-insertion-in-jobs/m-p/57546#M30820</link>
      <description>&lt;P&gt;Tnanks for the reply! Will dive into this, but we would prefer to keep it within the codebase and not sure if this solution will work with the multiline job cluster definitions.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:28:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-dynamic-job-cluster-insertion-in-jobs/m-p/57546#M30820</guid>
      <dc:creator>Cas</dc:creator>
      <dc:date>2024-01-17T08:28:41Z</dc:date>
    </item>
  </channel>
</rss>

