<?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 Databricks workflow job in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100123#M40194</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I am trying to execute a workflow job which takes in a parameter as unique identifier. I am using this job parameter to push down to tasks. I was hoping if there is any way for me to use python uuid4() function to generate unique id every time the workflow job runs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to generate uuid on the run time as job parameter.?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2024 15:43:07 GMT</pubDate>
    <dc:creator>ctiwari7</dc:creator>
    <dc:date>2024-11-26T15:43:07Z</dc:date>
    <item>
      <title>Databricks workflow job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100123#M40194</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I am trying to execute a workflow job which takes in a parameter as unique identifier. I am using this job parameter to push down to tasks. I was hoping if there is any way for me to use python uuid4() function to generate unique id every time the workflow job runs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to generate uuid on the run time as job parameter.?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 15:43:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100123#M40194</guid>
      <dc:creator>ctiwari7</dc:creator>
      <dc:date>2024-11-26T15:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks workflow job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100127#M40196</link>
      <description>&lt;P&gt;The intention is that the same job generates this id and once it is generated that this id is passed as a parameter for other tasks?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 16:21:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100127#M40196</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-11-26T16:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks workflow job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100134#M40197</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;A class="" href="https://community.databricks.com/t5/user/viewprofilepage/user-id/120100" target="_self"&gt;&lt;SPAN class=""&gt;ctiwari7&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;A possible way to do that, you create a python file which generates the uuid and then pass it to&amp;nbsp;&lt;SPAN&gt;jobs.taskValues. This is described here:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/jobs/task-values.html" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/jobs/task-values.html&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As test, I created a python file, with the following content:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import uuid

uuid = str(uuid.uuid4())

print(uuid)

dbutils.jobs.taskValues.set(key = "uuid", value = uuid)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The file will be added as task in a databricks job.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_0-1732638676813.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13174iB3421C0F848F930E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_0-1732638676813.png" alt="StefanKoch_0-1732638676813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For the demo, I have a simple notebook which takes a widget as parameter:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_1-1732638717745.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13175i3DCE17081762DC6E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_1-1732638717745.png" alt="StefanKoch_1-1732638717745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the job, I add a second task, where I refer to the notebook:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_2-1732638761389.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13176i3A2E4DC3FCEFD921/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_2-1732638761389.png" alt="StefanKoch_2-1732638761389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the parameter field: put the following information:&lt;BR /&gt;name: uuid&lt;BR /&gt;value: &amp;nbsp;&lt;SPAN&gt;{{tasks.create_uuid.values.uuid}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_3-1732638818391.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13177i0BBE2B7107CB4499/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_3-1732638818391.png" alt="StefanKoch_3-1732638818391.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 16:34:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-workflow-job/m-p/100134#M40197</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2024-11-26T16:34:41Z</dc:date>
    </item>
  </channel>
</rss>

