Comece agoraComece grátis

Listing Databricks clusters

Databricks clusters are a set of virtual computers hosted in the Databricks platform that allow you to run Databricks jobs and notebooks. Similar to the jobs API, the clusters API of the WorkspaceClient exposes a .list() function that lists all clusters in the authenticated workspace.

Este exercicio faz parte do curso

Databricks with the Python SDK

Ver curso

Instruções do exercicio

  • Iterate through all clusters.
  • Print the cluster id for each cluster.

exercicio interativo prático

Tente este exercicio completando este código de exemplo.

from databricks.sdk import WorkspaceClient

w = WorkspaceClient()

# Iterate through all clusters
for c in w.____.____():
  # Print cluster id for each cluster
  print(c.____)
Editar e Executar Código