<?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: Getting JOB-ID dynamically to create another job to refer as job-task in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88849#M37642</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;To create a new job in Databricks Asset Bundles that refers to another job-task without hard-coding the job ID, use job parameters to pass dynamic values. Define a job parameter to hold the job ID once it’s created and use placeholders in your job configuration. This way, you can dynamically set the job ID when deploying the bundle.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2024 10:11:02 GMT</pubDate>
    <dc:creator>jeffrey597doss</dc:creator>
    <dc:date>2024-09-06T10:11:02Z</dc:date>
    <item>
      <title>Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88843#M37637</link>
      <description>&lt;P&gt;I am trying to create a new job in Databricks Asset Bundles which refers to another job-task and passing parameters to it. However, the previous job is not created yet (Or will be cretead using Databricks asset bundles in higher envs when deploying the bundle). I dont want to make it a hard-coded job-id.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 09:34:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88843#M37637</guid>
      <dc:creator>ramy</dc:creator>
      <dc:date>2024-09-06T09:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88849#M37642</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;To create a new job in Databricks Asset Bundles that refers to another job-task without hard-coding the job ID, use job parameters to pass dynamic values. Define a job parameter to hold the job ID once it’s created and use placeholders in your job configuration. This way, you can dynamically set the job ID when deploying the bundle.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:11:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88849#M37642</guid>
      <dc:creator>jeffrey597doss</dc:creator>
      <dc:date>2024-09-06T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88852#M37643</link>
      <description>&lt;P&gt;Thanks for your response. However, it makes the process manual as when the first job is deployed, then get the first job-id and pass it to the second job to as a paramter-value and deploy the second job. I was looking for a way where the first job key (say name) can be used a reference parameter in the second job definition, so it stays dynamic.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 10:25:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88852#M37643</guid>
      <dc:creator>ramy</dc:creator>
      <dc:date>2024-09-06T10:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88856#M37646</link>
      <description>&lt;P&gt;Good question. If the job is created outside of the asset bundle, and exists before this bundle will be used for the first time you can use a lookup variable&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;variables:
  your_job_id:
    lookup:
      job: "your_job_name"&lt;/LI-CODE&gt;&lt;P&gt;If it's created inside the same bundle you can reference it directly&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${resources.jobs.&amp;lt;job-name&amp;gt;.id}&lt;/LI-CODE&gt;&lt;P&gt;I've not tried these in anger though, so let me know how you get on.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/en/dev-tools/bundles/variables.html" target="_blank"&gt;https://docs.databricks.com/en/dev-tools/bundles/variables.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 11:22:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/88856#M37646</guid>
      <dc:creator>ally-r</dc:creator>
      <dc:date>2024-09-06T11:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/102860#M41252</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Yes this solution of referencing the variable&amp;nbsp;&lt;STRONG&gt;${resources.jobs.&amp;lt;job-name&amp;gt;.id}&lt;/STRONG&gt; works within the same bundle and this should be a solution. I had tried that by creating multiple workflows and referencing that.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 18:47:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/102860#M41252</guid>
      <dc:creator>nvashisth</dc:creator>
      <dc:date>2024-12-20T18:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting JOB-ID dynamically to create another job to refer as job-task</title>
      <link>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/112386#M44197</link>
      <description>&lt;P&gt;The lookup works. Here is how it can be used for a job existing outside the asset bundle&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;variables:&lt;BR /&gt;    my_jobid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;     description: Enter the Databricks Job name you want to refer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;     lookup:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;     job: &lt;/SPAN&gt;&lt;SPAN&gt;'My Job1'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;In the resources section, reference it like&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;tasks:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - task_key: &lt;/SPAN&gt;&lt;SPAN&gt;Run MyJob1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run_job_task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; job_id: &lt;/SPAN&gt;&lt;SPAN&gt;${var.my_jobid}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:30:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getting-job-id-dynamically-to-create-another-job-to-refer-as-job/m-p/112386#M44197</guid>
      <dc:creator>priya12</dc:creator>
      <dc:date>2025-03-12T15:30:40Z</dc:date>
    </item>
  </channel>
</rss>

