<?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 api to create a serverless job in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129978#M48659</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;siennafaleiro, thanks for you reply and you might be right, but then I find it strange that they list the entire json in the official docs as an example and then some of it worked and some fields are ignored.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Aug 2025 07:46:21 GMT</pubDate>
    <dc:creator>anazen13</dc:creator>
    <dc:date>2025-08-28T07:46:21Z</dc:date>
    <item>
      <title>databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129900#M48627</link>
      <description>&lt;P&gt;I am trying to follow your documentation on how to create serverless job via API&amp;nbsp;&lt;A href="https://docs.databricks.com/api/workspace/jobs/create#environments-spec-environment_version" target="_blank"&gt;https://docs.databricks.com/api/workspace/jobs/create#environments-spec-environment_version&lt;/A&gt;&amp;nbsp;So i see that sending the json request resulted for me to see serverless cluster for my test job in Databricks UI. However even though i specify the environment or dependencies in my json, they seem to be completely ignored. By default i get serverless environement 3. Can you give me a hint of what is going wrong in this case?&lt;/P&gt;&lt;P&gt;Here is my json&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
              "environments": [
                {
                  "environment_key": "default_python",
                  "spec": {
                    "environment_version": "1",
                    "dependencies": [
                      "/Volumes/&amp;lt;mycatalog&amp;gt;/..."
                    ]
                  }
                }
              ],
              "name": "${{ parameters.TEST_RUN_TITLE }}",
              "tasks": [
                {
                  "task_key": "pytest_task",
                  "notebook_task": {
                    "notebook_path": "${{ parameters.NOTEBOOK_PATH }}",
                    "base_parameters": {
                      "build_id": "$(Build.BuildId)"
                    }
                  }
                }
              ]
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 12:34:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129900#M48627</guid>
      <dc:creator>anazen13</dc:creator>
      <dc:date>2025-08-27T12:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129901#M48628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/181290"&gt;@anazen13&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you using databricks cli to create serveless job or are you calling REST API directly?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 13:02:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129901#M48628</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-27T13:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129956#M48652</link>
      <description>&lt;P&gt;It looks like you’re hitting one of the current limitations of Databricks serverless jobs. Even though the API supports passing an environments object, only certain fields are honored right now. In particular:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The environment_version parameter will default to the latest supported runtime (currently Serverless Environment 3), and you can’t override it with "1" or other values yet.&lt;/LI&gt;&lt;LI&gt;Custom dependencies aren’t picked up from the job JSON directly. For serverless jobs, dependency management has to be handled through &lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles" target="_self"&gt;Databricks Asset Bundles&lt;/A&gt;, package installation in the notebook itself (e.g., %pip install), or by referencing volumes/libraries within the task.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So in your example, the JSON is valid, but the fields you’re setting are ignored because serverless doesn’t currently allow custom environment pinning or inline dependency injection.&lt;/P&gt;&lt;P&gt;If you need strict control over environment/dependencies, you’ll want to either:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use a standard job cluster with your desired runtime + libraries.&lt;/LI&gt;&lt;LI&gt;Or package dependencies in a wheel/requirements file and install them at task start in the serverless job.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I’d also keep an eye on the &lt;A href="https://docs.databricks.com/aws/en" target="_self"&gt;Jobs API release notes&lt;/A&gt;, since Databricks has been expanding serverless features fairly quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 03:19:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129956#M48652</guid>
      <dc:creator>siennafaleiro</dc:creator>
      <dc:date>2025-08-28T03:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129976#M48658</link>
      <description>&lt;P&gt;yeah i define the json based on the doc link provided in the original message and then use cli to create a new job.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;JOB_RESPONSE=$(databricks jobs create --json "$JOB_JSON")
JOB_ID=$(echo "$JOB_RESPONSE" | jq -r '.job_id')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 07:41:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129976#M48658</guid>
      <dc:creator>anazen13</dc:creator>
      <dc:date>2025-08-28T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129978#M48659</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;siennafaleiro, thanks for you reply and you might be right, but then I find it strange that they list the entire json in the official docs as an example and then some of it worked and some fields are ignored.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 07:46:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129978#M48659</guid>
      <dc:creator>anazen13</dc:creator>
      <dc:date>2025-08-28T07:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129979#M48660</link>
      <description>&lt;P&gt;Ok, thanks for info &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/181290"&gt;@anazen13&lt;/a&gt;&amp;nbsp;. If I were you I would double check that you're using latest version of databricks cli. Your payload looks correct, but if you're using old version of the cli, new environment_version attribute could not be visible.&lt;BR /&gt;If that doesn’t help, then it’s possible I’ve found a bug. In that case, you can report it to Databricks support.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 07:48:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129979#M48660</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-28T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129980#M48661</link>
      <description>&lt;P&gt;hey, thanks for responding quickly. The version i use&lt;SPAN&gt;&amp;nbsp;Databricks CLI v0.265.0. I guess should be good enough cause I see the most recent v0.266.0 released just yesterday.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 08:07:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129980#M48661</guid>
      <dc:creator>anazen13</dc:creator>
      <dc:date>2025-08-28T08:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129986#M48662</link>
      <description>&lt;P&gt;So, I've tested it on my environment and it worked as expected. But I've used the newest version of cli.&lt;/P&gt;&lt;P&gt;So, here's my payload:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1756370880145.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19422iD7C5EC1A10F1A685/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1756370880145.png" alt="szymon_dybczak_0-1756370880145.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's cli command I've used:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;databricks jobs create --json @payload.json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's an outcome. New Job was created with specification I defined in my json payload:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_1-1756370958379.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19423iB2D2296B6B536311/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_1-1756370958379.png" alt="szymon_dybczak_1-1756370958379.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&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_2-1756371020237.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19424i39C2AF58BD7C84BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_2-1756371020237.png" alt="szymon_dybczak_2-1756371020237.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 08:51:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129986#M48662</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-28T08:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129991#M48664</link>
      <description>&lt;P&gt;I just tried by updating my json to match yours as much as possible but still no success &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think I will report this issue anyway to their support to debug further what's not okay in my case. But thanks so much for your time.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 09:38:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129991#M48664</guid>
      <dc:creator>anazen13</dc:creator>
      <dc:date>2025-08-28T09:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: databricks api to create a serverless job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129993#M48665</link>
      <description>&lt;P&gt;Sure, no problem. Let us know about the outcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 09:46:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-api-to-create-a-serverless-job/m-p/129993#M48665</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-28T09:46:03Z</dc:date>
    </item>
  </channel>
</rss>

