<?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: Using run_job_task in Databricks Asset Bundles in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48969#M28437</link>
    <description>&lt;P&gt;We are having the exact same issue and this is a blocker for us deploying using asset bundles.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 18:12:24 GMT</pubDate>
    <dc:creator>kyle_r</dc:creator>
    <dc:date>2023-10-11T18:12:24Z</dc:date>
    <item>
      <title>Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/44807#M27716</link>
      <description>&lt;P&gt;Do Databrick Asset Bundles support run_job_task tasks?&lt;/P&gt;&lt;P&gt;I've made various attempts to add a run_job_task with a specified job_id. See my the code_snippet below. I tried substituting the job_id using ${...} syntax, as well as three other ways which I've commented out. I've tried to pass the id as both a string and an int.&lt;/P&gt;&lt;P&gt;When I pass a string, it returns: "error unmarshaling JSON: json: cannot unmarshal string into Go struct field RunJobTask.resources.jobs.tasks.run_job_task.job_id of type int."&lt;/P&gt;&lt;P&gt;When I pass an int, it returns "Error: cannot create job: Job 0 does not exist." However, the when I pass the int bundle validate does succeed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    product_dimension_template:
      name: "Product Dimension Template"
      tasks:
        - task_key: product_dimension
          notebook_task:
            notebook_path: ./app/product_dim.py
          existing_cluster_id: 0723-185453-mypxim3x # tr_compute_autoscale
      tags:
        product: FCOE_measure_prototype

    product_dimension_ACDS_product_div:
      name: "Product Dimension - ACDS Product Div"
      tasks:
        - task_key: product_dimension_ACDS_product_div
          run_job_task:
            job_id: ${resources.jobs.product_dimension_template.id}
            # job_id: "${resources.jobs.product_dimension_template.id}"
            # job_id: "1032011550656546"
            # job_id: 1032011550656546
            notebook_params:
              product_dim_source": ACDS_product_div
              product_dim_source_path": ${var.ACDS_product_div_path}
              product_dim_checkpoint_path": ${var.ACDS_product_div_checkpoint_path}
              product_dim_table_path": ${var.product_dim_table_path}
      tags:
        product: FCOE_measure_prototype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 17:40:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/44807#M27716</guid>
      <dc:creator>TimReddick</dc:creator>
      <dc:date>2023-09-14T17:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/45230#M27821</link>
      <description>&lt;P&gt;Hi, thanks for the response! I've tried your suggestions, but I'm still having issues. The job for product_dimension_template definitely exists.&lt;SPAN&gt;&amp;nbsp;It was deployed via the same DAB in which I'm trying to define the `run_job_task`.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimReddick_0-1695035480879.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/3810i9C984304DEF7E561/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="TimReddick_0-1695035480879.png" alt="TimReddick_0-1695035480879.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried two different things for testing:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Provide the job_id explicitly as an int (not using string substitution).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Provide the job_id via `${resources.jobs.product_dimension_template.job_id}` as you suggested.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;product_dimension_ACDS_product_div:
      name: "Product Dimension - ACDS Product Div"
      tasks:
        - task_key: product_dimension_ACDS_product_div
          run_job_task:
            job_id: 892367837319872&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;product_dimension_ACDS_product_div:
      name: "Product Dimension - ACDS Product Div"
      tasks:
        - task_key: product_dimension_ACDS_product_div
          run_job_task:
            job_id: ${resources.jobs.product_dimension_template.job_id}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In case (1), I get the following error:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Starting resource deployment
Error: terraform apply: exit status 1

Error: cannot create job: Job 0 does not exist.

  with databricks_job.product_dimension_ACDS_product_div,
  on bundle.tf.json line 79, in resource.databricks_job.product_dimension_ACDS_product_div:
  79:       },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In case (2), I get the following error:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error: failed to load /Users/t574461/code_saas/fcoe_measure_prototype/conf/bundle.product_dim.yml: error unmarshaling JSON: json: cannot unmarshal string into Go struct field RunJobTask.resources.jobs.tasks.run_job_task.job_id of type int&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one case, it's inferring the job_id as 0 for some reason, and in the other it seems&amp;nbsp;&lt;SPAN&gt;`${resources.jobs.product_dimension_template.job_id}` returns a string when it expects an int.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 11:28:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/45230#M27821</guid>
      <dc:creator>TimReddick</dc:creator>
      <dc:date>2023-09-18T11:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/46587#M28073</link>
      <description>&lt;P&gt;Have you been able to resolve this issue? I'm facing the same issue.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 10:59:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/46587#M28073</guid>
      <dc:creator>Vaisakh_Anil</dc:creator>
      <dc:date>2023-09-28T10:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/46588#M28074</link>
      <description>&lt;P&gt;Hi, no I haven't resolved yet. I was hoping to hear back from&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;. This will be a great feature for us if we can get passed this obstacle with the DAB.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 11:39:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/46588#M28074</guid>
      <dc:creator>TimReddick</dc:creator>
      <dc:date>2023-09-28T11:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48969#M28437</link>
      <description>&lt;P&gt;We are having the exact same issue and this is a blocker for us deploying using asset bundles.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 18:12:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48969#M28437</guid>
      <dc:creator>kyle_r</dc:creator>
      <dc:date>2023-10-11T18:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48976#M28440</link>
      <description>&lt;P&gt;Ah, I see it is a known bug in the Databricks CLI:&amp;nbsp;&lt;A href="https://github.com/databricks/cli/issues/812" target="_blank"&gt;Asset bundle run_job_task fails · Issue #812 · databricks/cli (github.com)&lt;/A&gt;. Anyone facing this issue should comment on and keep an eye on that ticket for resolution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 19:56:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48976#M28440</guid>
      <dc:creator>kyle_r</dc:creator>
      <dc:date>2023-10-11T19:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using run_job_task in Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48979#M28441</link>
      <description>&lt;P&gt;Thanks for point me to this&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/91307"&gt;@kyle_r&lt;/a&gt;! Good to know they're aware of it and working on a solution.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 20:10:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-run-job-task-in-databricks-asset-bundles/m-p/48979#M28441</guid>
      <dc:creator>TimReddick</dc:creator>
      <dc:date>2023-10-11T20:10:55Z</dc:date>
    </item>
  </channel>
</rss>

