<?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 Job runs on serverless eventhough Job config has cluster definitions in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135857#M50446</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am defining the job along with job cluster specification using python sdk. But when the job runs it is using the serverless compute, instead of the defined cluster. I can say the job uses serverless from the job_run log and also from the system.billing.usage table SKU used.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrong here ? How do I create and use the job cluster in the right way. Thanks for looking.&lt;/P&gt;&lt;P&gt;a) current cluster spec&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_0-1761230207138.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20989iDACE2123FF53643C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_0-1761230207138.png" alt="AshMod_0-1761230207138.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;b) I can see the job defined along with the cluster details, including the node types.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_1-1761230258750.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20990i59C800F7EF58DE96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_1-1761230258750.png" alt="AshMod_1-1761230258750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;c) But when I run the job I see that it is using the Serverless compute.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_2-1761231900872.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20991i0B623A0E8F008EB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_2-1761231900872.png" alt="AshMod_2-1761231900872.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, 23 Oct 2025 15:08:28 GMT</pubDate>
    <dc:creator>AshMod</dc:creator>
    <dc:date>2025-10-23T15:08:28Z</dc:date>
    <item>
      <title>Job runs on serverless eventhough Job config has cluster definitions</title>
      <link>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135857#M50446</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am defining the job along with job cluster specification using python sdk. But when the job runs it is using the serverless compute, instead of the defined cluster. I can say the job uses serverless from the job_run log and also from the system.billing.usage table SKU used.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrong here ? How do I create and use the job cluster in the right way. Thanks for looking.&lt;/P&gt;&lt;P&gt;a) current cluster spec&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_0-1761230207138.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20989iDACE2123FF53643C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_0-1761230207138.png" alt="AshMod_0-1761230207138.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;b) I can see the job defined along with the cluster details, including the node types.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_1-1761230258750.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20990i59C800F7EF58DE96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_1-1761230258750.png" alt="AshMod_1-1761230258750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;c) But when I run the job I see that it is using the Serverless compute.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AshMod_2-1761231900872.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20991i0B623A0E8F008EB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AshMod_2-1761231900872.png" alt="AshMod_2-1761231900872.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, 23 Oct 2025 15:08:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135857#M50446</guid>
      <dc:creator>AshMod</dc:creator>
      <dc:date>2025-10-23T15:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Job runs on serverless eventhough Job config has cluster definitions</title>
      <link>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135870#M50448</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193857"&gt;@AshMod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your attached image, the compute environment is clearly labeled "Serverless," which confirms that the job is not using a dedicated or job cluster as intended&lt;/P&gt;&lt;P&gt;Use the GET /api/2.0/clusters/get endpoint with your cluster_id to retrieve cluster details.&lt;/P&gt;&lt;P&gt;Inspect the "state" field in the response JSON, which indicates the cluster status such as "RUNNING", "TERMINATED", "PENDING", etc.&lt;/P&gt;&lt;P&gt;If the cluster state is anything other than "RUNNING", it implies the cluster is either stopped or provisioning, which might cause a fallback to serverless compute for jobs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_0-1761239374263.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20999i071BAC10C209F29F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_0-1761239374263.png" alt="ManojkMohan_0-1761239374263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you see discrepancies in the system.billing.usage table (like serverless compute being used), that further suggests that the job isn't properly associated with the cluster&lt;/P&gt;&lt;P&gt;Set the Cluster as the Only Compute Option&lt;/P&gt;&lt;P&gt;If the issue persists, ensure no other conflicting compute resources are configured. For example, if you are using multiple compute options, double-check that only the cluster you intend to use is included and confirm in logs&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 17:13:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135870#M50448</guid>
      <dc:creator>ManojkMohan</dc:creator>
      <dc:date>2025-10-23T17:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Job runs on serverless eventhough Job config has cluster definitions</title>
      <link>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135896#M50455</link>
      <description>&lt;P&gt;Thanks for checking &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/155141"&gt;@ManojkMohan&lt;/a&gt;. I found the issue in the job task definition. There is a job_clusters list in the job definition, where I provide the cluster config details. But this alone is not sufficient to have the task use the cluster. The job_cluster_key will have to be passed to the task as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise a cluster will be defined, but will not be used. We can notice *Unused* in the second screenshot.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Job.from_dict(
    {
        "name": "copy_ingest_tpch",
        "tasks": [
            {
                "task_key": "copy_ingest",
                "notebook_task": {
                    "notebook_path": os.path.abspath("./transform/copy_ingest"),
                    "source": "WORKSPACE"
                },
                ## this matters to assign the cluster to task.
                "job_cluster_key": job_cluster_key
            }
        ],
        "queue": {
            "enabled": True,
        },
        "job_clusters" : [JobCluster.from_dict(
            {"job_cluster_key": job_cluster_key, 
             "new_cluster":cluster_spec.as_dict()
            }).as_dict() 
        ],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 19:41:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/job-runs-on-serverless-eventhough-job-config-has-cluster/m-p/135896#M50455</guid>
      <dc:creator>AshMod</dc:creator>
      <dc:date>2025-10-23T19:41:22Z</dc:date>
    </item>
  </channel>
</rss>

