<?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 Is there a way to iterate over a combination of parameters using a &amp;quot;for each&amp;quot; task? in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/is-there-a-way-to-iterate-over-a-combination-of-parameters-using/m-p/115057#M4923</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a notebook with two input widgets set up ("current_month" and "current_year") that the notebook grabs values from and uses for processing. I want to be able to provide a list of input values in the "for each" task where each value is actually a value pair corresponding to the widget values e.g. ("January", "2023") and then specify that I want the notebook task to be iterated over using the paired values. I have only been able to find instructions for iterating over values corresponding to a single parameter (e.g. you can provide an input list ["January", "February", etc.] in the for each task and then create a parameter in the notebook task of "current_month" set equal to "{{input}}") and was wondering if what I'm trying to accomplish is possible?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2025 18:31:33 GMT</pubDate>
    <dc:creator>sys08001</dc:creator>
    <dc:date>2025-04-09T18:31:33Z</dc:date>
    <item>
      <title>Is there a way to iterate over a combination of parameters using a "for each" task?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/is-there-a-way-to-iterate-over-a-combination-of-parameters-using/m-p/115057#M4923</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a notebook with two input widgets set up ("current_month" and "current_year") that the notebook grabs values from and uses for processing. I want to be able to provide a list of input values in the "for each" task where each value is actually a value pair corresponding to the widget values e.g. ("January", "2023") and then specify that I want the notebook task to be iterated over using the paired values. I have only been able to find instructions for iterating over values corresponding to a single parameter (e.g. you can provide an input list ["January", "February", etc.] in the for each task and then create a parameter in the notebook task of "current_month" set equal to "{{input}}") and was wondering if what I'm trying to accomplish is possible?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 18:31:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/is-there-a-way-to-iterate-over-a-combination-of-parameters-using/m-p/115057#M4923</guid>
      <dc:creator>sys08001</dc:creator>
      <dc:date>2025-04-09T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to iterate over a combination of parameters using a "for each" task?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/is-there-a-way-to-iterate-over-a-combination-of-parameters-using/m-p/115113#M4925</link>
      <description>&lt;P&gt;Hi there&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/157641"&gt;@sys08001&lt;/a&gt;&amp;nbsp;, yup it is possible&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;you can pass the input values for the for_each task in json format&amp;nbsp;&lt;BR /&gt;Somewhat like this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "tableName": "product_2",
    "id": "1",
    "names": "John Doe",
    "created_at": "2025-02-22T10:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "2",
    "names": "Jane Smith",
    "created_at": "2025-02-22T11:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "3",
    "names": "Alice Johnson",
    "created_at": "2025-02-22T12:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "1",
    "names": "John Doe",
    "created_at": "2025-02-22T10:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "2",
    "names": "Jane Smith",
    "created_at": "2025-02-22T11:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "3",
    "names": "Alice Johnson",
    "created_at": "2025-02-22T12:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "1",
    "names": "John Doe",
    "created_at": "2025-02-22T10:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "2",
    "names": "Jane Smith",
    "created_at": "2025-02-22T11:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "3",
    "names": "Alice Johnson",
    "created_at": "2025-02-22T12:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "1",
    "names": "John Doe",
    "created_at": "2025-02-22T10:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "2",
    "names": "Jane Smith",
    "created_at": "2025-02-22T11:00:00.000Z"
  },
  {
    "tableName": "product_2",
    "id": "3",
    "names": "Alice Johnson",
    "created_at": "2025-02-22T12:00:00.000Z"
  }
]&lt;/LI-CODE&gt;&lt;P&gt;and then can in the each task you can use {{input.field_name}}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for you usecase , you can create a json input like this&amp;nbsp;&lt;BR /&gt;[ { "month": "January", "year" : "2025" }, ... ]&lt;BR /&gt;and then in the each task you can use input.month or input.year to call it,&amp;nbsp;&lt;BR /&gt;you can create two separate parameters for calling them or can have them in a single parameter as well&amp;nbsp;&amp;nbsp;&lt;BR /&gt;by referencing them like this&lt;BR /&gt;&lt;BR /&gt;( {{input.month}} , {{input.year}} )&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 08:02:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/is-there-a-way-to-iterate-over-a-combination-of-parameters-using/m-p/115113#M4925</guid>
      <dc:creator>ashraf1395</dc:creator>
      <dc:date>2025-04-10T08:02:08Z</dc:date>
    </item>
  </channel>
</rss>

