<?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: Databricks Asset Bundles: using loops in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128718#M48327</link>
    <description>&lt;P&gt;Oh, now I get it. I've misunderstood your question initially. So in your case you need to build your DAB definition dynamically. You can use Python for Databricks Assets Bundles and d&lt;SPAN&gt;ynamically create jobs or pipelines using metadata&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/python" target="_blank"&gt;Bundle configuration in Python | Databricks Documentation&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Aug 2025 09:18:18 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2025-08-18T09:18:18Z</dc:date>
    <item>
      <title>Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128709#M48321</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I am using DAB's to deploy the job below.&lt;BR /&gt;This code works but I would like to use it for other suppliers as well.&lt;BR /&gt;Is there a way to loop over a loop of suppliers: ['nike', 'adidas',...] and fill those variables so that&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;config_nike_gsheet_to_databricks is dynamically filled in like config_{supplier}_gsheet_to_databricks.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;bundle:
  name: gsheet-config-jobs
  
resources:
  jobs:
    config_nike_gsheet_to_databricks:
      name: config_nike_gsheet_to_databricks
      tasks:
        - task_key: test_config_nike_gsheet_to_databricks
          spark_python_task:
            python_file: src/mapping-update/main.py
            parameters:
              - ACC
              - NIKE
            source: GIT
          environment_key: Default
      git_source:
        git_url: https://github.com/Transfo-Energy/transfo-engine.git
        git_provider: gitHub
        git_branch: Acceptance
      queue:
        enabled: true
      environments:
        - environment_key: Default
          spec:
            client: "1"
            dependencies:
              - gspread
              - oauth2client
      performance_target: PERFORMANCE_OPTIMIZED&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 08:23:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128709#M48321</guid>
      <dc:creator>Daan</dc:creator>
      <dc:date>2025-08-18T08:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128713#M48324</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128370"&gt;@Daan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, I think you can do it using for-each task. Check below materials, they should help you get started how to implement such scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/jobs/for-each" target="_blank"&gt;Use a For each task to run another task in a loop | Databricks Documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://medium.com/dbsql-sme-engineering/databricks-sql-orchestration-patterns-with-for-each-and-dynamic-value-references-18bba1696577" target="_blank"&gt;Databricks SQL Orchestration Patterns with For Each and Dynamic Value References | by Databricks SQL SME | DBSQL SME Engineering | Medium&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=PByPvH_y5Ok&amp;amp;t" target="_blank"&gt;https://www.youtube.com/watch?v=PByPvH_y5Ok&amp;amp;t&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 08:39:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128713#M48324</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-18T08:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128716#M48325</link>
      <description>&lt;P&gt;Hey szymon,&lt;/P&gt;&lt;P&gt;Your answer is to use a for each loop inside a job/workflow.&amp;nbsp;&lt;BR /&gt;What I would like to achieve is to create multiple jobs using one Databricks Asset Bundle by iterating over a list of suppliers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 09:10:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128716#M48325</guid>
      <dc:creator>Daan</dc:creator>
      <dc:date>2025-08-18T09:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128718#M48327</link>
      <description>&lt;P&gt;Oh, now I get it. I've misunderstood your question initially. So in your case you need to build your DAB definition dynamically. You can use Python for Databricks Assets Bundles and d&lt;SPAN&gt;ynamically create jobs or pipelines using metadata&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/python" target="_blank"&gt;Bundle configuration in Python | Databricks Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 09:18:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128718#M48327</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-18T09:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128724#M48331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128370"&gt;@Daan&lt;/a&gt;&amp;nbsp; ,&lt;BR /&gt;Your requirement is to create jobs dynamically by iterating through a list of suppliers. This is definitely achievable using the Databricks SDK.&lt;BR /&gt;I’d recommend providing the job parameters and definitions in a JSON format, as it’s more reliable for parsing. You can structure the job name with an identifier, for example:&lt;BR /&gt;```config_{{source}}_gsheet_to_databricks```&lt;BR /&gt;Then, within your loop, you can safely replace &lt;STRONG&gt;{{source}}&lt;/STRONG&gt; with each supplier value from the iterator and create the jobs dynamically.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 10:43:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128724#M48331</guid>
      <dc:creator>MujtabaNoori</dc:creator>
      <dc:date>2025-08-18T10:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128725#M48332</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128370"&gt;@Daan&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;You can maintain a &lt;STRONG&gt;default template&lt;/STRONG&gt; that holds the common configuration. While creating a job-specific configuration, you can safely merge your job-specific dictionary with the base template using the | operator.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 10:46:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128725#M48332</guid>
      <dc:creator>MujtabaNoori</dc:creator>
      <dc:date>2025-08-18T10:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: using loops</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128729#M48333</link>
      <description>&lt;P&gt;And I think this is excatly what you're looking for &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128370"&gt;@Daan&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1755515177551.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19155i27FFBA27B9D5D5A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1755515177551.png" alt="szymon_dybczak_0-1755515177551.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/python#create-resources-using-metadata" target="_blank"&gt;Bundle configuration in Python | Databricks Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 11:06:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-using-loops/m-p/128729#M48333</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-18T11:06:23Z</dc:date>
    </item>
  </channel>
</rss>

