BaşlayınÜcretsiz Başlayın

Listing Databricks jobs

Now, we will list the Databricks jobs that have been created in our workspace. The WorkspaceClient jobs API exposes a .list() method that can be used to list all jobs in the authenticated workspace.

Bu egzersiz

Databricks with the Python SDK

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Retrieve all jobs in the workspace using the WorkspaceClient.
  • Iterate through up to 10 jobs and print each job's job_id attribute.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

from databricks.sdk import WorkspaceClient
w = WorkspaceClient()
# Retrieve all jobs in the workspace using the `WorkspaceClient`
jobs = w.____.____()
# Iterate through up to 10 jobs in workspace and print the `job_id`
for job in list(jobs)[:10]:
    print(f"JobId={job.____}")
Kodu Düzenle ve Çalıştır