[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-databricks-databricks-python-sdk":3,"mdc--arsptg-key":33,"related-repo-databricks-databricks-python-sdk":4509,"related-org-databricks-databricks-python-sdk":4626},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"databricks-python-sdk","develop with Databricks Python SDK","Databricks development guidance including Python SDK, Databricks Connect, CLI, and REST API. Use when working with databricks-sdk, databricks-connect, or Databricks APIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"databricks","Databricks","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdatabricks.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"CLI","cli","tag",{"name":17,"slug":18,"type":15},"Python","python",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"API Development","api-development",204,"https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fdatabricks-agent-skills","2026-07-12T08:04:04.552795",null,60,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fdatabricks-agent-skills\u002Ftree\u002FHEAD\u002Fplugins\u002Fdatabricks\u002Fcopilot\u002Fskills\u002Fdatabricks-python-sdk","---\nname: databricks-python-sdk\ndescription: \"Databricks development guidance including Python SDK, Databricks Connect, CLI, and REST API. Use when working with databricks-sdk, databricks-connect, or Databricks APIs.\"\ncompatibility: Requires databricks CLI (>= v1.0.0)\nmetadata:\n  version: \"0.1.0\"\nparent: databricks-core\n---\n\n# Databricks Development Guide\n\nThis skill provides guidance for Databricks SDK, Databricks Connect, CLI, and REST API.\n\n**SDK Documentation:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002F\n**GitHub Repository:** https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fdatabricks-sdk-py\n\n---\n\n## Environment Setup\n\n- Use existing virtual environment at `.venv` or use `uv` to create one\n- For Spark operations: `uv pip install databricks-connect`\n- For SDK operations: `uv pip install databricks-sdk`\n- Databricks CLI version should be 0.278.0 or higher\n\n## Configuration\n\n- Default profile name: `DEFAULT`\n- Config file: `~\u002F.databrickscfg`\n- Environment variables: `DATABRICKS_HOST`, `DATABRICKS_TOKEN`\n\n---\n\n## Databricks Connect (Spark Operations)\n\nUse `databricks-connect` for running Spark code locally against a Databricks cluster.\n\n```python\nfrom databricks.connect import DatabricksSession\n\n# Auto-detects 'DEFAULT' profile from ~\u002F.databrickscfg\nspark = DatabricksSession.builder.getOrCreate()\n\n# With explicit profile\nspark = DatabricksSession.builder.profile(\"MY_PROFILE\").getOrCreate()\n\n# Use spark as normal\ndf = spark.sql(\"SELECT * FROM catalog.schema.table\")\ndf.show()\n```\n\n**IMPORTANT:** Do NOT set `.master(\"local[*]\")` - this will cause issues with Databricks Connect.\n\n---\n\n## Direct REST API Access\n\nFor operations not yet in SDK or overly complex via SDK, use direct REST API:\n\n```python\nfrom databricks.sdk import WorkspaceClient\n\nw = WorkspaceClient()\n\n# Direct API call using authenticated client\nresponse = w.api_client.do(\n    method=\"GET\",\n    path=\"\u002Fapi\u002F2.0\u002Fclusters\u002Flist\"\n)\n\n# POST with body\nresponse = w.api_client.do(\n    method=\"POST\",\n    path=\"\u002Fapi\u002F2.0\u002Fjobs\u002Frun-now\",\n    body={\"job_id\": 123}\n)\n```\n\n**When to use:** Prefer SDK methods when available. Use `api_client.do` for:\n- New API endpoints not yet in SDK\n- Complex operations where SDK abstraction is problematic\n- Debugging\u002Ftesting raw API responses\n\n---\n\n## Databricks CLI\n\n```bash\n# Check version (should be >= 0.278.0)\ndatabricks --version\n\n# Use specific profile\ndatabricks --profile MY_PROFILE clusters list\n\n# Common commands\ndatabricks clusters list\ndatabricks jobs list\ndatabricks workspace list \u002FUsers\u002Fme\n```\n\n---\n\n## SDK Reference\n\nFor a per-API table of method signatures and direct doc URLs (Clusters, Jobs, SQL warehouses, Unity Catalog, Serving, Vector Search, etc.), see [references\u002Fdoc-index.md](references\u002Fdoc-index.md). Worked examples for the main API surfaces live under [`examples\u002F`](examples\u002F).\n\n## SDK Documentation Architecture\n\nThe SDK documentation follows a predictable URL pattern:\n\n```\nBase: https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002F\n\nWorkspace APIs:  \u002Fworkspace\u002F{category}\u002F{service}.html\nAccount APIs:    \u002Faccount\u002F{category}\u002F{service}.html\nAuthentication:  \u002Fauthentication.html\nDBUtils:         \u002Fdbutils.html\n```\n\n### Workspace API Categories\n| Category | Services |\n|----------|----------|\n| `compute` | clusters, cluster_policies, command_execution, instance_pools, libraries |\n| `catalog` | catalogs, schemas, tables, volumes, functions, storage_credentials, external_locations |\n| `jobs` | jobs |\n| `sql` | warehouses, statement_execution, queries, alerts, dashboards |\n| `serving` | serving_endpoints |\n| `vectorsearch` | vector_search_indexes, vector_search_endpoints |\n| `pipelines` | pipelines |\n| `workspace` | repos, secrets, workspace, git_credentials |\n| `files` | files, dbfs |\n| `ml` | experiments, model_registry |\n\n---\n\n## Authentication\n\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fauthentication.html\n\n### Environment Variables\n```bash\nDATABRICKS_HOST=https:\u002F\u002Fyour-workspace.cloud.databricks.com\nDATABRICKS_TOKEN=dapi...  # Personal Access Token\n```\n\n### Code Patterns\n\n```python\n# Auto-detect credentials from environment\nfrom databricks.sdk import WorkspaceClient\nw = WorkspaceClient()\n\n# Explicit token auth\nw = WorkspaceClient(\n    host=\"https:\u002F\u002Fyour-workspace.cloud.databricks.com\",\n    token=\"dapi...\"\n)\n\n# Azure Service Principal\nw = WorkspaceClient(\n    host=\"https:\u002F\u002Fadb-xxx.azuredatabricks.net\",\n    azure_workspace_resource_id=\"\u002Fsubscriptions\u002F...\u002FresourceGroups\u002F...\u002Fproviders\u002FMicrosoft.Databricks\u002Fworkspaces\u002F...\",\n    azure_tenant_id=\"tenant-id\",\n    azure_client_id=\"client-id\",\n    azure_client_secret=\"secret\"\n)\n\n# Use a named profile from ~\u002F.databrickscfg\nw = WorkspaceClient(profile=\"MY_PROFILE\")\n```\n\n---\n\n## Core API Reference\n\n### Clusters API\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcompute\u002Fclusters.html\n\n```python\n# List all clusters\nfor cluster in w.clusters.list():\n    print(f\"{cluster.cluster_name}: {cluster.state}\")\n\n# Get cluster details\ncluster = w.clusters.get(cluster_id=\"0123-456789-abcdef\")\n\n# Create a cluster (returns Wait object)\nwait = w.clusters.create(\n    cluster_name=\"my-cluster\",\n    spark_version=w.clusters.select_spark_version(latest=True),\n    node_type_id=w.clusters.select_node_type(local_disk=True),\n    num_workers=2\n)\ncluster = wait.result()  # Wait for cluster to be running\n\n# Or use create_and_wait for blocking call\ncluster = w.clusters.create_and_wait(\n    cluster_name=\"my-cluster\",\n    spark_version=\"14.3.x-scala2.12\",\n    node_type_id=\"i3.xlarge\",\n    num_workers=2,\n    timeout=timedelta(minutes=30)\n)\n\n# Start\u002Fstop\u002Fdelete\nw.clusters.start(cluster_id=\"...\").result()\nw.clusters.stop(cluster_id=\"...\")\nw.clusters.delete(cluster_id=\"...\")\n```\n\n### Jobs API\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fjobs\u002Fjobs.html\n\n```python\nfrom databricks.sdk.service.jobs import Task, NotebookTask\n\n# List jobs\nfor job in w.jobs.list():\n    print(f\"{job.job_id}: {job.settings.name}\")\n\n# Create a job\ncreated = w.jobs.create(\n    name=\"my-job\",\n    tasks=[\n        Task(\n            task_key=\"main\",\n            notebook_task=NotebookTask(notebook_path=\"\u002FUsers\u002Fme\u002Fnotebook\"),\n            existing_cluster_id=\"0123-456789-abcdef\"\n        )\n    ]\n)\n\n# Run a job now\nrun = w.jobs.run_now_and_wait(job_id=created.job_id)\nprint(f\"Run completed: {run.state.result_state}\")\n\n# Get run output\noutput = w.jobs.get_run_output(run_id=run.run_id)\n```\n\n### SQL Statement Execution\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fstatement_execution.html\n\n```python\n# Execute SQL query\nresponse = w.statement_execution.execute_statement(\n    warehouse_id=\"abc123\",\n    statement=\"SELECT * FROM catalog.schema.table LIMIT 10\",\n    wait_timeout=\"30s\"\n)\n\n# Check status and get results\nif response.status.state == StatementState.SUCCEEDED:\n    for row in response.result.data_array:\n        print(row)\n\n# For large results, fetch chunks\nchunk = w.statement_execution.get_statement_result_chunk_n(\n    statement_id=response.statement_id,\n    chunk_index=0\n)\n```\n\n### SQL Warehouses\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fwarehouses.html\n\n```python\n# List warehouses\nfor wh in w.warehouses.list():\n    print(f\"{wh.name}: {wh.state}\")\n\n# Get warehouse\nwarehouse = w.warehouses.get(id=\"abc123\")\n\n# Create warehouse\ncreated = w.warehouses.create_and_wait(\n    name=\"my-warehouse\",\n    cluster_size=\"Small\",\n    max_num_clusters=1,\n    auto_stop_mins=15\n)\n\n# Start\u002Fstop\nw.warehouses.start(id=\"abc123\").result()\nw.warehouses.stop(id=\"abc123\").result()\n```\n\n### Unity Catalog - Tables\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Ftables.html\n\n```python\n# List tables in a schema\nfor table in w.tables.list(catalog_name=\"main\", schema_name=\"default\"):\n    print(f\"{table.full_name}: {table.table_type}\")\n\n# Get table info\ntable = w.tables.get(full_name=\"main.default.my_table\")\nprint(f\"Columns: {[c.name for c in table.columns]}\")\n\n# Check if table exists\nexists = w.tables.exists(full_name=\"main.default.my_table\")\n```\n\n### Unity Catalog - Catalogs & Schemas\n**Doc (Catalogs):** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fcatalogs.html\n**Doc (Schemas):** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fschemas.html\n\n```python\n# List catalogs\nfor catalog in w.catalogs.list():\n    print(catalog.name)\n\n# Create catalog\nw.catalogs.create(name=\"my_catalog\", comment=\"Description\")\n\n# List schemas\nfor schema in w.schemas.list(catalog_name=\"main\"):\n    print(schema.name)\n\n# Create schema\nw.schemas.create(name=\"my_schema\", catalog_name=\"main\")\n```\n\n### Volumes\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fvolumes.html\n\n```python\nfrom databricks.sdk.service.catalog import VolumeType\n\n# List volumes\nfor vol in w.volumes.list(catalog_name=\"main\", schema_name=\"default\"):\n    print(f\"{vol.full_name}: {vol.volume_type}\")\n\n# Create managed volume\nw.volumes.create(\n    catalog_name=\"main\",\n    schema_name=\"default\",\n    name=\"my_volume\",\n    volume_type=VolumeType.MANAGED\n)\n\n# Read volume info\nvol = w.volumes.read(name=\"main.default.my_volume\")\n```\n\n### Files API\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Ffiles\u002Ffiles.html\n\n```python\n# Upload file to volume\nw.files.upload(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\",\n    contents=open(\"local_file.csv\", \"rb\")\n)\n\n# Download file\nwith w.files.download(file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\") as f:\n    content = f.read()\n\n# List directory contents\nfor entry in w.files.list_directory_contents(\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002F\"):\n    print(f\"{entry.name}: {entry.is_directory}\")\n\n# Upload\u002Fdownload with progress (parallel)\nw.files.upload_from(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Flarge.parquet\",\n    source_path=\"\u002Flocal\u002Fpath\u002Flarge.parquet\",\n    use_parallel=True\n)\n\nw.files.download_to(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Flarge.parquet\",\n    destination=\"\u002Flocal\u002Foutput\u002F\",\n    use_parallel=True\n)\n```\n\n### Serving Endpoints (Model Serving)\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fserving\u002Fserving_endpoints.html\n\n```python\n# List endpoints\nfor ep in w.serving_endpoints.list():\n    print(f\"{ep.name}: {ep.state}\")\n\n# Get endpoint\nendpoint = w.serving_endpoints.get(name=\"my-endpoint\")\n\n# Query endpoint\nresponse = w.serving_endpoints.query(\n    name=\"my-endpoint\",\n    inputs={\"prompt\": \"Hello, world!\"}\n)\n\n# For chat\u002Fcompletions endpoints\nresponse = w.serving_endpoints.query(\n    name=\"my-chat-endpoint\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n\n# Get OpenAI-compatible client\nopenai_client = w.serving_endpoints.get_open_ai_client()\n```\n\n### Vector Search\n**Doc (Indexes):** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fvectorsearch\u002Fvector_search_indexes.html\n**Doc (Endpoints):** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fvectorsearch\u002Fvector_search_endpoints.html\n\n```python\n# List vector search indexes\nfor idx in w.vector_search_indexes.list_indexes(endpoint_name=\"my-vs-endpoint\"):\n    print(idx.name)\n\n# Query index\nresults = w.vector_search_indexes.query_index(\n    index_name=\"main.default.my_index\",\n    columns=[\"id\", \"text\", \"embedding\"],\n    query_text=\"search query\",\n    num_results=10\n)\nfor doc in results.result.data_array:\n    print(doc)\n```\n\n### Pipelines (Delta Live Tables)\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fpipelines\u002Fpipelines.html\n\n```python\n# List pipelines\nfor pipeline in w.pipelines.list_pipelines():\n    print(f\"{pipeline.name}: {pipeline.state}\")\n\n# Get pipeline\npipeline = w.pipelines.get(pipeline_id=\"abc123\")\n\n# Start pipeline update\nw.pipelines.start_update(pipeline_id=\"abc123\")\n\n# Stop pipeline\nw.pipelines.stop_and_wait(pipeline_id=\"abc123\")\n```\n\n### Secrets\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fworkspace\u002Fsecrets.html\n\n```python\n# List secret scopes\nfor scope in w.secrets.list_scopes():\n    print(scope.name)\n\n# Create scope\nw.secrets.create_scope(scope=\"my-scope\")\n\n# Put secret\nw.secrets.put_secret(scope=\"my-scope\", key=\"api-key\", string_value=\"secret123\")\n\n# Get secret (returns GetSecretResponse with value)\nsecret = w.secrets.get_secret(scope=\"my-scope\", key=\"api-key\")\n\n# List secrets in scope (metadata only, not values)\nfor s in w.secrets.list_secrets(scope=\"my-scope\"):\n    print(s.key)\n```\n\n### DBUtils\n**Doc:** https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fdbutils.html\n\n```python\n# Access dbutils through WorkspaceClient\ndbutils = w.dbutils\n\n# File system operations\nfiles = dbutils.fs.ls(\"\u002F\")\ndbutils.fs.cp(\"dbfs:\u002Fsource\", \"dbfs:\u002Fdest\")\ndbutils.fs.rm(\"dbfs:\u002Fpath\", recurse=True)\n\n# Secrets (same as w.secrets but dbutils interface)\nvalue = dbutils.secrets.get(scope=\"my-scope\", key=\"my-key\")\n```\n\n---\n\n## Common Patterns\n\n### CRITICAL: Async Applications (FastAPI, etc.)\n\n**The Databricks SDK is fully synchronous.** All calls block the thread. In async applications (FastAPI, asyncio), you MUST wrap SDK calls with `asyncio.to_thread()` to avoid blocking the event loop.\n\n```python\nimport asyncio\nfrom databricks.sdk import WorkspaceClient\n\nw = WorkspaceClient()\n\n# WRONG - blocks the event loop\nasync def get_clusters_bad():\n    return list(w.clusters.list())  # BLOCKS!\n\n# CORRECT - runs in thread pool\nasync def get_clusters_good():\n    return await asyncio.to_thread(lambda: list(w.clusters.list()))\n\n# CORRECT - for simple calls\nasync def get_cluster(cluster_id: str):\n    return await asyncio.to_thread(w.clusters.get, cluster_id)\n\n# CORRECT - FastAPI endpoint\nfrom fastapi import FastAPI\napp = FastAPI()\n\n@app.get(\"\u002Fclusters\")\nasync def list_clusters():\n    clusters = await asyncio.to_thread(lambda: list(w.clusters.list()))\n    return [{\"id\": c.cluster_id, \"name\": c.cluster_name} for c in clusters]\n\n@app.post(\"\u002Fquery\")\nasync def run_query(sql: str, warehouse_id: str):\n    # Wrap the blocking SDK call\n    response = await asyncio.to_thread(\n        w.statement_execution.execute_statement,\n        statement=sql,\n        warehouse_id=warehouse_id,\n        wait_timeout=\"30s\"\n    )\n    return response.result.data_array\n```\n\n**Note:** `WorkspaceClient().config.host` is NOT a network call - it just reads config. No need to wrap property access.\n\n---\n\n### Wait for Long-Running Operations\n```python\nfrom datetime import timedelta\n\n# Pattern 1: Use *_and_wait methods\ncluster = w.clusters.create_and_wait(\n    cluster_name=\"test\",\n    spark_version=\"14.3.x-scala2.12\",\n    node_type_id=\"i3.xlarge\",\n    num_workers=2,\n    timeout=timedelta(minutes=30)\n)\n\n# Pattern 2: Use Wait object\nwait = w.clusters.create(...)\ncluster = wait.result()  # Blocks until ready\n\n# Pattern 3: Manual polling with callback\ndef progress(cluster):\n    print(f\"State: {cluster.state}\")\n\ncluster = w.clusters.wait_get_cluster_running(\n    cluster_id=\"...\",\n    timeout=timedelta(minutes=30),\n    callback=progress\n)\n```\n\n### Pagination\n```python\n# All list methods return iterators that handle pagination automatically\nfor job in w.jobs.list():  # Fetches all pages\n    print(job.settings.name)\n\n# For manual control\nfrom databricks.sdk.service.jobs import ListJobsRequest\nresponse = w.jobs.list(limit=10)\nfor job in response:\n    print(job)\n```\n\n### Error Handling\n```python\nfrom databricks.sdk.errors import NotFound, PermissionDenied, ResourceAlreadyExists\n\ntry:\n    cluster = w.clusters.get(cluster_id=\"invalid-id\")\nexcept NotFound:\n    print(\"Cluster not found\")\nexcept PermissionDenied:\n    print(\"Access denied\")\n```\n\n---\n\n## When Uncertain\n\nIf I'm unsure about a method, I should:\n\n1. **Check the documentation URL pattern:**\n   - `https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002F{category}\u002F{service}.html`\n\n2. **Common categories:**\n   - Clusters: `\u002Fworkspace\u002Fcompute\u002Fclusters.html`\n   - Jobs: `\u002Fworkspace\u002Fjobs\u002Fjobs.html`\n   - Tables: `\u002Fworkspace\u002Fcatalog\u002Ftables.html`\n   - Warehouses: `\u002Fworkspace\u002Fsql\u002Fwarehouses.html`\n   - Serving: `\u002Fworkspace\u002Fserving\u002Fserving_endpoints.html`\n\n3. **Fetch and verify** before providing guidance on parameters or return types.\n\n---\n\n## Quick Reference Links\n\n| API | Documentation URL |\n|-----|-------------------|\n| Authentication | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fauthentication.html |\n| Clusters | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcompute\u002Fclusters.html |\n| Jobs | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fjobs\u002Fjobs.html |\n| SQL Warehouses | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fwarehouses.html |\n| Statement Execution | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fstatement_execution.html |\n| Tables | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Ftables.html |\n| Catalogs | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fcatalogs.html |\n| Schemas | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fschemas.html |\n| Volumes | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fvolumes.html |\n| Files | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Ffiles\u002Ffiles.html |\n| Serving Endpoints | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fserving\u002Fserving_endpoints.html |\n| Vector Search | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fvectorsearch\u002Fvector_search_indexes.html |\n| Pipelines | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fpipelines\u002Fpipelines.html |\n| Secrets | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fworkspace\u002Fsecrets.html |\n| DBUtils | https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fdbutils.html |\n\n## Related Skills\n\n- **databricks-core** - profile and authentication setup\n- **databricks-dabs** - deploying resources via DABs\n- **databricks-jobs** - job orchestration patterns\n- **[databricks-unity-catalog](..\u002Fdatabricks-unity-catalog\u002FSKILL.md)** - catalog governance\n- **databricks-model-serving** - serving endpoint management\n- **[databricks-vector-search](..\u002Fdatabricks-vector-search\u002FSKILL.md)** - vector index operations\n- **databricks-lakebase** - managed PostgreSQL with autoscaling + branching\n",{"data":34,"body":39},{"name":4,"description":6,"compatibility":35,"metadata":36,"parent":38},"Requires databricks CLI (>= v1.0.0)",{"version":37},"0.1.0","databricks-core",{"type":40,"children":41},"root",[42,51,57,88,92,99,153,159,203,206,212,225,335,353,356,362,367,502,520,538,541,547,689,692,698,721,727,732,742,749,945,948,954,969,975,1022,1028,1200,1203,1209,1215,1229,1469,1475,1489,1683,1689,1703,1842,1848,1862,2009,2015,2029,2114,2120,2147,2255,2261,2275,2406,2412,2426,2632,2638,2652,2820,2826,2853,2962,2968,2982,3082,3088,3102,3233,3239,3253,3338,3341,3347,3353,3371,3664,3681,3684,3690,3878,3884,3962,3968,4038,4041,4047,4052,4152,4155,4161,4417,4423,4503],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"databricks-development-guide",[48],{"type":49,"value":50},"text","Databricks Development Guide",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55],{"type":49,"value":56},"This skill provides guidance for Databricks SDK, Databricks Connect, CLI, and REST API.",{"type":43,"tag":52,"props":58,"children":59},{},[60,66,68,76,81,82],{"type":43,"tag":61,"props":62,"children":63},"strong",{},[64],{"type":49,"value":65},"SDK Documentation:",{"type":49,"value":67}," ",{"type":43,"tag":69,"props":70,"children":74},"a",{"href":71,"rel":72},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002F",[73],"nofollow",[75],{"type":49,"value":71},{"type":43,"tag":61,"props":77,"children":78},{},[79],{"type":49,"value":80},"GitHub Repository:",{"type":49,"value":67},{"type":43,"tag":69,"props":83,"children":86},{"href":84,"rel":85},"https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fdatabricks-sdk-py",[73],[87],{"type":49,"value":84},{"type":43,"tag":89,"props":90,"children":91},"hr",{},[],{"type":43,"tag":93,"props":94,"children":96},"h2",{"id":95},"environment-setup",[97],{"type":49,"value":98},"Environment Setup",{"type":43,"tag":100,"props":101,"children":102},"ul",{},[103,126,137,148],{"type":43,"tag":104,"props":105,"children":106},"li",{},[107,109,116,118,124],{"type":49,"value":108},"Use existing virtual environment at ",{"type":43,"tag":110,"props":111,"children":113},"code",{"className":112},[],[114],{"type":49,"value":115},".venv",{"type":49,"value":117}," or use ",{"type":43,"tag":110,"props":119,"children":121},{"className":120},[],[122],{"type":49,"value":123},"uv",{"type":49,"value":125}," to create one",{"type":43,"tag":104,"props":127,"children":128},{},[129,131],{"type":49,"value":130},"For Spark operations: ",{"type":43,"tag":110,"props":132,"children":134},{"className":133},[],[135],{"type":49,"value":136},"uv pip install databricks-connect",{"type":43,"tag":104,"props":138,"children":139},{},[140,142],{"type":49,"value":141},"For SDK operations: ",{"type":43,"tag":110,"props":143,"children":145},{"className":144},[],[146],{"type":49,"value":147},"uv pip install databricks-sdk",{"type":43,"tag":104,"props":149,"children":150},{},[151],{"type":49,"value":152},"Databricks CLI version should be 0.278.0 or higher",{"type":43,"tag":93,"props":154,"children":156},{"id":155},"configuration",[157],{"type":49,"value":158},"Configuration",{"type":43,"tag":100,"props":160,"children":161},{},[162,173,184],{"type":43,"tag":104,"props":163,"children":164},{},[165,167],{"type":49,"value":166},"Default profile name: ",{"type":43,"tag":110,"props":168,"children":170},{"className":169},[],[171],{"type":49,"value":172},"DEFAULT",{"type":43,"tag":104,"props":174,"children":175},{},[176,178],{"type":49,"value":177},"Config file: ",{"type":43,"tag":110,"props":179,"children":181},{"className":180},[],[182],{"type":49,"value":183},"~\u002F.databrickscfg",{"type":43,"tag":104,"props":185,"children":186},{},[187,189,195,197],{"type":49,"value":188},"Environment variables: ",{"type":43,"tag":110,"props":190,"children":192},{"className":191},[],[193],{"type":49,"value":194},"DATABRICKS_HOST",{"type":49,"value":196},", ",{"type":43,"tag":110,"props":198,"children":200},{"className":199},[],[201],{"type":49,"value":202},"DATABRICKS_TOKEN",{"type":43,"tag":89,"props":204,"children":205},{},[],{"type":43,"tag":93,"props":207,"children":209},{"id":208},"databricks-connect-spark-operations",[210],{"type":49,"value":211},"Databricks Connect (Spark Operations)",{"type":43,"tag":52,"props":213,"children":214},{},[215,217,223],{"type":49,"value":216},"Use ",{"type":43,"tag":110,"props":218,"children":220},{"className":219},[],[221],{"type":49,"value":222},"databricks-connect",{"type":49,"value":224}," for running Spark code locally against a Databricks cluster.",{"type":43,"tag":226,"props":227,"children":231},"pre",{"className":228,"code":229,"language":18,"meta":230,"style":230},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from databricks.connect import DatabricksSession\n\n# Auto-detects 'DEFAULT' profile from ~\u002F.databrickscfg\nspark = DatabricksSession.builder.getOrCreate()\n\n# With explicit profile\nspark = DatabricksSession.builder.profile(\"MY_PROFILE\").getOrCreate()\n\n# Use spark as normal\ndf = spark.sql(\"SELECT * FROM catalog.schema.table\")\ndf.show()\n","",[232],{"type":43,"tag":110,"props":233,"children":234},{"__ignoreMap":230},[235,246,256,265,274,282,291,300,308,317,326],{"type":43,"tag":236,"props":237,"children":240},"span",{"class":238,"line":239},"line",1,[241],{"type":43,"tag":236,"props":242,"children":243},{},[244],{"type":49,"value":245},"from databricks.connect import DatabricksSession\n",{"type":43,"tag":236,"props":247,"children":249},{"class":238,"line":248},2,[250],{"type":43,"tag":236,"props":251,"children":253},{"emptyLinePlaceholder":252},true,[254],{"type":49,"value":255},"\n",{"type":43,"tag":236,"props":257,"children":259},{"class":238,"line":258},3,[260],{"type":43,"tag":236,"props":261,"children":262},{},[263],{"type":49,"value":264},"# Auto-detects 'DEFAULT' profile from ~\u002F.databrickscfg\n",{"type":43,"tag":236,"props":266,"children":268},{"class":238,"line":267},4,[269],{"type":43,"tag":236,"props":270,"children":271},{},[272],{"type":49,"value":273},"spark = DatabricksSession.builder.getOrCreate()\n",{"type":43,"tag":236,"props":275,"children":277},{"class":238,"line":276},5,[278],{"type":43,"tag":236,"props":279,"children":280},{"emptyLinePlaceholder":252},[281],{"type":49,"value":255},{"type":43,"tag":236,"props":283,"children":285},{"class":238,"line":284},6,[286],{"type":43,"tag":236,"props":287,"children":288},{},[289],{"type":49,"value":290},"# With explicit profile\n",{"type":43,"tag":236,"props":292,"children":294},{"class":238,"line":293},7,[295],{"type":43,"tag":236,"props":296,"children":297},{},[298],{"type":49,"value":299},"spark = DatabricksSession.builder.profile(\"MY_PROFILE\").getOrCreate()\n",{"type":43,"tag":236,"props":301,"children":303},{"class":238,"line":302},8,[304],{"type":43,"tag":236,"props":305,"children":306},{"emptyLinePlaceholder":252},[307],{"type":49,"value":255},{"type":43,"tag":236,"props":309,"children":311},{"class":238,"line":310},9,[312],{"type":43,"tag":236,"props":313,"children":314},{},[315],{"type":49,"value":316},"# Use spark as normal\n",{"type":43,"tag":236,"props":318,"children":320},{"class":238,"line":319},10,[321],{"type":43,"tag":236,"props":322,"children":323},{},[324],{"type":49,"value":325},"df = spark.sql(\"SELECT * FROM catalog.schema.table\")\n",{"type":43,"tag":236,"props":327,"children":329},{"class":238,"line":328},11,[330],{"type":43,"tag":236,"props":331,"children":332},{},[333],{"type":49,"value":334},"df.show()\n",{"type":43,"tag":52,"props":336,"children":337},{},[338,343,345,351],{"type":43,"tag":61,"props":339,"children":340},{},[341],{"type":49,"value":342},"IMPORTANT:",{"type":49,"value":344}," Do NOT set ",{"type":43,"tag":110,"props":346,"children":348},{"className":347},[],[349],{"type":49,"value":350},".master(\"local[*]\")",{"type":49,"value":352}," - this will cause issues with Databricks Connect.",{"type":43,"tag":89,"props":354,"children":355},{},[],{"type":43,"tag":93,"props":357,"children":359},{"id":358},"direct-rest-api-access",[360],{"type":49,"value":361},"Direct REST API Access",{"type":43,"tag":52,"props":363,"children":364},{},[365],{"type":49,"value":366},"For operations not yet in SDK or overly complex via SDK, use direct REST API:",{"type":43,"tag":226,"props":368,"children":370},{"className":228,"code":369,"language":18,"meta":230,"style":230},"from databricks.sdk import WorkspaceClient\n\nw = WorkspaceClient()\n\n# Direct API call using authenticated client\nresponse = w.api_client.do(\n    method=\"GET\",\n    path=\"\u002Fapi\u002F2.0\u002Fclusters\u002Flist\"\n)\n\n# POST with body\nresponse = w.api_client.do(\n    method=\"POST\",\n    path=\"\u002Fapi\u002F2.0\u002Fjobs\u002Frun-now\",\n    body={\"job_id\": 123}\n)\n",[371],{"type":43,"tag":110,"props":372,"children":373},{"__ignoreMap":230},[374,382,389,397,404,412,420,428,436,444,451,459,467,476,485,494],{"type":43,"tag":236,"props":375,"children":376},{"class":238,"line":239},[377],{"type":43,"tag":236,"props":378,"children":379},{},[380],{"type":49,"value":381},"from databricks.sdk import WorkspaceClient\n",{"type":43,"tag":236,"props":383,"children":384},{"class":238,"line":248},[385],{"type":43,"tag":236,"props":386,"children":387},{"emptyLinePlaceholder":252},[388],{"type":49,"value":255},{"type":43,"tag":236,"props":390,"children":391},{"class":238,"line":258},[392],{"type":43,"tag":236,"props":393,"children":394},{},[395],{"type":49,"value":396},"w = WorkspaceClient()\n",{"type":43,"tag":236,"props":398,"children":399},{"class":238,"line":267},[400],{"type":43,"tag":236,"props":401,"children":402},{"emptyLinePlaceholder":252},[403],{"type":49,"value":255},{"type":43,"tag":236,"props":405,"children":406},{"class":238,"line":276},[407],{"type":43,"tag":236,"props":408,"children":409},{},[410],{"type":49,"value":411},"# Direct API call using authenticated client\n",{"type":43,"tag":236,"props":413,"children":414},{"class":238,"line":284},[415],{"type":43,"tag":236,"props":416,"children":417},{},[418],{"type":49,"value":419},"response = w.api_client.do(\n",{"type":43,"tag":236,"props":421,"children":422},{"class":238,"line":293},[423],{"type":43,"tag":236,"props":424,"children":425},{},[426],{"type":49,"value":427},"    method=\"GET\",\n",{"type":43,"tag":236,"props":429,"children":430},{"class":238,"line":302},[431],{"type":43,"tag":236,"props":432,"children":433},{},[434],{"type":49,"value":435},"    path=\"\u002Fapi\u002F2.0\u002Fclusters\u002Flist\"\n",{"type":43,"tag":236,"props":437,"children":438},{"class":238,"line":310},[439],{"type":43,"tag":236,"props":440,"children":441},{},[442],{"type":49,"value":443},")\n",{"type":43,"tag":236,"props":445,"children":446},{"class":238,"line":319},[447],{"type":43,"tag":236,"props":448,"children":449},{"emptyLinePlaceholder":252},[450],{"type":49,"value":255},{"type":43,"tag":236,"props":452,"children":453},{"class":238,"line":328},[454],{"type":43,"tag":236,"props":455,"children":456},{},[457],{"type":49,"value":458},"# POST with body\n",{"type":43,"tag":236,"props":460,"children":462},{"class":238,"line":461},12,[463],{"type":43,"tag":236,"props":464,"children":465},{},[466],{"type":49,"value":419},{"type":43,"tag":236,"props":468,"children":470},{"class":238,"line":469},13,[471],{"type":43,"tag":236,"props":472,"children":473},{},[474],{"type":49,"value":475},"    method=\"POST\",\n",{"type":43,"tag":236,"props":477,"children":479},{"class":238,"line":478},14,[480],{"type":43,"tag":236,"props":481,"children":482},{},[483],{"type":49,"value":484},"    path=\"\u002Fapi\u002F2.0\u002Fjobs\u002Frun-now\",\n",{"type":43,"tag":236,"props":486,"children":488},{"class":238,"line":487},15,[489],{"type":43,"tag":236,"props":490,"children":491},{},[492],{"type":49,"value":493},"    body={\"job_id\": 123}\n",{"type":43,"tag":236,"props":495,"children":497},{"class":238,"line":496},16,[498],{"type":43,"tag":236,"props":499,"children":500},{},[501],{"type":49,"value":443},{"type":43,"tag":52,"props":503,"children":504},{},[505,510,512,518],{"type":43,"tag":61,"props":506,"children":507},{},[508],{"type":49,"value":509},"When to use:",{"type":49,"value":511}," Prefer SDK methods when available. Use ",{"type":43,"tag":110,"props":513,"children":515},{"className":514},[],[516],{"type":49,"value":517},"api_client.do",{"type":49,"value":519}," for:",{"type":43,"tag":100,"props":521,"children":522},{},[523,528,533],{"type":43,"tag":104,"props":524,"children":525},{},[526],{"type":49,"value":527},"New API endpoints not yet in SDK",{"type":43,"tag":104,"props":529,"children":530},{},[531],{"type":49,"value":532},"Complex operations where SDK abstraction is problematic",{"type":43,"tag":104,"props":534,"children":535},{},[536],{"type":49,"value":537},"Debugging\u002Ftesting raw API responses",{"type":43,"tag":89,"props":539,"children":540},{},[],{"type":43,"tag":93,"props":542,"children":544},{"id":543},"databricks-cli",[545],{"type":49,"value":546},"Databricks CLI",{"type":43,"tag":226,"props":548,"children":552},{"className":549,"code":550,"language":551,"meta":230,"style":230},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Check version (should be >= 0.278.0)\ndatabricks --version\n\n# Use specific profile\ndatabricks --profile MY_PROFILE clusters list\n\n# Common commands\ndatabricks clusters list\ndatabricks jobs list\ndatabricks workspace list \u002FUsers\u002Fme\n","bash",[553],{"type":43,"tag":110,"props":554,"children":555},{"__ignoreMap":230},[556,565,579,586,594,621,628,636,651,667],{"type":43,"tag":236,"props":557,"children":558},{"class":238,"line":239},[559],{"type":43,"tag":236,"props":560,"children":562},{"style":561},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[563],{"type":49,"value":564},"# Check version (should be >= 0.278.0)\n",{"type":43,"tag":236,"props":566,"children":567},{"class":238,"line":248},[568,573],{"type":43,"tag":236,"props":569,"children":571},{"style":570},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[572],{"type":49,"value":8},{"type":43,"tag":236,"props":574,"children":576},{"style":575},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[577],{"type":49,"value":578}," --version\n",{"type":43,"tag":236,"props":580,"children":581},{"class":238,"line":258},[582],{"type":43,"tag":236,"props":583,"children":584},{"emptyLinePlaceholder":252},[585],{"type":49,"value":255},{"type":43,"tag":236,"props":587,"children":588},{"class":238,"line":267},[589],{"type":43,"tag":236,"props":590,"children":591},{"style":561},[592],{"type":49,"value":593},"# Use specific profile\n",{"type":43,"tag":236,"props":595,"children":596},{"class":238,"line":276},[597,601,606,611,616],{"type":43,"tag":236,"props":598,"children":599},{"style":570},[600],{"type":49,"value":8},{"type":43,"tag":236,"props":602,"children":603},{"style":575},[604],{"type":49,"value":605}," --profile",{"type":43,"tag":236,"props":607,"children":608},{"style":575},[609],{"type":49,"value":610}," MY_PROFILE",{"type":43,"tag":236,"props":612,"children":613},{"style":575},[614],{"type":49,"value":615}," clusters",{"type":43,"tag":236,"props":617,"children":618},{"style":575},[619],{"type":49,"value":620}," list\n",{"type":43,"tag":236,"props":622,"children":623},{"class":238,"line":284},[624],{"type":43,"tag":236,"props":625,"children":626},{"emptyLinePlaceholder":252},[627],{"type":49,"value":255},{"type":43,"tag":236,"props":629,"children":630},{"class":238,"line":293},[631],{"type":43,"tag":236,"props":632,"children":633},{"style":561},[634],{"type":49,"value":635},"# Common commands\n",{"type":43,"tag":236,"props":637,"children":638},{"class":238,"line":302},[639,643,647],{"type":43,"tag":236,"props":640,"children":641},{"style":570},[642],{"type":49,"value":8},{"type":43,"tag":236,"props":644,"children":645},{"style":575},[646],{"type":49,"value":615},{"type":43,"tag":236,"props":648,"children":649},{"style":575},[650],{"type":49,"value":620},{"type":43,"tag":236,"props":652,"children":653},{"class":238,"line":310},[654,658,663],{"type":43,"tag":236,"props":655,"children":656},{"style":570},[657],{"type":49,"value":8},{"type":43,"tag":236,"props":659,"children":660},{"style":575},[661],{"type":49,"value":662}," jobs",{"type":43,"tag":236,"props":664,"children":665},{"style":575},[666],{"type":49,"value":620},{"type":43,"tag":236,"props":668,"children":669},{"class":238,"line":319},[670,674,679,684],{"type":43,"tag":236,"props":671,"children":672},{"style":570},[673],{"type":49,"value":8},{"type":43,"tag":236,"props":675,"children":676},{"style":575},[677],{"type":49,"value":678}," workspace",{"type":43,"tag":236,"props":680,"children":681},{"style":575},[682],{"type":49,"value":683}," list",{"type":43,"tag":236,"props":685,"children":686},{"style":575},[687],{"type":49,"value":688}," \u002FUsers\u002Fme\n",{"type":43,"tag":89,"props":690,"children":691},{},[],{"type":43,"tag":93,"props":693,"children":695},{"id":694},"sdk-reference",[696],{"type":49,"value":697},"SDK Reference",{"type":43,"tag":52,"props":699,"children":700},{},[701,703,708,710,719],{"type":49,"value":702},"For a per-API table of method signatures and direct doc URLs (Clusters, Jobs, SQL warehouses, Unity Catalog, Serving, Vector Search, etc.), see ",{"type":43,"tag":69,"props":704,"children":706},{"href":705},"references\u002Fdoc-index.md",[707],{"type":49,"value":705},{"type":49,"value":709},". Worked examples for the main API surfaces live under ",{"type":43,"tag":69,"props":711,"children":713},{"href":712},"examples\u002F",[714],{"type":43,"tag":110,"props":715,"children":717},{"className":716},[],[718],{"type":49,"value":712},{"type":49,"value":720},".",{"type":43,"tag":93,"props":722,"children":724},{"id":723},"sdk-documentation-architecture",[725],{"type":49,"value":726},"SDK Documentation Architecture",{"type":43,"tag":52,"props":728,"children":729},{},[730],{"type":49,"value":731},"The SDK documentation follows a predictable URL pattern:",{"type":43,"tag":226,"props":733,"children":737},{"className":734,"code":736,"language":49},[735],"language-text","Base: https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002F\n\nWorkspace APIs:  \u002Fworkspace\u002F{category}\u002F{service}.html\nAccount APIs:    \u002Faccount\u002F{category}\u002F{service}.html\nAuthentication:  \u002Fauthentication.html\nDBUtils:         \u002Fdbutils.html\n",[738],{"type":43,"tag":110,"props":739,"children":740},{"__ignoreMap":230},[741],{"type":49,"value":736},{"type":43,"tag":743,"props":744,"children":746},"h3",{"id":745},"workspace-api-categories",[747],{"type":49,"value":748},"Workspace API Categories",{"type":43,"tag":750,"props":751,"children":752},"table",{},[753,772],{"type":43,"tag":754,"props":755,"children":756},"thead",{},[757],{"type":43,"tag":758,"props":759,"children":760},"tr",{},[761,767],{"type":43,"tag":762,"props":763,"children":764},"th",{},[765],{"type":49,"value":766},"Category",{"type":43,"tag":762,"props":768,"children":769},{},[770],{"type":49,"value":771},"Services",{"type":43,"tag":773,"props":774,"children":775},"tbody",{},[776,794,811,827,844,861,878,894,911,928],{"type":43,"tag":758,"props":777,"children":778},{},[779,789],{"type":43,"tag":780,"props":781,"children":782},"td",{},[783],{"type":43,"tag":110,"props":784,"children":786},{"className":785},[],[787],{"type":49,"value":788},"compute",{"type":43,"tag":780,"props":790,"children":791},{},[792],{"type":49,"value":793},"clusters, cluster_policies, command_execution, instance_pools, libraries",{"type":43,"tag":758,"props":795,"children":796},{},[797,806],{"type":43,"tag":780,"props":798,"children":799},{},[800],{"type":43,"tag":110,"props":801,"children":803},{"className":802},[],[804],{"type":49,"value":805},"catalog",{"type":43,"tag":780,"props":807,"children":808},{},[809],{"type":49,"value":810},"catalogs, schemas, tables, volumes, functions, storage_credentials, external_locations",{"type":43,"tag":758,"props":812,"children":813},{},[814,823],{"type":43,"tag":780,"props":815,"children":816},{},[817],{"type":43,"tag":110,"props":818,"children":820},{"className":819},[],[821],{"type":49,"value":822},"jobs",{"type":43,"tag":780,"props":824,"children":825},{},[826],{"type":49,"value":822},{"type":43,"tag":758,"props":828,"children":829},{},[830,839],{"type":43,"tag":780,"props":831,"children":832},{},[833],{"type":43,"tag":110,"props":834,"children":836},{"className":835},[],[837],{"type":49,"value":838},"sql",{"type":43,"tag":780,"props":840,"children":841},{},[842],{"type":49,"value":843},"warehouses, statement_execution, queries, alerts, dashboards",{"type":43,"tag":758,"props":845,"children":846},{},[847,856],{"type":43,"tag":780,"props":848,"children":849},{},[850],{"type":43,"tag":110,"props":851,"children":853},{"className":852},[],[854],{"type":49,"value":855},"serving",{"type":43,"tag":780,"props":857,"children":858},{},[859],{"type":49,"value":860},"serving_endpoints",{"type":43,"tag":758,"props":862,"children":863},{},[864,873],{"type":43,"tag":780,"props":865,"children":866},{},[867],{"type":43,"tag":110,"props":868,"children":870},{"className":869},[],[871],{"type":49,"value":872},"vectorsearch",{"type":43,"tag":780,"props":874,"children":875},{},[876],{"type":49,"value":877},"vector_search_indexes, vector_search_endpoints",{"type":43,"tag":758,"props":879,"children":880},{},[881,890],{"type":43,"tag":780,"props":882,"children":883},{},[884],{"type":43,"tag":110,"props":885,"children":887},{"className":886},[],[888],{"type":49,"value":889},"pipelines",{"type":43,"tag":780,"props":891,"children":892},{},[893],{"type":49,"value":889},{"type":43,"tag":758,"props":895,"children":896},{},[897,906],{"type":43,"tag":780,"props":898,"children":899},{},[900],{"type":43,"tag":110,"props":901,"children":903},{"className":902},[],[904],{"type":49,"value":905},"workspace",{"type":43,"tag":780,"props":907,"children":908},{},[909],{"type":49,"value":910},"repos, secrets, workspace, git_credentials",{"type":43,"tag":758,"props":912,"children":913},{},[914,923],{"type":43,"tag":780,"props":915,"children":916},{},[917],{"type":43,"tag":110,"props":918,"children":920},{"className":919},[],[921],{"type":49,"value":922},"files",{"type":43,"tag":780,"props":924,"children":925},{},[926],{"type":49,"value":927},"files, dbfs",{"type":43,"tag":758,"props":929,"children":930},{},[931,940],{"type":43,"tag":780,"props":932,"children":933},{},[934],{"type":43,"tag":110,"props":935,"children":937},{"className":936},[],[938],{"type":49,"value":939},"ml",{"type":43,"tag":780,"props":941,"children":942},{},[943],{"type":49,"value":944},"experiments, model_registry",{"type":43,"tag":89,"props":946,"children":947},{},[],{"type":43,"tag":93,"props":949,"children":951},{"id":950},"authentication",[952],{"type":49,"value":953},"Authentication",{"type":43,"tag":52,"props":955,"children":956},{},[957,962,963],{"type":43,"tag":61,"props":958,"children":959},{},[960],{"type":49,"value":961},"Doc:",{"type":49,"value":67},{"type":43,"tag":69,"props":964,"children":967},{"href":965,"rel":966},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fauthentication.html",[73],[968],{"type":49,"value":965},{"type":43,"tag":743,"props":970,"children":972},{"id":971},"environment-variables",[973],{"type":49,"value":974},"Environment Variables",{"type":43,"tag":226,"props":976,"children":978},{"className":549,"code":977,"language":551,"meta":230,"style":230},"DATABRICKS_HOST=https:\u002F\u002Fyour-workspace.cloud.databricks.com\nDATABRICKS_TOKEN=dapi...  # Personal Access Token\n",[979],{"type":43,"tag":110,"props":980,"children":981},{"__ignoreMap":230},[982,1001],{"type":43,"tag":236,"props":983,"children":984},{"class":238,"line":239},[985,990,996],{"type":43,"tag":236,"props":986,"children":988},{"style":987},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[989],{"type":49,"value":194},{"type":43,"tag":236,"props":991,"children":993},{"style":992},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[994],{"type":49,"value":995},"=",{"type":43,"tag":236,"props":997,"children":998},{"style":575},[999],{"type":49,"value":1000},"https:\u002F\u002Fyour-workspace.cloud.databricks.com\n",{"type":43,"tag":236,"props":1002,"children":1003},{"class":238,"line":248},[1004,1008,1012,1017],{"type":43,"tag":236,"props":1005,"children":1006},{"style":987},[1007],{"type":49,"value":202},{"type":43,"tag":236,"props":1009,"children":1010},{"style":992},[1011],{"type":49,"value":995},{"type":43,"tag":236,"props":1013,"children":1014},{"style":575},[1015],{"type":49,"value":1016},"dapi...",{"type":43,"tag":236,"props":1018,"children":1019},{"style":561},[1020],{"type":49,"value":1021},"  # Personal Access Token\n",{"type":43,"tag":743,"props":1023,"children":1025},{"id":1024},"code-patterns",[1026],{"type":49,"value":1027},"Code Patterns",{"type":43,"tag":226,"props":1029,"children":1031},{"className":228,"code":1030,"language":18,"meta":230,"style":230},"# Auto-detect credentials from environment\nfrom databricks.sdk import WorkspaceClient\nw = WorkspaceClient()\n\n# Explicit token auth\nw = WorkspaceClient(\n    host=\"https:\u002F\u002Fyour-workspace.cloud.databricks.com\",\n    token=\"dapi...\"\n)\n\n# Azure Service Principal\nw = WorkspaceClient(\n    host=\"https:\u002F\u002Fadb-xxx.azuredatabricks.net\",\n    azure_workspace_resource_id=\"\u002Fsubscriptions\u002F...\u002FresourceGroups\u002F...\u002Fproviders\u002FMicrosoft.Databricks\u002Fworkspaces\u002F...\",\n    azure_tenant_id=\"tenant-id\",\n    azure_client_id=\"client-id\",\n    azure_client_secret=\"secret\"\n)\n\n# Use a named profile from ~\u002F.databrickscfg\nw = WorkspaceClient(profile=\"MY_PROFILE\")\n",[1032],{"type":43,"tag":110,"props":1033,"children":1034},{"__ignoreMap":230},[1035,1043,1050,1057,1064,1072,1080,1088,1096,1103,1110,1118,1125,1133,1141,1149,1157,1166,1174,1182,1191],{"type":43,"tag":236,"props":1036,"children":1037},{"class":238,"line":239},[1038],{"type":43,"tag":236,"props":1039,"children":1040},{},[1041],{"type":49,"value":1042},"# Auto-detect credentials from environment\n",{"type":43,"tag":236,"props":1044,"children":1045},{"class":238,"line":248},[1046],{"type":43,"tag":236,"props":1047,"children":1048},{},[1049],{"type":49,"value":381},{"type":43,"tag":236,"props":1051,"children":1052},{"class":238,"line":258},[1053],{"type":43,"tag":236,"props":1054,"children":1055},{},[1056],{"type":49,"value":396},{"type":43,"tag":236,"props":1058,"children":1059},{"class":238,"line":267},[1060],{"type":43,"tag":236,"props":1061,"children":1062},{"emptyLinePlaceholder":252},[1063],{"type":49,"value":255},{"type":43,"tag":236,"props":1065,"children":1066},{"class":238,"line":276},[1067],{"type":43,"tag":236,"props":1068,"children":1069},{},[1070],{"type":49,"value":1071},"# Explicit token auth\n",{"type":43,"tag":236,"props":1073,"children":1074},{"class":238,"line":284},[1075],{"type":43,"tag":236,"props":1076,"children":1077},{},[1078],{"type":49,"value":1079},"w = WorkspaceClient(\n",{"type":43,"tag":236,"props":1081,"children":1082},{"class":238,"line":293},[1083],{"type":43,"tag":236,"props":1084,"children":1085},{},[1086],{"type":49,"value":1087},"    host=\"https:\u002F\u002Fyour-workspace.cloud.databricks.com\",\n",{"type":43,"tag":236,"props":1089,"children":1090},{"class":238,"line":302},[1091],{"type":43,"tag":236,"props":1092,"children":1093},{},[1094],{"type":49,"value":1095},"    token=\"dapi...\"\n",{"type":43,"tag":236,"props":1097,"children":1098},{"class":238,"line":310},[1099],{"type":43,"tag":236,"props":1100,"children":1101},{},[1102],{"type":49,"value":443},{"type":43,"tag":236,"props":1104,"children":1105},{"class":238,"line":319},[1106],{"type":43,"tag":236,"props":1107,"children":1108},{"emptyLinePlaceholder":252},[1109],{"type":49,"value":255},{"type":43,"tag":236,"props":1111,"children":1112},{"class":238,"line":328},[1113],{"type":43,"tag":236,"props":1114,"children":1115},{},[1116],{"type":49,"value":1117},"# Azure Service Principal\n",{"type":43,"tag":236,"props":1119,"children":1120},{"class":238,"line":461},[1121],{"type":43,"tag":236,"props":1122,"children":1123},{},[1124],{"type":49,"value":1079},{"type":43,"tag":236,"props":1126,"children":1127},{"class":238,"line":469},[1128],{"type":43,"tag":236,"props":1129,"children":1130},{},[1131],{"type":49,"value":1132},"    host=\"https:\u002F\u002Fadb-xxx.azuredatabricks.net\",\n",{"type":43,"tag":236,"props":1134,"children":1135},{"class":238,"line":478},[1136],{"type":43,"tag":236,"props":1137,"children":1138},{},[1139],{"type":49,"value":1140},"    azure_workspace_resource_id=\"\u002Fsubscriptions\u002F...\u002FresourceGroups\u002F...\u002Fproviders\u002FMicrosoft.Databricks\u002Fworkspaces\u002F...\",\n",{"type":43,"tag":236,"props":1142,"children":1143},{"class":238,"line":487},[1144],{"type":43,"tag":236,"props":1145,"children":1146},{},[1147],{"type":49,"value":1148},"    azure_tenant_id=\"tenant-id\",\n",{"type":43,"tag":236,"props":1150,"children":1151},{"class":238,"line":496},[1152],{"type":43,"tag":236,"props":1153,"children":1154},{},[1155],{"type":49,"value":1156},"    azure_client_id=\"client-id\",\n",{"type":43,"tag":236,"props":1158,"children":1160},{"class":238,"line":1159},17,[1161],{"type":43,"tag":236,"props":1162,"children":1163},{},[1164],{"type":49,"value":1165},"    azure_client_secret=\"secret\"\n",{"type":43,"tag":236,"props":1167,"children":1169},{"class":238,"line":1168},18,[1170],{"type":43,"tag":236,"props":1171,"children":1172},{},[1173],{"type":49,"value":443},{"type":43,"tag":236,"props":1175,"children":1177},{"class":238,"line":1176},19,[1178],{"type":43,"tag":236,"props":1179,"children":1180},{"emptyLinePlaceholder":252},[1181],{"type":49,"value":255},{"type":43,"tag":236,"props":1183,"children":1185},{"class":238,"line":1184},20,[1186],{"type":43,"tag":236,"props":1187,"children":1188},{},[1189],{"type":49,"value":1190},"# Use a named profile from ~\u002F.databrickscfg\n",{"type":43,"tag":236,"props":1192,"children":1194},{"class":238,"line":1193},21,[1195],{"type":43,"tag":236,"props":1196,"children":1197},{},[1198],{"type":49,"value":1199},"w = WorkspaceClient(profile=\"MY_PROFILE\")\n",{"type":43,"tag":89,"props":1201,"children":1202},{},[],{"type":43,"tag":93,"props":1204,"children":1206},{"id":1205},"core-api-reference",[1207],{"type":49,"value":1208},"Core API Reference",{"type":43,"tag":743,"props":1210,"children":1212},{"id":1211},"clusters-api",[1213],{"type":49,"value":1214},"Clusters API",{"type":43,"tag":52,"props":1216,"children":1217},{},[1218,1222,1223],{"type":43,"tag":61,"props":1219,"children":1220},{},[1221],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":1224,"children":1227},{"href":1225,"rel":1226},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcompute\u002Fclusters.html",[73],[1228],{"type":49,"value":1225},{"type":43,"tag":226,"props":1230,"children":1232},{"className":228,"code":1231,"language":18,"meta":230,"style":230},"# List all clusters\nfor cluster in w.clusters.list():\n    print(f\"{cluster.cluster_name}: {cluster.state}\")\n\n# Get cluster details\ncluster = w.clusters.get(cluster_id=\"0123-456789-abcdef\")\n\n# Create a cluster (returns Wait object)\nwait = w.clusters.create(\n    cluster_name=\"my-cluster\",\n    spark_version=w.clusters.select_spark_version(latest=True),\n    node_type_id=w.clusters.select_node_type(local_disk=True),\n    num_workers=2\n)\ncluster = wait.result()  # Wait for cluster to be running\n\n# Or use create_and_wait for blocking call\ncluster = w.clusters.create_and_wait(\n    cluster_name=\"my-cluster\",\n    spark_version=\"14.3.x-scala2.12\",\n    node_type_id=\"i3.xlarge\",\n    num_workers=2,\n    timeout=timedelta(minutes=30)\n)\n\n# Start\u002Fstop\u002Fdelete\nw.clusters.start(cluster_id=\"...\").result()\nw.clusters.stop(cluster_id=\"...\")\nw.clusters.delete(cluster_id=\"...\")\n",[1233],{"type":43,"tag":110,"props":1234,"children":1235},{"__ignoreMap":230},[1236,1244,1252,1260,1267,1275,1283,1290,1298,1306,1314,1322,1330,1338,1345,1353,1360,1368,1376,1383,1391,1399,1408,1417,1425,1433,1442,1451,1460],{"type":43,"tag":236,"props":1237,"children":1238},{"class":238,"line":239},[1239],{"type":43,"tag":236,"props":1240,"children":1241},{},[1242],{"type":49,"value":1243},"# List all clusters\n",{"type":43,"tag":236,"props":1245,"children":1246},{"class":238,"line":248},[1247],{"type":43,"tag":236,"props":1248,"children":1249},{},[1250],{"type":49,"value":1251},"for cluster in w.clusters.list():\n",{"type":43,"tag":236,"props":1253,"children":1254},{"class":238,"line":258},[1255],{"type":43,"tag":236,"props":1256,"children":1257},{},[1258],{"type":49,"value":1259},"    print(f\"{cluster.cluster_name}: {cluster.state}\")\n",{"type":43,"tag":236,"props":1261,"children":1262},{"class":238,"line":267},[1263],{"type":43,"tag":236,"props":1264,"children":1265},{"emptyLinePlaceholder":252},[1266],{"type":49,"value":255},{"type":43,"tag":236,"props":1268,"children":1269},{"class":238,"line":276},[1270],{"type":43,"tag":236,"props":1271,"children":1272},{},[1273],{"type":49,"value":1274},"# Get cluster details\n",{"type":43,"tag":236,"props":1276,"children":1277},{"class":238,"line":284},[1278],{"type":43,"tag":236,"props":1279,"children":1280},{},[1281],{"type":49,"value":1282},"cluster = w.clusters.get(cluster_id=\"0123-456789-abcdef\")\n",{"type":43,"tag":236,"props":1284,"children":1285},{"class":238,"line":293},[1286],{"type":43,"tag":236,"props":1287,"children":1288},{"emptyLinePlaceholder":252},[1289],{"type":49,"value":255},{"type":43,"tag":236,"props":1291,"children":1292},{"class":238,"line":302},[1293],{"type":43,"tag":236,"props":1294,"children":1295},{},[1296],{"type":49,"value":1297},"# Create a cluster (returns Wait object)\n",{"type":43,"tag":236,"props":1299,"children":1300},{"class":238,"line":310},[1301],{"type":43,"tag":236,"props":1302,"children":1303},{},[1304],{"type":49,"value":1305},"wait = w.clusters.create(\n",{"type":43,"tag":236,"props":1307,"children":1308},{"class":238,"line":319},[1309],{"type":43,"tag":236,"props":1310,"children":1311},{},[1312],{"type":49,"value":1313},"    cluster_name=\"my-cluster\",\n",{"type":43,"tag":236,"props":1315,"children":1316},{"class":238,"line":328},[1317],{"type":43,"tag":236,"props":1318,"children":1319},{},[1320],{"type":49,"value":1321},"    spark_version=w.clusters.select_spark_version(latest=True),\n",{"type":43,"tag":236,"props":1323,"children":1324},{"class":238,"line":461},[1325],{"type":43,"tag":236,"props":1326,"children":1327},{},[1328],{"type":49,"value":1329},"    node_type_id=w.clusters.select_node_type(local_disk=True),\n",{"type":43,"tag":236,"props":1331,"children":1332},{"class":238,"line":469},[1333],{"type":43,"tag":236,"props":1334,"children":1335},{},[1336],{"type":49,"value":1337},"    num_workers=2\n",{"type":43,"tag":236,"props":1339,"children":1340},{"class":238,"line":478},[1341],{"type":43,"tag":236,"props":1342,"children":1343},{},[1344],{"type":49,"value":443},{"type":43,"tag":236,"props":1346,"children":1347},{"class":238,"line":487},[1348],{"type":43,"tag":236,"props":1349,"children":1350},{},[1351],{"type":49,"value":1352},"cluster = wait.result()  # Wait for cluster to be running\n",{"type":43,"tag":236,"props":1354,"children":1355},{"class":238,"line":496},[1356],{"type":43,"tag":236,"props":1357,"children":1358},{"emptyLinePlaceholder":252},[1359],{"type":49,"value":255},{"type":43,"tag":236,"props":1361,"children":1362},{"class":238,"line":1159},[1363],{"type":43,"tag":236,"props":1364,"children":1365},{},[1366],{"type":49,"value":1367},"# Or use create_and_wait for blocking call\n",{"type":43,"tag":236,"props":1369,"children":1370},{"class":238,"line":1168},[1371],{"type":43,"tag":236,"props":1372,"children":1373},{},[1374],{"type":49,"value":1375},"cluster = w.clusters.create_and_wait(\n",{"type":43,"tag":236,"props":1377,"children":1378},{"class":238,"line":1176},[1379],{"type":43,"tag":236,"props":1380,"children":1381},{},[1382],{"type":49,"value":1313},{"type":43,"tag":236,"props":1384,"children":1385},{"class":238,"line":1184},[1386],{"type":43,"tag":236,"props":1387,"children":1388},{},[1389],{"type":49,"value":1390},"    spark_version=\"14.3.x-scala2.12\",\n",{"type":43,"tag":236,"props":1392,"children":1393},{"class":238,"line":1193},[1394],{"type":43,"tag":236,"props":1395,"children":1396},{},[1397],{"type":49,"value":1398},"    node_type_id=\"i3.xlarge\",\n",{"type":43,"tag":236,"props":1400,"children":1402},{"class":238,"line":1401},22,[1403],{"type":43,"tag":236,"props":1404,"children":1405},{},[1406],{"type":49,"value":1407},"    num_workers=2,\n",{"type":43,"tag":236,"props":1409,"children":1411},{"class":238,"line":1410},23,[1412],{"type":43,"tag":236,"props":1413,"children":1414},{},[1415],{"type":49,"value":1416},"    timeout=timedelta(minutes=30)\n",{"type":43,"tag":236,"props":1418,"children":1420},{"class":238,"line":1419},24,[1421],{"type":43,"tag":236,"props":1422,"children":1423},{},[1424],{"type":49,"value":443},{"type":43,"tag":236,"props":1426,"children":1428},{"class":238,"line":1427},25,[1429],{"type":43,"tag":236,"props":1430,"children":1431},{"emptyLinePlaceholder":252},[1432],{"type":49,"value":255},{"type":43,"tag":236,"props":1434,"children":1436},{"class":238,"line":1435},26,[1437],{"type":43,"tag":236,"props":1438,"children":1439},{},[1440],{"type":49,"value":1441},"# Start\u002Fstop\u002Fdelete\n",{"type":43,"tag":236,"props":1443,"children":1445},{"class":238,"line":1444},27,[1446],{"type":43,"tag":236,"props":1447,"children":1448},{},[1449],{"type":49,"value":1450},"w.clusters.start(cluster_id=\"...\").result()\n",{"type":43,"tag":236,"props":1452,"children":1454},{"class":238,"line":1453},28,[1455],{"type":43,"tag":236,"props":1456,"children":1457},{},[1458],{"type":49,"value":1459},"w.clusters.stop(cluster_id=\"...\")\n",{"type":43,"tag":236,"props":1461,"children":1463},{"class":238,"line":1462},29,[1464],{"type":43,"tag":236,"props":1465,"children":1466},{},[1467],{"type":49,"value":1468},"w.clusters.delete(cluster_id=\"...\")\n",{"type":43,"tag":743,"props":1470,"children":1472},{"id":1471},"jobs-api",[1473],{"type":49,"value":1474},"Jobs API",{"type":43,"tag":52,"props":1476,"children":1477},{},[1478,1482,1483],{"type":43,"tag":61,"props":1479,"children":1480},{},[1481],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":1484,"children":1487},{"href":1485,"rel":1486},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fjobs\u002Fjobs.html",[73],[1488],{"type":49,"value":1485},{"type":43,"tag":226,"props":1490,"children":1492},{"className":228,"code":1491,"language":18,"meta":230,"style":230},"from databricks.sdk.service.jobs import Task, NotebookTask\n\n# List jobs\nfor job in w.jobs.list():\n    print(f\"{job.job_id}: {job.settings.name}\")\n\n# Create a job\ncreated = w.jobs.create(\n    name=\"my-job\",\n    tasks=[\n        Task(\n            task_key=\"main\",\n            notebook_task=NotebookTask(notebook_path=\"\u002FUsers\u002Fme\u002Fnotebook\"),\n            existing_cluster_id=\"0123-456789-abcdef\"\n        )\n    ]\n)\n\n# Run a job now\nrun = w.jobs.run_now_and_wait(job_id=created.job_id)\nprint(f\"Run completed: {run.state.result_state}\")\n\n# Get run output\noutput = w.jobs.get_run_output(run_id=run.run_id)\n",[1493],{"type":43,"tag":110,"props":1494,"children":1495},{"__ignoreMap":230},[1496,1504,1511,1519,1527,1535,1542,1550,1558,1566,1574,1582,1590,1598,1606,1614,1622,1629,1636,1644,1652,1660,1667,1675],{"type":43,"tag":236,"props":1497,"children":1498},{"class":238,"line":239},[1499],{"type":43,"tag":236,"props":1500,"children":1501},{},[1502],{"type":49,"value":1503},"from databricks.sdk.service.jobs import Task, NotebookTask\n",{"type":43,"tag":236,"props":1505,"children":1506},{"class":238,"line":248},[1507],{"type":43,"tag":236,"props":1508,"children":1509},{"emptyLinePlaceholder":252},[1510],{"type":49,"value":255},{"type":43,"tag":236,"props":1512,"children":1513},{"class":238,"line":258},[1514],{"type":43,"tag":236,"props":1515,"children":1516},{},[1517],{"type":49,"value":1518},"# List jobs\n",{"type":43,"tag":236,"props":1520,"children":1521},{"class":238,"line":267},[1522],{"type":43,"tag":236,"props":1523,"children":1524},{},[1525],{"type":49,"value":1526},"for job in w.jobs.list():\n",{"type":43,"tag":236,"props":1528,"children":1529},{"class":238,"line":276},[1530],{"type":43,"tag":236,"props":1531,"children":1532},{},[1533],{"type":49,"value":1534},"    print(f\"{job.job_id}: {job.settings.name}\")\n",{"type":43,"tag":236,"props":1536,"children":1537},{"class":238,"line":284},[1538],{"type":43,"tag":236,"props":1539,"children":1540},{"emptyLinePlaceholder":252},[1541],{"type":49,"value":255},{"type":43,"tag":236,"props":1543,"children":1544},{"class":238,"line":293},[1545],{"type":43,"tag":236,"props":1546,"children":1547},{},[1548],{"type":49,"value":1549},"# Create a job\n",{"type":43,"tag":236,"props":1551,"children":1552},{"class":238,"line":302},[1553],{"type":43,"tag":236,"props":1554,"children":1555},{},[1556],{"type":49,"value":1557},"created = w.jobs.create(\n",{"type":43,"tag":236,"props":1559,"children":1560},{"class":238,"line":310},[1561],{"type":43,"tag":236,"props":1562,"children":1563},{},[1564],{"type":49,"value":1565},"    name=\"my-job\",\n",{"type":43,"tag":236,"props":1567,"children":1568},{"class":238,"line":319},[1569],{"type":43,"tag":236,"props":1570,"children":1571},{},[1572],{"type":49,"value":1573},"    tasks=[\n",{"type":43,"tag":236,"props":1575,"children":1576},{"class":238,"line":328},[1577],{"type":43,"tag":236,"props":1578,"children":1579},{},[1580],{"type":49,"value":1581},"        Task(\n",{"type":43,"tag":236,"props":1583,"children":1584},{"class":238,"line":461},[1585],{"type":43,"tag":236,"props":1586,"children":1587},{},[1588],{"type":49,"value":1589},"            task_key=\"main\",\n",{"type":43,"tag":236,"props":1591,"children":1592},{"class":238,"line":469},[1593],{"type":43,"tag":236,"props":1594,"children":1595},{},[1596],{"type":49,"value":1597},"            notebook_task=NotebookTask(notebook_path=\"\u002FUsers\u002Fme\u002Fnotebook\"),\n",{"type":43,"tag":236,"props":1599,"children":1600},{"class":238,"line":478},[1601],{"type":43,"tag":236,"props":1602,"children":1603},{},[1604],{"type":49,"value":1605},"            existing_cluster_id=\"0123-456789-abcdef\"\n",{"type":43,"tag":236,"props":1607,"children":1608},{"class":238,"line":487},[1609],{"type":43,"tag":236,"props":1610,"children":1611},{},[1612],{"type":49,"value":1613},"        )\n",{"type":43,"tag":236,"props":1615,"children":1616},{"class":238,"line":496},[1617],{"type":43,"tag":236,"props":1618,"children":1619},{},[1620],{"type":49,"value":1621},"    ]\n",{"type":43,"tag":236,"props":1623,"children":1624},{"class":238,"line":1159},[1625],{"type":43,"tag":236,"props":1626,"children":1627},{},[1628],{"type":49,"value":443},{"type":43,"tag":236,"props":1630,"children":1631},{"class":238,"line":1168},[1632],{"type":43,"tag":236,"props":1633,"children":1634},{"emptyLinePlaceholder":252},[1635],{"type":49,"value":255},{"type":43,"tag":236,"props":1637,"children":1638},{"class":238,"line":1176},[1639],{"type":43,"tag":236,"props":1640,"children":1641},{},[1642],{"type":49,"value":1643},"# Run a job now\n",{"type":43,"tag":236,"props":1645,"children":1646},{"class":238,"line":1184},[1647],{"type":43,"tag":236,"props":1648,"children":1649},{},[1650],{"type":49,"value":1651},"run = w.jobs.run_now_and_wait(job_id=created.job_id)\n",{"type":43,"tag":236,"props":1653,"children":1654},{"class":238,"line":1193},[1655],{"type":43,"tag":236,"props":1656,"children":1657},{},[1658],{"type":49,"value":1659},"print(f\"Run completed: {run.state.result_state}\")\n",{"type":43,"tag":236,"props":1661,"children":1662},{"class":238,"line":1401},[1663],{"type":43,"tag":236,"props":1664,"children":1665},{"emptyLinePlaceholder":252},[1666],{"type":49,"value":255},{"type":43,"tag":236,"props":1668,"children":1669},{"class":238,"line":1410},[1670],{"type":43,"tag":236,"props":1671,"children":1672},{},[1673],{"type":49,"value":1674},"# Get run output\n",{"type":43,"tag":236,"props":1676,"children":1677},{"class":238,"line":1419},[1678],{"type":43,"tag":236,"props":1679,"children":1680},{},[1681],{"type":49,"value":1682},"output = w.jobs.get_run_output(run_id=run.run_id)\n",{"type":43,"tag":743,"props":1684,"children":1686},{"id":1685},"sql-statement-execution",[1687],{"type":49,"value":1688},"SQL Statement Execution",{"type":43,"tag":52,"props":1690,"children":1691},{},[1692,1696,1697],{"type":43,"tag":61,"props":1693,"children":1694},{},[1695],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":1698,"children":1701},{"href":1699,"rel":1700},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fstatement_execution.html",[73],[1702],{"type":49,"value":1699},{"type":43,"tag":226,"props":1704,"children":1706},{"className":228,"code":1705,"language":18,"meta":230,"style":230},"# Execute SQL query\nresponse = w.statement_execution.execute_statement(\n    warehouse_id=\"abc123\",\n    statement=\"SELECT * FROM catalog.schema.table LIMIT 10\",\n    wait_timeout=\"30s\"\n)\n\n# Check status and get results\nif response.status.state == StatementState.SUCCEEDED:\n    for row in response.result.data_array:\n        print(row)\n\n# For large results, fetch chunks\nchunk = w.statement_execution.get_statement_result_chunk_n(\n    statement_id=response.statement_id,\n    chunk_index=0\n)\n",[1707],{"type":43,"tag":110,"props":1708,"children":1709},{"__ignoreMap":230},[1710,1718,1726,1734,1742,1750,1757,1764,1772,1780,1788,1796,1803,1811,1819,1827,1835],{"type":43,"tag":236,"props":1711,"children":1712},{"class":238,"line":239},[1713],{"type":43,"tag":236,"props":1714,"children":1715},{},[1716],{"type":49,"value":1717},"# Execute SQL query\n",{"type":43,"tag":236,"props":1719,"children":1720},{"class":238,"line":248},[1721],{"type":43,"tag":236,"props":1722,"children":1723},{},[1724],{"type":49,"value":1725},"response = w.statement_execution.execute_statement(\n",{"type":43,"tag":236,"props":1727,"children":1728},{"class":238,"line":258},[1729],{"type":43,"tag":236,"props":1730,"children":1731},{},[1732],{"type":49,"value":1733},"    warehouse_id=\"abc123\",\n",{"type":43,"tag":236,"props":1735,"children":1736},{"class":238,"line":267},[1737],{"type":43,"tag":236,"props":1738,"children":1739},{},[1740],{"type":49,"value":1741},"    statement=\"SELECT * FROM catalog.schema.table LIMIT 10\",\n",{"type":43,"tag":236,"props":1743,"children":1744},{"class":238,"line":276},[1745],{"type":43,"tag":236,"props":1746,"children":1747},{},[1748],{"type":49,"value":1749},"    wait_timeout=\"30s\"\n",{"type":43,"tag":236,"props":1751,"children":1752},{"class":238,"line":284},[1753],{"type":43,"tag":236,"props":1754,"children":1755},{},[1756],{"type":49,"value":443},{"type":43,"tag":236,"props":1758,"children":1759},{"class":238,"line":293},[1760],{"type":43,"tag":236,"props":1761,"children":1762},{"emptyLinePlaceholder":252},[1763],{"type":49,"value":255},{"type":43,"tag":236,"props":1765,"children":1766},{"class":238,"line":302},[1767],{"type":43,"tag":236,"props":1768,"children":1769},{},[1770],{"type":49,"value":1771},"# Check status and get results\n",{"type":43,"tag":236,"props":1773,"children":1774},{"class":238,"line":310},[1775],{"type":43,"tag":236,"props":1776,"children":1777},{},[1778],{"type":49,"value":1779},"if response.status.state == StatementState.SUCCEEDED:\n",{"type":43,"tag":236,"props":1781,"children":1782},{"class":238,"line":319},[1783],{"type":43,"tag":236,"props":1784,"children":1785},{},[1786],{"type":49,"value":1787},"    for row in response.result.data_array:\n",{"type":43,"tag":236,"props":1789,"children":1790},{"class":238,"line":328},[1791],{"type":43,"tag":236,"props":1792,"children":1793},{},[1794],{"type":49,"value":1795},"        print(row)\n",{"type":43,"tag":236,"props":1797,"children":1798},{"class":238,"line":461},[1799],{"type":43,"tag":236,"props":1800,"children":1801},{"emptyLinePlaceholder":252},[1802],{"type":49,"value":255},{"type":43,"tag":236,"props":1804,"children":1805},{"class":238,"line":469},[1806],{"type":43,"tag":236,"props":1807,"children":1808},{},[1809],{"type":49,"value":1810},"# For large results, fetch chunks\n",{"type":43,"tag":236,"props":1812,"children":1813},{"class":238,"line":478},[1814],{"type":43,"tag":236,"props":1815,"children":1816},{},[1817],{"type":49,"value":1818},"chunk = w.statement_execution.get_statement_result_chunk_n(\n",{"type":43,"tag":236,"props":1820,"children":1821},{"class":238,"line":487},[1822],{"type":43,"tag":236,"props":1823,"children":1824},{},[1825],{"type":49,"value":1826},"    statement_id=response.statement_id,\n",{"type":43,"tag":236,"props":1828,"children":1829},{"class":238,"line":496},[1830],{"type":43,"tag":236,"props":1831,"children":1832},{},[1833],{"type":49,"value":1834},"    chunk_index=0\n",{"type":43,"tag":236,"props":1836,"children":1837},{"class":238,"line":1159},[1838],{"type":43,"tag":236,"props":1839,"children":1840},{},[1841],{"type":49,"value":443},{"type":43,"tag":743,"props":1843,"children":1845},{"id":1844},"sql-warehouses",[1846],{"type":49,"value":1847},"SQL Warehouses",{"type":43,"tag":52,"props":1849,"children":1850},{},[1851,1855,1856],{"type":43,"tag":61,"props":1852,"children":1853},{},[1854],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":1857,"children":1860},{"href":1858,"rel":1859},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fsql\u002Fwarehouses.html",[73],[1861],{"type":49,"value":1858},{"type":43,"tag":226,"props":1863,"children":1865},{"className":228,"code":1864,"language":18,"meta":230,"style":230},"# List warehouses\nfor wh in w.warehouses.list():\n    print(f\"{wh.name}: {wh.state}\")\n\n# Get warehouse\nwarehouse = w.warehouses.get(id=\"abc123\")\n\n# Create warehouse\ncreated = w.warehouses.create_and_wait(\n    name=\"my-warehouse\",\n    cluster_size=\"Small\",\n    max_num_clusters=1,\n    auto_stop_mins=15\n)\n\n# Start\u002Fstop\nw.warehouses.start(id=\"abc123\").result()\nw.warehouses.stop(id=\"abc123\").result()\n",[1866],{"type":43,"tag":110,"props":1867,"children":1868},{"__ignoreMap":230},[1869,1877,1885,1893,1900,1908,1916,1923,1931,1939,1947,1955,1963,1971,1978,1985,1993,2001],{"type":43,"tag":236,"props":1870,"children":1871},{"class":238,"line":239},[1872],{"type":43,"tag":236,"props":1873,"children":1874},{},[1875],{"type":49,"value":1876},"# List warehouses\n",{"type":43,"tag":236,"props":1878,"children":1879},{"class":238,"line":248},[1880],{"type":43,"tag":236,"props":1881,"children":1882},{},[1883],{"type":49,"value":1884},"for wh in w.warehouses.list():\n",{"type":43,"tag":236,"props":1886,"children":1887},{"class":238,"line":258},[1888],{"type":43,"tag":236,"props":1889,"children":1890},{},[1891],{"type":49,"value":1892},"    print(f\"{wh.name}: {wh.state}\")\n",{"type":43,"tag":236,"props":1894,"children":1895},{"class":238,"line":267},[1896],{"type":43,"tag":236,"props":1897,"children":1898},{"emptyLinePlaceholder":252},[1899],{"type":49,"value":255},{"type":43,"tag":236,"props":1901,"children":1902},{"class":238,"line":276},[1903],{"type":43,"tag":236,"props":1904,"children":1905},{},[1906],{"type":49,"value":1907},"# Get warehouse\n",{"type":43,"tag":236,"props":1909,"children":1910},{"class":238,"line":284},[1911],{"type":43,"tag":236,"props":1912,"children":1913},{},[1914],{"type":49,"value":1915},"warehouse = w.warehouses.get(id=\"abc123\")\n",{"type":43,"tag":236,"props":1917,"children":1918},{"class":238,"line":293},[1919],{"type":43,"tag":236,"props":1920,"children":1921},{"emptyLinePlaceholder":252},[1922],{"type":49,"value":255},{"type":43,"tag":236,"props":1924,"children":1925},{"class":238,"line":302},[1926],{"type":43,"tag":236,"props":1927,"children":1928},{},[1929],{"type":49,"value":1930},"# Create warehouse\n",{"type":43,"tag":236,"props":1932,"children":1933},{"class":238,"line":310},[1934],{"type":43,"tag":236,"props":1935,"children":1936},{},[1937],{"type":49,"value":1938},"created = w.warehouses.create_and_wait(\n",{"type":43,"tag":236,"props":1940,"children":1941},{"class":238,"line":319},[1942],{"type":43,"tag":236,"props":1943,"children":1944},{},[1945],{"type":49,"value":1946},"    name=\"my-warehouse\",\n",{"type":43,"tag":236,"props":1948,"children":1949},{"class":238,"line":328},[1950],{"type":43,"tag":236,"props":1951,"children":1952},{},[1953],{"type":49,"value":1954},"    cluster_size=\"Small\",\n",{"type":43,"tag":236,"props":1956,"children":1957},{"class":238,"line":461},[1958],{"type":43,"tag":236,"props":1959,"children":1960},{},[1961],{"type":49,"value":1962},"    max_num_clusters=1,\n",{"type":43,"tag":236,"props":1964,"children":1965},{"class":238,"line":469},[1966],{"type":43,"tag":236,"props":1967,"children":1968},{},[1969],{"type":49,"value":1970},"    auto_stop_mins=15\n",{"type":43,"tag":236,"props":1972,"children":1973},{"class":238,"line":478},[1974],{"type":43,"tag":236,"props":1975,"children":1976},{},[1977],{"type":49,"value":443},{"type":43,"tag":236,"props":1979,"children":1980},{"class":238,"line":487},[1981],{"type":43,"tag":236,"props":1982,"children":1983},{"emptyLinePlaceholder":252},[1984],{"type":49,"value":255},{"type":43,"tag":236,"props":1986,"children":1987},{"class":238,"line":496},[1988],{"type":43,"tag":236,"props":1989,"children":1990},{},[1991],{"type":49,"value":1992},"# Start\u002Fstop\n",{"type":43,"tag":236,"props":1994,"children":1995},{"class":238,"line":1159},[1996],{"type":43,"tag":236,"props":1997,"children":1998},{},[1999],{"type":49,"value":2000},"w.warehouses.start(id=\"abc123\").result()\n",{"type":43,"tag":236,"props":2002,"children":2003},{"class":238,"line":1168},[2004],{"type":43,"tag":236,"props":2005,"children":2006},{},[2007],{"type":49,"value":2008},"w.warehouses.stop(id=\"abc123\").result()\n",{"type":43,"tag":743,"props":2010,"children":2012},{"id":2011},"unity-catalog-tables",[2013],{"type":49,"value":2014},"Unity Catalog - Tables",{"type":43,"tag":52,"props":2016,"children":2017},{},[2018,2022,2023],{"type":43,"tag":61,"props":2019,"children":2020},{},[2021],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":2024,"children":2027},{"href":2025,"rel":2026},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Ftables.html",[73],[2028],{"type":49,"value":2025},{"type":43,"tag":226,"props":2030,"children":2032},{"className":228,"code":2031,"language":18,"meta":230,"style":230},"# List tables in a schema\nfor table in w.tables.list(catalog_name=\"main\", schema_name=\"default\"):\n    print(f\"{table.full_name}: {table.table_type}\")\n\n# Get table info\ntable = w.tables.get(full_name=\"main.default.my_table\")\nprint(f\"Columns: {[c.name for c in table.columns]}\")\n\n# Check if table exists\nexists = w.tables.exists(full_name=\"main.default.my_table\")\n",[2033],{"type":43,"tag":110,"props":2034,"children":2035},{"__ignoreMap":230},[2036,2044,2052,2060,2067,2075,2083,2091,2098,2106],{"type":43,"tag":236,"props":2037,"children":2038},{"class":238,"line":239},[2039],{"type":43,"tag":236,"props":2040,"children":2041},{},[2042],{"type":49,"value":2043},"# List tables in a schema\n",{"type":43,"tag":236,"props":2045,"children":2046},{"class":238,"line":248},[2047],{"type":43,"tag":236,"props":2048,"children":2049},{},[2050],{"type":49,"value":2051},"for table in w.tables.list(catalog_name=\"main\", schema_name=\"default\"):\n",{"type":43,"tag":236,"props":2053,"children":2054},{"class":238,"line":258},[2055],{"type":43,"tag":236,"props":2056,"children":2057},{},[2058],{"type":49,"value":2059},"    print(f\"{table.full_name}: {table.table_type}\")\n",{"type":43,"tag":236,"props":2061,"children":2062},{"class":238,"line":267},[2063],{"type":43,"tag":236,"props":2064,"children":2065},{"emptyLinePlaceholder":252},[2066],{"type":49,"value":255},{"type":43,"tag":236,"props":2068,"children":2069},{"class":238,"line":276},[2070],{"type":43,"tag":236,"props":2071,"children":2072},{},[2073],{"type":49,"value":2074},"# Get table info\n",{"type":43,"tag":236,"props":2076,"children":2077},{"class":238,"line":284},[2078],{"type":43,"tag":236,"props":2079,"children":2080},{},[2081],{"type":49,"value":2082},"table = w.tables.get(full_name=\"main.default.my_table\")\n",{"type":43,"tag":236,"props":2084,"children":2085},{"class":238,"line":293},[2086],{"type":43,"tag":236,"props":2087,"children":2088},{},[2089],{"type":49,"value":2090},"print(f\"Columns: {[c.name for c in table.columns]}\")\n",{"type":43,"tag":236,"props":2092,"children":2093},{"class":238,"line":302},[2094],{"type":43,"tag":236,"props":2095,"children":2096},{"emptyLinePlaceholder":252},[2097],{"type":49,"value":255},{"type":43,"tag":236,"props":2099,"children":2100},{"class":238,"line":310},[2101],{"type":43,"tag":236,"props":2102,"children":2103},{},[2104],{"type":49,"value":2105},"# Check if table exists\n",{"type":43,"tag":236,"props":2107,"children":2108},{"class":238,"line":319},[2109],{"type":43,"tag":236,"props":2110,"children":2111},{},[2112],{"type":49,"value":2113},"exists = w.tables.exists(full_name=\"main.default.my_table\")\n",{"type":43,"tag":743,"props":2115,"children":2117},{"id":2116},"unity-catalog-catalogs-schemas",[2118],{"type":49,"value":2119},"Unity Catalog - Catalogs & Schemas",{"type":43,"tag":52,"props":2121,"children":2122},{},[2123,2128,2129,2135,2140,2141],{"type":43,"tag":61,"props":2124,"children":2125},{},[2126],{"type":49,"value":2127},"Doc (Catalogs):",{"type":49,"value":67},{"type":43,"tag":69,"props":2130,"children":2133},{"href":2131,"rel":2132},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fcatalogs.html",[73],[2134],{"type":49,"value":2131},{"type":43,"tag":61,"props":2136,"children":2137},{},[2138],{"type":49,"value":2139},"Doc (Schemas):",{"type":49,"value":67},{"type":43,"tag":69,"props":2142,"children":2145},{"href":2143,"rel":2144},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fschemas.html",[73],[2146],{"type":49,"value":2143},{"type":43,"tag":226,"props":2148,"children":2150},{"className":228,"code":2149,"language":18,"meta":230,"style":230},"# List catalogs\nfor catalog in w.catalogs.list():\n    print(catalog.name)\n\n# Create catalog\nw.catalogs.create(name=\"my_catalog\", comment=\"Description\")\n\n# List schemas\nfor schema in w.schemas.list(catalog_name=\"main\"):\n    print(schema.name)\n\n# Create schema\nw.schemas.create(name=\"my_schema\", catalog_name=\"main\")\n",[2151],{"type":43,"tag":110,"props":2152,"children":2153},{"__ignoreMap":230},[2154,2162,2170,2178,2185,2193,2201,2208,2216,2224,2232,2239,2247],{"type":43,"tag":236,"props":2155,"children":2156},{"class":238,"line":239},[2157],{"type":43,"tag":236,"props":2158,"children":2159},{},[2160],{"type":49,"value":2161},"# List catalogs\n",{"type":43,"tag":236,"props":2163,"children":2164},{"class":238,"line":248},[2165],{"type":43,"tag":236,"props":2166,"children":2167},{},[2168],{"type":49,"value":2169},"for catalog in w.catalogs.list():\n",{"type":43,"tag":236,"props":2171,"children":2172},{"class":238,"line":258},[2173],{"type":43,"tag":236,"props":2174,"children":2175},{},[2176],{"type":49,"value":2177},"    print(catalog.name)\n",{"type":43,"tag":236,"props":2179,"children":2180},{"class":238,"line":267},[2181],{"type":43,"tag":236,"props":2182,"children":2183},{"emptyLinePlaceholder":252},[2184],{"type":49,"value":255},{"type":43,"tag":236,"props":2186,"children":2187},{"class":238,"line":276},[2188],{"type":43,"tag":236,"props":2189,"children":2190},{},[2191],{"type":49,"value":2192},"# Create catalog\n",{"type":43,"tag":236,"props":2194,"children":2195},{"class":238,"line":284},[2196],{"type":43,"tag":236,"props":2197,"children":2198},{},[2199],{"type":49,"value":2200},"w.catalogs.create(name=\"my_catalog\", comment=\"Description\")\n",{"type":43,"tag":236,"props":2202,"children":2203},{"class":238,"line":293},[2204],{"type":43,"tag":236,"props":2205,"children":2206},{"emptyLinePlaceholder":252},[2207],{"type":49,"value":255},{"type":43,"tag":236,"props":2209,"children":2210},{"class":238,"line":302},[2211],{"type":43,"tag":236,"props":2212,"children":2213},{},[2214],{"type":49,"value":2215},"# List schemas\n",{"type":43,"tag":236,"props":2217,"children":2218},{"class":238,"line":310},[2219],{"type":43,"tag":236,"props":2220,"children":2221},{},[2222],{"type":49,"value":2223},"for schema in w.schemas.list(catalog_name=\"main\"):\n",{"type":43,"tag":236,"props":2225,"children":2226},{"class":238,"line":319},[2227],{"type":43,"tag":236,"props":2228,"children":2229},{},[2230],{"type":49,"value":2231},"    print(schema.name)\n",{"type":43,"tag":236,"props":2233,"children":2234},{"class":238,"line":328},[2235],{"type":43,"tag":236,"props":2236,"children":2237},{"emptyLinePlaceholder":252},[2238],{"type":49,"value":255},{"type":43,"tag":236,"props":2240,"children":2241},{"class":238,"line":461},[2242],{"type":43,"tag":236,"props":2243,"children":2244},{},[2245],{"type":49,"value":2246},"# Create schema\n",{"type":43,"tag":236,"props":2248,"children":2249},{"class":238,"line":469},[2250],{"type":43,"tag":236,"props":2251,"children":2252},{},[2253],{"type":49,"value":2254},"w.schemas.create(name=\"my_schema\", catalog_name=\"main\")\n",{"type":43,"tag":743,"props":2256,"children":2258},{"id":2257},"volumes",[2259],{"type":49,"value":2260},"Volumes",{"type":43,"tag":52,"props":2262,"children":2263},{},[2264,2268,2269],{"type":43,"tag":61,"props":2265,"children":2266},{},[2267],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":2270,"children":2273},{"href":2271,"rel":2272},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fcatalog\u002Fvolumes.html",[73],[2274],{"type":49,"value":2271},{"type":43,"tag":226,"props":2276,"children":2278},{"className":228,"code":2277,"language":18,"meta":230,"style":230},"from databricks.sdk.service.catalog import VolumeType\n\n# List volumes\nfor vol in w.volumes.list(catalog_name=\"main\", schema_name=\"default\"):\n    print(f\"{vol.full_name}: {vol.volume_type}\")\n\n# Create managed volume\nw.volumes.create(\n    catalog_name=\"main\",\n    schema_name=\"default\",\n    name=\"my_volume\",\n    volume_type=VolumeType.MANAGED\n)\n\n# Read volume info\nvol = w.volumes.read(name=\"main.default.my_volume\")\n",[2279],{"type":43,"tag":110,"props":2280,"children":2281},{"__ignoreMap":230},[2282,2290,2297,2305,2313,2321,2328,2336,2344,2352,2360,2368,2376,2383,2390,2398],{"type":43,"tag":236,"props":2283,"children":2284},{"class":238,"line":239},[2285],{"type":43,"tag":236,"props":2286,"children":2287},{},[2288],{"type":49,"value":2289},"from databricks.sdk.service.catalog import VolumeType\n",{"type":43,"tag":236,"props":2291,"children":2292},{"class":238,"line":248},[2293],{"type":43,"tag":236,"props":2294,"children":2295},{"emptyLinePlaceholder":252},[2296],{"type":49,"value":255},{"type":43,"tag":236,"props":2298,"children":2299},{"class":238,"line":258},[2300],{"type":43,"tag":236,"props":2301,"children":2302},{},[2303],{"type":49,"value":2304},"# List volumes\n",{"type":43,"tag":236,"props":2306,"children":2307},{"class":238,"line":267},[2308],{"type":43,"tag":236,"props":2309,"children":2310},{},[2311],{"type":49,"value":2312},"for vol in w.volumes.list(catalog_name=\"main\", schema_name=\"default\"):\n",{"type":43,"tag":236,"props":2314,"children":2315},{"class":238,"line":276},[2316],{"type":43,"tag":236,"props":2317,"children":2318},{},[2319],{"type":49,"value":2320},"    print(f\"{vol.full_name}: {vol.volume_type}\")\n",{"type":43,"tag":236,"props":2322,"children":2323},{"class":238,"line":284},[2324],{"type":43,"tag":236,"props":2325,"children":2326},{"emptyLinePlaceholder":252},[2327],{"type":49,"value":255},{"type":43,"tag":236,"props":2329,"children":2330},{"class":238,"line":293},[2331],{"type":43,"tag":236,"props":2332,"children":2333},{},[2334],{"type":49,"value":2335},"# Create managed volume\n",{"type":43,"tag":236,"props":2337,"children":2338},{"class":238,"line":302},[2339],{"type":43,"tag":236,"props":2340,"children":2341},{},[2342],{"type":49,"value":2343},"w.volumes.create(\n",{"type":43,"tag":236,"props":2345,"children":2346},{"class":238,"line":310},[2347],{"type":43,"tag":236,"props":2348,"children":2349},{},[2350],{"type":49,"value":2351},"    catalog_name=\"main\",\n",{"type":43,"tag":236,"props":2353,"children":2354},{"class":238,"line":319},[2355],{"type":43,"tag":236,"props":2356,"children":2357},{},[2358],{"type":49,"value":2359},"    schema_name=\"default\",\n",{"type":43,"tag":236,"props":2361,"children":2362},{"class":238,"line":328},[2363],{"type":43,"tag":236,"props":2364,"children":2365},{},[2366],{"type":49,"value":2367},"    name=\"my_volume\",\n",{"type":43,"tag":236,"props":2369,"children":2370},{"class":238,"line":461},[2371],{"type":43,"tag":236,"props":2372,"children":2373},{},[2374],{"type":49,"value":2375},"    volume_type=VolumeType.MANAGED\n",{"type":43,"tag":236,"props":2377,"children":2378},{"class":238,"line":469},[2379],{"type":43,"tag":236,"props":2380,"children":2381},{},[2382],{"type":49,"value":443},{"type":43,"tag":236,"props":2384,"children":2385},{"class":238,"line":478},[2386],{"type":43,"tag":236,"props":2387,"children":2388},{"emptyLinePlaceholder":252},[2389],{"type":49,"value":255},{"type":43,"tag":236,"props":2391,"children":2392},{"class":238,"line":487},[2393],{"type":43,"tag":236,"props":2394,"children":2395},{},[2396],{"type":49,"value":2397},"# Read volume info\n",{"type":43,"tag":236,"props":2399,"children":2400},{"class":238,"line":496},[2401],{"type":43,"tag":236,"props":2402,"children":2403},{},[2404],{"type":49,"value":2405},"vol = w.volumes.read(name=\"main.default.my_volume\")\n",{"type":43,"tag":743,"props":2407,"children":2409},{"id":2408},"files-api",[2410],{"type":49,"value":2411},"Files API",{"type":43,"tag":52,"props":2413,"children":2414},{},[2415,2419,2420],{"type":43,"tag":61,"props":2416,"children":2417},{},[2418],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":2421,"children":2424},{"href":2422,"rel":2423},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Ffiles\u002Ffiles.html",[73],[2425],{"type":49,"value":2422},{"type":43,"tag":226,"props":2427,"children":2429},{"className":228,"code":2428,"language":18,"meta":230,"style":230},"# Upload file to volume\nw.files.upload(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\",\n    contents=open(\"local_file.csv\", \"rb\")\n)\n\n# Download file\nwith w.files.download(file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\") as f:\n    content = f.read()\n\n# List directory contents\nfor entry in w.files.list_directory_contents(\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002F\"):\n    print(f\"{entry.name}: {entry.is_directory}\")\n\n# Upload\u002Fdownload with progress (parallel)\nw.files.upload_from(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Flarge.parquet\",\n    source_path=\"\u002Flocal\u002Fpath\u002Flarge.parquet\",\n    use_parallel=True\n)\n\nw.files.download_to(\n    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Flarge.parquet\",\n    destination=\"\u002Flocal\u002Foutput\u002F\",\n    use_parallel=True\n)\n",[2430],{"type":43,"tag":110,"props":2431,"children":2432},{"__ignoreMap":230},[2433,2441,2449,2457,2465,2472,2479,2487,2495,2503,2510,2518,2526,2534,2541,2549,2557,2565,2573,2581,2588,2595,2603,2610,2618,2625],{"type":43,"tag":236,"props":2434,"children":2435},{"class":238,"line":239},[2436],{"type":43,"tag":236,"props":2437,"children":2438},{},[2439],{"type":49,"value":2440},"# Upload file to volume\n",{"type":43,"tag":236,"props":2442,"children":2443},{"class":238,"line":248},[2444],{"type":43,"tag":236,"props":2445,"children":2446},{},[2447],{"type":49,"value":2448},"w.files.upload(\n",{"type":43,"tag":236,"props":2450,"children":2451},{"class":238,"line":258},[2452],{"type":43,"tag":236,"props":2453,"children":2454},{},[2455],{"type":49,"value":2456},"    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\",\n",{"type":43,"tag":236,"props":2458,"children":2459},{"class":238,"line":267},[2460],{"type":43,"tag":236,"props":2461,"children":2462},{},[2463],{"type":49,"value":2464},"    contents=open(\"local_file.csv\", \"rb\")\n",{"type":43,"tag":236,"props":2466,"children":2467},{"class":238,"line":276},[2468],{"type":43,"tag":236,"props":2469,"children":2470},{},[2471],{"type":49,"value":443},{"type":43,"tag":236,"props":2473,"children":2474},{"class":238,"line":284},[2475],{"type":43,"tag":236,"props":2476,"children":2477},{"emptyLinePlaceholder":252},[2478],{"type":49,"value":255},{"type":43,"tag":236,"props":2480,"children":2481},{"class":238,"line":293},[2482],{"type":43,"tag":236,"props":2483,"children":2484},{},[2485],{"type":49,"value":2486},"# Download file\n",{"type":43,"tag":236,"props":2488,"children":2489},{"class":238,"line":302},[2490],{"type":43,"tag":236,"props":2491,"children":2492},{},[2493],{"type":49,"value":2494},"with w.files.download(file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Fdata.csv\") as f:\n",{"type":43,"tag":236,"props":2496,"children":2497},{"class":238,"line":310},[2498],{"type":43,"tag":236,"props":2499,"children":2500},{},[2501],{"type":49,"value":2502},"    content = f.read()\n",{"type":43,"tag":236,"props":2504,"children":2505},{"class":238,"line":319},[2506],{"type":43,"tag":236,"props":2507,"children":2508},{"emptyLinePlaceholder":252},[2509],{"type":49,"value":255},{"type":43,"tag":236,"props":2511,"children":2512},{"class":238,"line":328},[2513],{"type":43,"tag":236,"props":2514,"children":2515},{},[2516],{"type":49,"value":2517},"# List directory contents\n",{"type":43,"tag":236,"props":2519,"children":2520},{"class":238,"line":461},[2521],{"type":43,"tag":236,"props":2522,"children":2523},{},[2524],{"type":49,"value":2525},"for entry in w.files.list_directory_contents(\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002F\"):\n",{"type":43,"tag":236,"props":2527,"children":2528},{"class":238,"line":469},[2529],{"type":43,"tag":236,"props":2530,"children":2531},{},[2532],{"type":49,"value":2533},"    print(f\"{entry.name}: {entry.is_directory}\")\n",{"type":43,"tag":236,"props":2535,"children":2536},{"class":238,"line":478},[2537],{"type":43,"tag":236,"props":2538,"children":2539},{"emptyLinePlaceholder":252},[2540],{"type":49,"value":255},{"type":43,"tag":236,"props":2542,"children":2543},{"class":238,"line":487},[2544],{"type":43,"tag":236,"props":2545,"children":2546},{},[2547],{"type":49,"value":2548},"# Upload\u002Fdownload with progress (parallel)\n",{"type":43,"tag":236,"props":2550,"children":2551},{"class":238,"line":496},[2552],{"type":43,"tag":236,"props":2553,"children":2554},{},[2555],{"type":49,"value":2556},"w.files.upload_from(\n",{"type":43,"tag":236,"props":2558,"children":2559},{"class":238,"line":1159},[2560],{"type":43,"tag":236,"props":2561,"children":2562},{},[2563],{"type":49,"value":2564},"    file_path=\"\u002FVolumes\u002Fmain\u002Fdefault\u002Fmy_volume\u002Flarge.parquet\",\n",{"type":43,"tag":236,"props":2566,"children":2567},{"class":238,"line":1168},[2568],{"type":43,"tag":236,"props":2569,"children":2570},{},[2571],{"type":49,"value":2572},"    source_path=\"\u002Flocal\u002Fpath\u002Flarge.parquet\",\n",{"type":43,"tag":236,"props":2574,"children":2575},{"class":238,"line":1176},[2576],{"type":43,"tag":236,"props":2577,"children":2578},{},[2579],{"type":49,"value":2580},"    use_parallel=True\n",{"type":43,"tag":236,"props":2582,"children":2583},{"class":238,"line":1184},[2584],{"type":43,"tag":236,"props":2585,"children":2586},{},[2587],{"type":49,"value":443},{"type":43,"tag":236,"props":2589,"children":2590},{"class":238,"line":1193},[2591],{"type":43,"tag":236,"props":2592,"children":2593},{"emptyLinePlaceholder":252},[2594],{"type":49,"value":255},{"type":43,"tag":236,"props":2596,"children":2597},{"class":238,"line":1401},[2598],{"type":43,"tag":236,"props":2599,"children":2600},{},[2601],{"type":49,"value":2602},"w.files.download_to(\n",{"type":43,"tag":236,"props":2604,"children":2605},{"class":238,"line":1410},[2606],{"type":43,"tag":236,"props":2607,"children":2608},{},[2609],{"type":49,"value":2564},{"type":43,"tag":236,"props":2611,"children":2612},{"class":238,"line":1419},[2613],{"type":43,"tag":236,"props":2614,"children":2615},{},[2616],{"type":49,"value":2617},"    destination=\"\u002Flocal\u002Foutput\u002F\",\n",{"type":43,"tag":236,"props":2619,"children":2620},{"class":238,"line":1427},[2621],{"type":43,"tag":236,"props":2622,"children":2623},{},[2624],{"type":49,"value":2580},{"type":43,"tag":236,"props":2626,"children":2627},{"class":238,"line":1435},[2628],{"type":43,"tag":236,"props":2629,"children":2630},{},[2631],{"type":49,"value":443},{"type":43,"tag":743,"props":2633,"children":2635},{"id":2634},"serving-endpoints-model-serving",[2636],{"type":49,"value":2637},"Serving Endpoints (Model Serving)",{"type":43,"tag":52,"props":2639,"children":2640},{},[2641,2645,2646],{"type":43,"tag":61,"props":2642,"children":2643},{},[2644],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":2647,"children":2650},{"href":2648,"rel":2649},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fserving\u002Fserving_endpoints.html",[73],[2651],{"type":49,"value":2648},{"type":43,"tag":226,"props":2653,"children":2655},{"className":228,"code":2654,"language":18,"meta":230,"style":230},"# List endpoints\nfor ep in w.serving_endpoints.list():\n    print(f\"{ep.name}: {ep.state}\")\n\n# Get endpoint\nendpoint = w.serving_endpoints.get(name=\"my-endpoint\")\n\n# Query endpoint\nresponse = w.serving_endpoints.query(\n    name=\"my-endpoint\",\n    inputs={\"prompt\": \"Hello, world!\"}\n)\n\n# For chat\u002Fcompletions endpoints\nresponse = w.serving_endpoints.query(\n    name=\"my-chat-endpoint\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n\n# Get OpenAI-compatible client\nopenai_client = w.serving_endpoints.get_open_ai_client()\n",[2656],{"type":43,"tag":110,"props":2657,"children":2658},{"__ignoreMap":230},[2659,2667,2675,2683,2690,2698,2706,2713,2721,2729,2737,2745,2752,2759,2767,2774,2782,2790,2797,2804,2812],{"type":43,"tag":236,"props":2660,"children":2661},{"class":238,"line":239},[2662],{"type":43,"tag":236,"props":2663,"children":2664},{},[2665],{"type":49,"value":2666},"# List endpoints\n",{"type":43,"tag":236,"props":2668,"children":2669},{"class":238,"line":248},[2670],{"type":43,"tag":236,"props":2671,"children":2672},{},[2673],{"type":49,"value":2674},"for ep in w.serving_endpoints.list():\n",{"type":43,"tag":236,"props":2676,"children":2677},{"class":238,"line":258},[2678],{"type":43,"tag":236,"props":2679,"children":2680},{},[2681],{"type":49,"value":2682},"    print(f\"{ep.name}: {ep.state}\")\n",{"type":43,"tag":236,"props":2684,"children":2685},{"class":238,"line":267},[2686],{"type":43,"tag":236,"props":2687,"children":2688},{"emptyLinePlaceholder":252},[2689],{"type":49,"value":255},{"type":43,"tag":236,"props":2691,"children":2692},{"class":238,"line":276},[2693],{"type":43,"tag":236,"props":2694,"children":2695},{},[2696],{"type":49,"value":2697},"# Get endpoint\n",{"type":43,"tag":236,"props":2699,"children":2700},{"class":238,"line":284},[2701],{"type":43,"tag":236,"props":2702,"children":2703},{},[2704],{"type":49,"value":2705},"endpoint = w.serving_endpoints.get(name=\"my-endpoint\")\n",{"type":43,"tag":236,"props":2707,"children":2708},{"class":238,"line":293},[2709],{"type":43,"tag":236,"props":2710,"children":2711},{"emptyLinePlaceholder":252},[2712],{"type":49,"value":255},{"type":43,"tag":236,"props":2714,"children":2715},{"class":238,"line":302},[2716],{"type":43,"tag":236,"props":2717,"children":2718},{},[2719],{"type":49,"value":2720},"# Query endpoint\n",{"type":43,"tag":236,"props":2722,"children":2723},{"class":238,"line":310},[2724],{"type":43,"tag":236,"props":2725,"children":2726},{},[2727],{"type":49,"value":2728},"response = w.serving_endpoints.query(\n",{"type":43,"tag":236,"props":2730,"children":2731},{"class":238,"line":319},[2732],{"type":43,"tag":236,"props":2733,"children":2734},{},[2735],{"type":49,"value":2736},"    name=\"my-endpoint\",\n",{"type":43,"tag":236,"props":2738,"children":2739},{"class":238,"line":328},[2740],{"type":43,"tag":236,"props":2741,"children":2742},{},[2743],{"type":49,"value":2744},"    inputs={\"prompt\": \"Hello, world!\"}\n",{"type":43,"tag":236,"props":2746,"children":2747},{"class":238,"line":461},[2748],{"type":43,"tag":236,"props":2749,"children":2750},{},[2751],{"type":49,"value":443},{"type":43,"tag":236,"props":2753,"children":2754},{"class":238,"line":469},[2755],{"type":43,"tag":236,"props":2756,"children":2757},{"emptyLinePlaceholder":252},[2758],{"type":49,"value":255},{"type":43,"tag":236,"props":2760,"children":2761},{"class":238,"line":478},[2762],{"type":43,"tag":236,"props":2763,"children":2764},{},[2765],{"type":49,"value":2766},"# For chat\u002Fcompletions endpoints\n",{"type":43,"tag":236,"props":2768,"children":2769},{"class":238,"line":487},[2770],{"type":43,"tag":236,"props":2771,"children":2772},{},[2773],{"type":49,"value":2728},{"type":43,"tag":236,"props":2775,"children":2776},{"class":238,"line":496},[2777],{"type":43,"tag":236,"props":2778,"children":2779},{},[2780],{"type":49,"value":2781},"    name=\"my-chat-endpoint\",\n",{"type":43,"tag":236,"props":2783,"children":2784},{"class":238,"line":1159},[2785],{"type":43,"tag":236,"props":2786,"children":2787},{},[2788],{"type":49,"value":2789},"    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n",{"type":43,"tag":236,"props":2791,"children":2792},{"class":238,"line":1168},[2793],{"type":43,"tag":236,"props":2794,"children":2795},{},[2796],{"type":49,"value":443},{"type":43,"tag":236,"props":2798,"children":2799},{"class":238,"line":1176},[2800],{"type":43,"tag":236,"props":2801,"children":2802},{"emptyLinePlaceholder":252},[2803],{"type":49,"value":255},{"type":43,"tag":236,"props":2805,"children":2806},{"class":238,"line":1184},[2807],{"type":43,"tag":236,"props":2808,"children":2809},{},[2810],{"type":49,"value":2811},"# Get OpenAI-compatible client\n",{"type":43,"tag":236,"props":2813,"children":2814},{"class":238,"line":1193},[2815],{"type":43,"tag":236,"props":2816,"children":2817},{},[2818],{"type":49,"value":2819},"openai_client = w.serving_endpoints.get_open_ai_client()\n",{"type":43,"tag":743,"props":2821,"children":2823},{"id":2822},"vector-search",[2824],{"type":49,"value":2825},"Vector Search",{"type":43,"tag":52,"props":2827,"children":2828},{},[2829,2834,2835,2841,2846,2847],{"type":43,"tag":61,"props":2830,"children":2831},{},[2832],{"type":49,"value":2833},"Doc (Indexes):",{"type":49,"value":67},{"type":43,"tag":69,"props":2836,"children":2839},{"href":2837,"rel":2838},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fvectorsearch\u002Fvector_search_indexes.html",[73],[2840],{"type":49,"value":2837},{"type":43,"tag":61,"props":2842,"children":2843},{},[2844],{"type":49,"value":2845},"Doc (Endpoints):",{"type":49,"value":67},{"type":43,"tag":69,"props":2848,"children":2851},{"href":2849,"rel":2850},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fvectorsearch\u002Fvector_search_endpoints.html",[73],[2852],{"type":49,"value":2849},{"type":43,"tag":226,"props":2854,"children":2856},{"className":228,"code":2855,"language":18,"meta":230,"style":230},"# List vector search indexes\nfor idx in w.vector_search_indexes.list_indexes(endpoint_name=\"my-vs-endpoint\"):\n    print(idx.name)\n\n# Query index\nresults = w.vector_search_indexes.query_index(\n    index_name=\"main.default.my_index\",\n    columns=[\"id\", \"text\", \"embedding\"],\n    query_text=\"search query\",\n    num_results=10\n)\nfor doc in results.result.data_array:\n    print(doc)\n",[2857],{"type":43,"tag":110,"props":2858,"children":2859},{"__ignoreMap":230},[2860,2868,2876,2884,2891,2899,2907,2915,2923,2931,2939,2946,2954],{"type":43,"tag":236,"props":2861,"children":2862},{"class":238,"line":239},[2863],{"type":43,"tag":236,"props":2864,"children":2865},{},[2866],{"type":49,"value":2867},"# List vector search indexes\n",{"type":43,"tag":236,"props":2869,"children":2870},{"class":238,"line":248},[2871],{"type":43,"tag":236,"props":2872,"children":2873},{},[2874],{"type":49,"value":2875},"for idx in w.vector_search_indexes.list_indexes(endpoint_name=\"my-vs-endpoint\"):\n",{"type":43,"tag":236,"props":2877,"children":2878},{"class":238,"line":258},[2879],{"type":43,"tag":236,"props":2880,"children":2881},{},[2882],{"type":49,"value":2883},"    print(idx.name)\n",{"type":43,"tag":236,"props":2885,"children":2886},{"class":238,"line":267},[2887],{"type":43,"tag":236,"props":2888,"children":2889},{"emptyLinePlaceholder":252},[2890],{"type":49,"value":255},{"type":43,"tag":236,"props":2892,"children":2893},{"class":238,"line":276},[2894],{"type":43,"tag":236,"props":2895,"children":2896},{},[2897],{"type":49,"value":2898},"# Query index\n",{"type":43,"tag":236,"props":2900,"children":2901},{"class":238,"line":284},[2902],{"type":43,"tag":236,"props":2903,"children":2904},{},[2905],{"type":49,"value":2906},"results = w.vector_search_indexes.query_index(\n",{"type":43,"tag":236,"props":2908,"children":2909},{"class":238,"line":293},[2910],{"type":43,"tag":236,"props":2911,"children":2912},{},[2913],{"type":49,"value":2914},"    index_name=\"main.default.my_index\",\n",{"type":43,"tag":236,"props":2916,"children":2917},{"class":238,"line":302},[2918],{"type":43,"tag":236,"props":2919,"children":2920},{},[2921],{"type":49,"value":2922},"    columns=[\"id\", \"text\", \"embedding\"],\n",{"type":43,"tag":236,"props":2924,"children":2925},{"class":238,"line":310},[2926],{"type":43,"tag":236,"props":2927,"children":2928},{},[2929],{"type":49,"value":2930},"    query_text=\"search query\",\n",{"type":43,"tag":236,"props":2932,"children":2933},{"class":238,"line":319},[2934],{"type":43,"tag":236,"props":2935,"children":2936},{},[2937],{"type":49,"value":2938},"    num_results=10\n",{"type":43,"tag":236,"props":2940,"children":2941},{"class":238,"line":328},[2942],{"type":43,"tag":236,"props":2943,"children":2944},{},[2945],{"type":49,"value":443},{"type":43,"tag":236,"props":2947,"children":2948},{"class":238,"line":461},[2949],{"type":43,"tag":236,"props":2950,"children":2951},{},[2952],{"type":49,"value":2953},"for doc in results.result.data_array:\n",{"type":43,"tag":236,"props":2955,"children":2956},{"class":238,"line":469},[2957],{"type":43,"tag":236,"props":2958,"children":2959},{},[2960],{"type":49,"value":2961},"    print(doc)\n",{"type":43,"tag":743,"props":2963,"children":2965},{"id":2964},"pipelines-delta-live-tables",[2966],{"type":49,"value":2967},"Pipelines (Delta Live Tables)",{"type":43,"tag":52,"props":2969,"children":2970},{},[2971,2975,2976],{"type":43,"tag":61,"props":2972,"children":2973},{},[2974],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":2977,"children":2980},{"href":2978,"rel":2979},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fpipelines\u002Fpipelines.html",[73],[2981],{"type":49,"value":2978},{"type":43,"tag":226,"props":2983,"children":2985},{"className":228,"code":2984,"language":18,"meta":230,"style":230},"# List pipelines\nfor pipeline in w.pipelines.list_pipelines():\n    print(f\"{pipeline.name}: {pipeline.state}\")\n\n# Get pipeline\npipeline = w.pipelines.get(pipeline_id=\"abc123\")\n\n# Start pipeline update\nw.pipelines.start_update(pipeline_id=\"abc123\")\n\n# Stop pipeline\nw.pipelines.stop_and_wait(pipeline_id=\"abc123\")\n",[2986],{"type":43,"tag":110,"props":2987,"children":2988},{"__ignoreMap":230},[2989,2997,3005,3013,3020,3028,3036,3043,3051,3059,3066,3074],{"type":43,"tag":236,"props":2990,"children":2991},{"class":238,"line":239},[2992],{"type":43,"tag":236,"props":2993,"children":2994},{},[2995],{"type":49,"value":2996},"# List pipelines\n",{"type":43,"tag":236,"props":2998,"children":2999},{"class":238,"line":248},[3000],{"type":43,"tag":236,"props":3001,"children":3002},{},[3003],{"type":49,"value":3004},"for pipeline in w.pipelines.list_pipelines():\n",{"type":43,"tag":236,"props":3006,"children":3007},{"class":238,"line":258},[3008],{"type":43,"tag":236,"props":3009,"children":3010},{},[3011],{"type":49,"value":3012},"    print(f\"{pipeline.name}: {pipeline.state}\")\n",{"type":43,"tag":236,"props":3014,"children":3015},{"class":238,"line":267},[3016],{"type":43,"tag":236,"props":3017,"children":3018},{"emptyLinePlaceholder":252},[3019],{"type":49,"value":255},{"type":43,"tag":236,"props":3021,"children":3022},{"class":238,"line":276},[3023],{"type":43,"tag":236,"props":3024,"children":3025},{},[3026],{"type":49,"value":3027},"# Get pipeline\n",{"type":43,"tag":236,"props":3029,"children":3030},{"class":238,"line":284},[3031],{"type":43,"tag":236,"props":3032,"children":3033},{},[3034],{"type":49,"value":3035},"pipeline = w.pipelines.get(pipeline_id=\"abc123\")\n",{"type":43,"tag":236,"props":3037,"children":3038},{"class":238,"line":293},[3039],{"type":43,"tag":236,"props":3040,"children":3041},{"emptyLinePlaceholder":252},[3042],{"type":49,"value":255},{"type":43,"tag":236,"props":3044,"children":3045},{"class":238,"line":302},[3046],{"type":43,"tag":236,"props":3047,"children":3048},{},[3049],{"type":49,"value":3050},"# Start pipeline update\n",{"type":43,"tag":236,"props":3052,"children":3053},{"class":238,"line":310},[3054],{"type":43,"tag":236,"props":3055,"children":3056},{},[3057],{"type":49,"value":3058},"w.pipelines.start_update(pipeline_id=\"abc123\")\n",{"type":43,"tag":236,"props":3060,"children":3061},{"class":238,"line":319},[3062],{"type":43,"tag":236,"props":3063,"children":3064},{"emptyLinePlaceholder":252},[3065],{"type":49,"value":255},{"type":43,"tag":236,"props":3067,"children":3068},{"class":238,"line":328},[3069],{"type":43,"tag":236,"props":3070,"children":3071},{},[3072],{"type":49,"value":3073},"# Stop pipeline\n",{"type":43,"tag":236,"props":3075,"children":3076},{"class":238,"line":461},[3077],{"type":43,"tag":236,"props":3078,"children":3079},{},[3080],{"type":49,"value":3081},"w.pipelines.stop_and_wait(pipeline_id=\"abc123\")\n",{"type":43,"tag":743,"props":3083,"children":3085},{"id":3084},"secrets",[3086],{"type":49,"value":3087},"Secrets",{"type":43,"tag":52,"props":3089,"children":3090},{},[3091,3095,3096],{"type":43,"tag":61,"props":3092,"children":3093},{},[3094],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":3097,"children":3100},{"href":3098,"rel":3099},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002Fworkspace\u002Fsecrets.html",[73],[3101],{"type":49,"value":3098},{"type":43,"tag":226,"props":3103,"children":3105},{"className":228,"code":3104,"language":18,"meta":230,"style":230},"# List secret scopes\nfor scope in w.secrets.list_scopes():\n    print(scope.name)\n\n# Create scope\nw.secrets.create_scope(scope=\"my-scope\")\n\n# Put secret\nw.secrets.put_secret(scope=\"my-scope\", key=\"api-key\", string_value=\"secret123\")\n\n# Get secret (returns GetSecretResponse with value)\nsecret = w.secrets.get_secret(scope=\"my-scope\", key=\"api-key\")\n\n# List secrets in scope (metadata only, not values)\nfor s in w.secrets.list_secrets(scope=\"my-scope\"):\n    print(s.key)\n",[3106],{"type":43,"tag":110,"props":3107,"children":3108},{"__ignoreMap":230},[3109,3117,3125,3133,3140,3148,3156,3163,3171,3179,3186,3194,3202,3209,3217,3225],{"type":43,"tag":236,"props":3110,"children":3111},{"class":238,"line":239},[3112],{"type":43,"tag":236,"props":3113,"children":3114},{},[3115],{"type":49,"value":3116},"# List secret scopes\n",{"type":43,"tag":236,"props":3118,"children":3119},{"class":238,"line":248},[3120],{"type":43,"tag":236,"props":3121,"children":3122},{},[3123],{"type":49,"value":3124},"for scope in w.secrets.list_scopes():\n",{"type":43,"tag":236,"props":3126,"children":3127},{"class":238,"line":258},[3128],{"type":43,"tag":236,"props":3129,"children":3130},{},[3131],{"type":49,"value":3132},"    print(scope.name)\n",{"type":43,"tag":236,"props":3134,"children":3135},{"class":238,"line":267},[3136],{"type":43,"tag":236,"props":3137,"children":3138},{"emptyLinePlaceholder":252},[3139],{"type":49,"value":255},{"type":43,"tag":236,"props":3141,"children":3142},{"class":238,"line":276},[3143],{"type":43,"tag":236,"props":3144,"children":3145},{},[3146],{"type":49,"value":3147},"# Create scope\n",{"type":43,"tag":236,"props":3149,"children":3150},{"class":238,"line":284},[3151],{"type":43,"tag":236,"props":3152,"children":3153},{},[3154],{"type":49,"value":3155},"w.secrets.create_scope(scope=\"my-scope\")\n",{"type":43,"tag":236,"props":3157,"children":3158},{"class":238,"line":293},[3159],{"type":43,"tag":236,"props":3160,"children":3161},{"emptyLinePlaceholder":252},[3162],{"type":49,"value":255},{"type":43,"tag":236,"props":3164,"children":3165},{"class":238,"line":302},[3166],{"type":43,"tag":236,"props":3167,"children":3168},{},[3169],{"type":49,"value":3170},"# Put secret\n",{"type":43,"tag":236,"props":3172,"children":3173},{"class":238,"line":310},[3174],{"type":43,"tag":236,"props":3175,"children":3176},{},[3177],{"type":49,"value":3178},"w.secrets.put_secret(scope=\"my-scope\", key=\"api-key\", string_value=\"secret123\")\n",{"type":43,"tag":236,"props":3180,"children":3181},{"class":238,"line":319},[3182],{"type":43,"tag":236,"props":3183,"children":3184},{"emptyLinePlaceholder":252},[3185],{"type":49,"value":255},{"type":43,"tag":236,"props":3187,"children":3188},{"class":238,"line":328},[3189],{"type":43,"tag":236,"props":3190,"children":3191},{},[3192],{"type":49,"value":3193},"# Get secret (returns GetSecretResponse with value)\n",{"type":43,"tag":236,"props":3195,"children":3196},{"class":238,"line":461},[3197],{"type":43,"tag":236,"props":3198,"children":3199},{},[3200],{"type":49,"value":3201},"secret = w.secrets.get_secret(scope=\"my-scope\", key=\"api-key\")\n",{"type":43,"tag":236,"props":3203,"children":3204},{"class":238,"line":469},[3205],{"type":43,"tag":236,"props":3206,"children":3207},{"emptyLinePlaceholder":252},[3208],{"type":49,"value":255},{"type":43,"tag":236,"props":3210,"children":3211},{"class":238,"line":478},[3212],{"type":43,"tag":236,"props":3213,"children":3214},{},[3215],{"type":49,"value":3216},"# List secrets in scope (metadata only, not values)\n",{"type":43,"tag":236,"props":3218,"children":3219},{"class":238,"line":487},[3220],{"type":43,"tag":236,"props":3221,"children":3222},{},[3223],{"type":49,"value":3224},"for s in w.secrets.list_secrets(scope=\"my-scope\"):\n",{"type":43,"tag":236,"props":3226,"children":3227},{"class":238,"line":496},[3228],{"type":43,"tag":236,"props":3229,"children":3230},{},[3231],{"type":49,"value":3232},"    print(s.key)\n",{"type":43,"tag":743,"props":3234,"children":3236},{"id":3235},"dbutils",[3237],{"type":49,"value":3238},"DBUtils",{"type":43,"tag":52,"props":3240,"children":3241},{},[3242,3246,3247],{"type":43,"tag":61,"props":3243,"children":3244},{},[3245],{"type":49,"value":961},{"type":49,"value":67},{"type":43,"tag":69,"props":3248,"children":3251},{"href":3249,"rel":3250},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fdbutils.html",[73],[3252],{"type":49,"value":3249},{"type":43,"tag":226,"props":3254,"children":3256},{"className":228,"code":3255,"language":18,"meta":230,"style":230},"# Access dbutils through WorkspaceClient\ndbutils = w.dbutils\n\n# File system operations\nfiles = dbutils.fs.ls(\"\u002F\")\ndbutils.fs.cp(\"dbfs:\u002Fsource\", \"dbfs:\u002Fdest\")\ndbutils.fs.rm(\"dbfs:\u002Fpath\", recurse=True)\n\n# Secrets (same as w.secrets but dbutils interface)\nvalue = dbutils.secrets.get(scope=\"my-scope\", key=\"my-key\")\n",[3257],{"type":43,"tag":110,"props":3258,"children":3259},{"__ignoreMap":230},[3260,3268,3276,3283,3291,3299,3307,3315,3322,3330],{"type":43,"tag":236,"props":3261,"children":3262},{"class":238,"line":239},[3263],{"type":43,"tag":236,"props":3264,"children":3265},{},[3266],{"type":49,"value":3267},"# Access dbutils through WorkspaceClient\n",{"type":43,"tag":236,"props":3269,"children":3270},{"class":238,"line":248},[3271],{"type":43,"tag":236,"props":3272,"children":3273},{},[3274],{"type":49,"value":3275},"dbutils = w.dbutils\n",{"type":43,"tag":236,"props":3277,"children":3278},{"class":238,"line":258},[3279],{"type":43,"tag":236,"props":3280,"children":3281},{"emptyLinePlaceholder":252},[3282],{"type":49,"value":255},{"type":43,"tag":236,"props":3284,"children":3285},{"class":238,"line":267},[3286],{"type":43,"tag":236,"props":3287,"children":3288},{},[3289],{"type":49,"value":3290},"# File system operations\n",{"type":43,"tag":236,"props":3292,"children":3293},{"class":238,"line":276},[3294],{"type":43,"tag":236,"props":3295,"children":3296},{},[3297],{"type":49,"value":3298},"files = dbutils.fs.ls(\"\u002F\")\n",{"type":43,"tag":236,"props":3300,"children":3301},{"class":238,"line":284},[3302],{"type":43,"tag":236,"props":3303,"children":3304},{},[3305],{"type":49,"value":3306},"dbutils.fs.cp(\"dbfs:\u002Fsource\", \"dbfs:\u002Fdest\")\n",{"type":43,"tag":236,"props":3308,"children":3309},{"class":238,"line":293},[3310],{"type":43,"tag":236,"props":3311,"children":3312},{},[3313],{"type":49,"value":3314},"dbutils.fs.rm(\"dbfs:\u002Fpath\", recurse=True)\n",{"type":43,"tag":236,"props":3316,"children":3317},{"class":238,"line":302},[3318],{"type":43,"tag":236,"props":3319,"children":3320},{"emptyLinePlaceholder":252},[3321],{"type":49,"value":255},{"type":43,"tag":236,"props":3323,"children":3324},{"class":238,"line":310},[3325],{"type":43,"tag":236,"props":3326,"children":3327},{},[3328],{"type":49,"value":3329},"# Secrets (same as w.secrets but dbutils interface)\n",{"type":43,"tag":236,"props":3331,"children":3332},{"class":238,"line":319},[3333],{"type":43,"tag":236,"props":3334,"children":3335},{},[3336],{"type":49,"value":3337},"value = dbutils.secrets.get(scope=\"my-scope\", key=\"my-key\")\n",{"type":43,"tag":89,"props":3339,"children":3340},{},[],{"type":43,"tag":93,"props":3342,"children":3344},{"id":3343},"common-patterns",[3345],{"type":49,"value":3346},"Common Patterns",{"type":43,"tag":743,"props":3348,"children":3350},{"id":3349},"critical-async-applications-fastapi-etc",[3351],{"type":49,"value":3352},"CRITICAL: Async Applications (FastAPI, etc.)",{"type":43,"tag":52,"props":3354,"children":3355},{},[3356,3361,3363,3369],{"type":43,"tag":61,"props":3357,"children":3358},{},[3359],{"type":49,"value":3360},"The Databricks SDK is fully synchronous.",{"type":49,"value":3362}," All calls block the thread. In async applications (FastAPI, asyncio), you MUST wrap SDK calls with ",{"type":43,"tag":110,"props":3364,"children":3366},{"className":3365},[],[3367],{"type":49,"value":3368},"asyncio.to_thread()",{"type":49,"value":3370}," to avoid blocking the event loop.",{"type":43,"tag":226,"props":3372,"children":3374},{"className":228,"code":3373,"language":18,"meta":230,"style":230},"import asyncio\nfrom databricks.sdk import WorkspaceClient\n\nw = WorkspaceClient()\n\n# WRONG - blocks the event loop\nasync def get_clusters_bad():\n    return list(w.clusters.list())  # BLOCKS!\n\n# CORRECT - runs in thread pool\nasync def get_clusters_good():\n    return await asyncio.to_thread(lambda: list(w.clusters.list()))\n\n# CORRECT - for simple calls\nasync def get_cluster(cluster_id: str):\n    return await asyncio.to_thread(w.clusters.get, cluster_id)\n\n# CORRECT - FastAPI endpoint\nfrom fastapi import FastAPI\napp = FastAPI()\n\n@app.get(\"\u002Fclusters\")\nasync def list_clusters():\n    clusters = await asyncio.to_thread(lambda: list(w.clusters.list()))\n    return [{\"id\": c.cluster_id, \"name\": c.cluster_name} for c in clusters]\n\n@app.post(\"\u002Fquery\")\nasync def run_query(sql: str, warehouse_id: str):\n    # Wrap the blocking SDK call\n    response = await asyncio.to_thread(\n        w.statement_execution.execute_statement,\n        statement=sql,\n        warehouse_id=warehouse_id,\n        wait_timeout=\"30s\"\n    )\n    return response.result.data_array\n",[3375],{"type":43,"tag":110,"props":3376,"children":3377},{"__ignoreMap":230},[3378,3386,3393,3400,3407,3414,3422,3430,3438,3445,3453,3461,3469,3476,3484,3492,3500,3507,3515,3523,3531,3538,3546,3554,3562,3570,3577,3585,3593,3601,3610,3619,3628,3637,3646,3655],{"type":43,"tag":236,"props":3379,"children":3380},{"class":238,"line":239},[3381],{"type":43,"tag":236,"props":3382,"children":3383},{},[3384],{"type":49,"value":3385},"import asyncio\n",{"type":43,"tag":236,"props":3387,"children":3388},{"class":238,"line":248},[3389],{"type":43,"tag":236,"props":3390,"children":3391},{},[3392],{"type":49,"value":381},{"type":43,"tag":236,"props":3394,"children":3395},{"class":238,"line":258},[3396],{"type":43,"tag":236,"props":3397,"children":3398},{"emptyLinePlaceholder":252},[3399],{"type":49,"value":255},{"type":43,"tag":236,"props":3401,"children":3402},{"class":238,"line":267},[3403],{"type":43,"tag":236,"props":3404,"children":3405},{},[3406],{"type":49,"value":396},{"type":43,"tag":236,"props":3408,"children":3409},{"class":238,"line":276},[3410],{"type":43,"tag":236,"props":3411,"children":3412},{"emptyLinePlaceholder":252},[3413],{"type":49,"value":255},{"type":43,"tag":236,"props":3415,"children":3416},{"class":238,"line":284},[3417],{"type":43,"tag":236,"props":3418,"children":3419},{},[3420],{"type":49,"value":3421},"# WRONG - blocks the event loop\n",{"type":43,"tag":236,"props":3423,"children":3424},{"class":238,"line":293},[3425],{"type":43,"tag":236,"props":3426,"children":3427},{},[3428],{"type":49,"value":3429},"async def get_clusters_bad():\n",{"type":43,"tag":236,"props":3431,"children":3432},{"class":238,"line":302},[3433],{"type":43,"tag":236,"props":3434,"children":3435},{},[3436],{"type":49,"value":3437},"    return list(w.clusters.list())  # BLOCKS!\n",{"type":43,"tag":236,"props":3439,"children":3440},{"class":238,"line":310},[3441],{"type":43,"tag":236,"props":3442,"children":3443},{"emptyLinePlaceholder":252},[3444],{"type":49,"value":255},{"type":43,"tag":236,"props":3446,"children":3447},{"class":238,"line":319},[3448],{"type":43,"tag":236,"props":3449,"children":3450},{},[3451],{"type":49,"value":3452},"# CORRECT - runs in thread pool\n",{"type":43,"tag":236,"props":3454,"children":3455},{"class":238,"line":328},[3456],{"type":43,"tag":236,"props":3457,"children":3458},{},[3459],{"type":49,"value":3460},"async def get_clusters_good():\n",{"type":43,"tag":236,"props":3462,"children":3463},{"class":238,"line":461},[3464],{"type":43,"tag":236,"props":3465,"children":3466},{},[3467],{"type":49,"value":3468},"    return await asyncio.to_thread(lambda: list(w.clusters.list()))\n",{"type":43,"tag":236,"props":3470,"children":3471},{"class":238,"line":469},[3472],{"type":43,"tag":236,"props":3473,"children":3474},{"emptyLinePlaceholder":252},[3475],{"type":49,"value":255},{"type":43,"tag":236,"props":3477,"children":3478},{"class":238,"line":478},[3479],{"type":43,"tag":236,"props":3480,"children":3481},{},[3482],{"type":49,"value":3483},"# CORRECT - for simple calls\n",{"type":43,"tag":236,"props":3485,"children":3486},{"class":238,"line":487},[3487],{"type":43,"tag":236,"props":3488,"children":3489},{},[3490],{"type":49,"value":3491},"async def get_cluster(cluster_id: str):\n",{"type":43,"tag":236,"props":3493,"children":3494},{"class":238,"line":496},[3495],{"type":43,"tag":236,"props":3496,"children":3497},{},[3498],{"type":49,"value":3499},"    return await asyncio.to_thread(w.clusters.get, cluster_id)\n",{"type":43,"tag":236,"props":3501,"children":3502},{"class":238,"line":1159},[3503],{"type":43,"tag":236,"props":3504,"children":3505},{"emptyLinePlaceholder":252},[3506],{"type":49,"value":255},{"type":43,"tag":236,"props":3508,"children":3509},{"class":238,"line":1168},[3510],{"type":43,"tag":236,"props":3511,"children":3512},{},[3513],{"type":49,"value":3514},"# CORRECT - FastAPI endpoint\n",{"type":43,"tag":236,"props":3516,"children":3517},{"class":238,"line":1176},[3518],{"type":43,"tag":236,"props":3519,"children":3520},{},[3521],{"type":49,"value":3522},"from fastapi import FastAPI\n",{"type":43,"tag":236,"props":3524,"children":3525},{"class":238,"line":1184},[3526],{"type":43,"tag":236,"props":3527,"children":3528},{},[3529],{"type":49,"value":3530},"app = FastAPI()\n",{"type":43,"tag":236,"props":3532,"children":3533},{"class":238,"line":1193},[3534],{"type":43,"tag":236,"props":3535,"children":3536},{"emptyLinePlaceholder":252},[3537],{"type":49,"value":255},{"type":43,"tag":236,"props":3539,"children":3540},{"class":238,"line":1401},[3541],{"type":43,"tag":236,"props":3542,"children":3543},{},[3544],{"type":49,"value":3545},"@app.get(\"\u002Fclusters\")\n",{"type":43,"tag":236,"props":3547,"children":3548},{"class":238,"line":1410},[3549],{"type":43,"tag":236,"props":3550,"children":3551},{},[3552],{"type":49,"value":3553},"async def list_clusters():\n",{"type":43,"tag":236,"props":3555,"children":3556},{"class":238,"line":1419},[3557],{"type":43,"tag":236,"props":3558,"children":3559},{},[3560],{"type":49,"value":3561},"    clusters = await asyncio.to_thread(lambda: list(w.clusters.list()))\n",{"type":43,"tag":236,"props":3563,"children":3564},{"class":238,"line":1427},[3565],{"type":43,"tag":236,"props":3566,"children":3567},{},[3568],{"type":49,"value":3569},"    return [{\"id\": c.cluster_id, \"name\": c.cluster_name} for c in clusters]\n",{"type":43,"tag":236,"props":3571,"children":3572},{"class":238,"line":1435},[3573],{"type":43,"tag":236,"props":3574,"children":3575},{"emptyLinePlaceholder":252},[3576],{"type":49,"value":255},{"type":43,"tag":236,"props":3578,"children":3579},{"class":238,"line":1444},[3580],{"type":43,"tag":236,"props":3581,"children":3582},{},[3583],{"type":49,"value":3584},"@app.post(\"\u002Fquery\")\n",{"type":43,"tag":236,"props":3586,"children":3587},{"class":238,"line":1453},[3588],{"type":43,"tag":236,"props":3589,"children":3590},{},[3591],{"type":49,"value":3592},"async def run_query(sql: str, warehouse_id: str):\n",{"type":43,"tag":236,"props":3594,"children":3595},{"class":238,"line":1462},[3596],{"type":43,"tag":236,"props":3597,"children":3598},{},[3599],{"type":49,"value":3600},"    # Wrap the blocking SDK call\n",{"type":43,"tag":236,"props":3602,"children":3604},{"class":238,"line":3603},30,[3605],{"type":43,"tag":236,"props":3606,"children":3607},{},[3608],{"type":49,"value":3609},"    response = await asyncio.to_thread(\n",{"type":43,"tag":236,"props":3611,"children":3613},{"class":238,"line":3612},31,[3614],{"type":43,"tag":236,"props":3615,"children":3616},{},[3617],{"type":49,"value":3618},"        w.statement_execution.execute_statement,\n",{"type":43,"tag":236,"props":3620,"children":3622},{"class":238,"line":3621},32,[3623],{"type":43,"tag":236,"props":3624,"children":3625},{},[3626],{"type":49,"value":3627},"        statement=sql,\n",{"type":43,"tag":236,"props":3629,"children":3631},{"class":238,"line":3630},33,[3632],{"type":43,"tag":236,"props":3633,"children":3634},{},[3635],{"type":49,"value":3636},"        warehouse_id=warehouse_id,\n",{"type":43,"tag":236,"props":3638,"children":3640},{"class":238,"line":3639},34,[3641],{"type":43,"tag":236,"props":3642,"children":3643},{},[3644],{"type":49,"value":3645},"        wait_timeout=\"30s\"\n",{"type":43,"tag":236,"props":3647,"children":3649},{"class":238,"line":3648},35,[3650],{"type":43,"tag":236,"props":3651,"children":3652},{},[3653],{"type":49,"value":3654},"    )\n",{"type":43,"tag":236,"props":3656,"children":3658},{"class":238,"line":3657},36,[3659],{"type":43,"tag":236,"props":3660,"children":3661},{},[3662],{"type":49,"value":3663},"    return response.result.data_array\n",{"type":43,"tag":52,"props":3665,"children":3666},{},[3667,3672,3673,3679],{"type":43,"tag":61,"props":3668,"children":3669},{},[3670],{"type":49,"value":3671},"Note:",{"type":49,"value":67},{"type":43,"tag":110,"props":3674,"children":3676},{"className":3675},[],[3677],{"type":49,"value":3678},"WorkspaceClient().config.host",{"type":49,"value":3680}," is NOT a network call - it just reads config. No need to wrap property access.",{"type":43,"tag":89,"props":3682,"children":3683},{},[],{"type":43,"tag":743,"props":3685,"children":3687},{"id":3686},"wait-for-long-running-operations",[3688],{"type":49,"value":3689},"Wait for Long-Running Operations",{"type":43,"tag":226,"props":3691,"children":3693},{"className":228,"code":3692,"language":18,"meta":230,"style":230},"from datetime import timedelta\n\n# Pattern 1: Use *_and_wait methods\ncluster = w.clusters.create_and_wait(\n    cluster_name=\"test\",\n    spark_version=\"14.3.x-scala2.12\",\n    node_type_id=\"i3.xlarge\",\n    num_workers=2,\n    timeout=timedelta(minutes=30)\n)\n\n# Pattern 2: Use Wait object\nwait = w.clusters.create(...)\ncluster = wait.result()  # Blocks until ready\n\n# Pattern 3: Manual polling with callback\ndef progress(cluster):\n    print(f\"State: {cluster.state}\")\n\ncluster = w.clusters.wait_get_cluster_running(\n    cluster_id=\"...\",\n    timeout=timedelta(minutes=30),\n    callback=progress\n)\n",[3694],{"type":43,"tag":110,"props":3695,"children":3696},{"__ignoreMap":230},[3697,3705,3712,3720,3727,3735,3742,3749,3756,3763,3770,3777,3785,3793,3801,3808,3816,3824,3832,3839,3847,3855,3863,3871],{"type":43,"tag":236,"props":3698,"children":3699},{"class":238,"line":239},[3700],{"type":43,"tag":236,"props":3701,"children":3702},{},[3703],{"type":49,"value":3704},"from datetime import timedelta\n",{"type":43,"tag":236,"props":3706,"children":3707},{"class":238,"line":248},[3708],{"type":43,"tag":236,"props":3709,"children":3710},{"emptyLinePlaceholder":252},[3711],{"type":49,"value":255},{"type":43,"tag":236,"props":3713,"children":3714},{"class":238,"line":258},[3715],{"type":43,"tag":236,"props":3716,"children":3717},{},[3718],{"type":49,"value":3719},"# Pattern 1: Use *_and_wait methods\n",{"type":43,"tag":236,"props":3721,"children":3722},{"class":238,"line":267},[3723],{"type":43,"tag":236,"props":3724,"children":3725},{},[3726],{"type":49,"value":1375},{"type":43,"tag":236,"props":3728,"children":3729},{"class":238,"line":276},[3730],{"type":43,"tag":236,"props":3731,"children":3732},{},[3733],{"type":49,"value":3734},"    cluster_name=\"test\",\n",{"type":43,"tag":236,"props":3736,"children":3737},{"class":238,"line":284},[3738],{"type":43,"tag":236,"props":3739,"children":3740},{},[3741],{"type":49,"value":1390},{"type":43,"tag":236,"props":3743,"children":3744},{"class":238,"line":293},[3745],{"type":43,"tag":236,"props":3746,"children":3747},{},[3748],{"type":49,"value":1398},{"type":43,"tag":236,"props":3750,"children":3751},{"class":238,"line":302},[3752],{"type":43,"tag":236,"props":3753,"children":3754},{},[3755],{"type":49,"value":1407},{"type":43,"tag":236,"props":3757,"children":3758},{"class":238,"line":310},[3759],{"type":43,"tag":236,"props":3760,"children":3761},{},[3762],{"type":49,"value":1416},{"type":43,"tag":236,"props":3764,"children":3765},{"class":238,"line":319},[3766],{"type":43,"tag":236,"props":3767,"children":3768},{},[3769],{"type":49,"value":443},{"type":43,"tag":236,"props":3771,"children":3772},{"class":238,"line":328},[3773],{"type":43,"tag":236,"props":3774,"children":3775},{"emptyLinePlaceholder":252},[3776],{"type":49,"value":255},{"type":43,"tag":236,"props":3778,"children":3779},{"class":238,"line":461},[3780],{"type":43,"tag":236,"props":3781,"children":3782},{},[3783],{"type":49,"value":3784},"# Pattern 2: Use Wait object\n",{"type":43,"tag":236,"props":3786,"children":3787},{"class":238,"line":469},[3788],{"type":43,"tag":236,"props":3789,"children":3790},{},[3791],{"type":49,"value":3792},"wait = w.clusters.create(...)\n",{"type":43,"tag":236,"props":3794,"children":3795},{"class":238,"line":478},[3796],{"type":43,"tag":236,"props":3797,"children":3798},{},[3799],{"type":49,"value":3800},"cluster = wait.result()  # Blocks until ready\n",{"type":43,"tag":236,"props":3802,"children":3803},{"class":238,"line":487},[3804],{"type":43,"tag":236,"props":3805,"children":3806},{"emptyLinePlaceholder":252},[3807],{"type":49,"value":255},{"type":43,"tag":236,"props":3809,"children":3810},{"class":238,"line":496},[3811],{"type":43,"tag":236,"props":3812,"children":3813},{},[3814],{"type":49,"value":3815},"# Pattern 3: Manual polling with callback\n",{"type":43,"tag":236,"props":3817,"children":3818},{"class":238,"line":1159},[3819],{"type":43,"tag":236,"props":3820,"children":3821},{},[3822],{"type":49,"value":3823},"def progress(cluster):\n",{"type":43,"tag":236,"props":3825,"children":3826},{"class":238,"line":1168},[3827],{"type":43,"tag":236,"props":3828,"children":3829},{},[3830],{"type":49,"value":3831},"    print(f\"State: {cluster.state}\")\n",{"type":43,"tag":236,"props":3833,"children":3834},{"class":238,"line":1176},[3835],{"type":43,"tag":236,"props":3836,"children":3837},{"emptyLinePlaceholder":252},[3838],{"type":49,"value":255},{"type":43,"tag":236,"props":3840,"children":3841},{"class":238,"line":1184},[3842],{"type":43,"tag":236,"props":3843,"children":3844},{},[3845],{"type":49,"value":3846},"cluster = w.clusters.wait_get_cluster_running(\n",{"type":43,"tag":236,"props":3848,"children":3849},{"class":238,"line":1193},[3850],{"type":43,"tag":236,"props":3851,"children":3852},{},[3853],{"type":49,"value":3854},"    cluster_id=\"...\",\n",{"type":43,"tag":236,"props":3856,"children":3857},{"class":238,"line":1401},[3858],{"type":43,"tag":236,"props":3859,"children":3860},{},[3861],{"type":49,"value":3862},"    timeout=timedelta(minutes=30),\n",{"type":43,"tag":236,"props":3864,"children":3865},{"class":238,"line":1410},[3866],{"type":43,"tag":236,"props":3867,"children":3868},{},[3869],{"type":49,"value":3870},"    callback=progress\n",{"type":43,"tag":236,"props":3872,"children":3873},{"class":238,"line":1419},[3874],{"type":43,"tag":236,"props":3875,"children":3876},{},[3877],{"type":49,"value":443},{"type":43,"tag":743,"props":3879,"children":3881},{"id":3880},"pagination",[3882],{"type":49,"value":3883},"Pagination",{"type":43,"tag":226,"props":3885,"children":3887},{"className":228,"code":3886,"language":18,"meta":230,"style":230},"# All list methods return iterators that handle pagination automatically\nfor job in w.jobs.list():  # Fetches all pages\n    print(job.settings.name)\n\n# For manual control\nfrom databricks.sdk.service.jobs import ListJobsRequest\nresponse = w.jobs.list(limit=10)\nfor job in response:\n    print(job)\n",[3888],{"type":43,"tag":110,"props":3889,"children":3890},{"__ignoreMap":230},[3891,3899,3907,3915,3922,3930,3938,3946,3954],{"type":43,"tag":236,"props":3892,"children":3893},{"class":238,"line":239},[3894],{"type":43,"tag":236,"props":3895,"children":3896},{},[3897],{"type":49,"value":3898},"# All list methods return iterators that handle pagination automatically\n",{"type":43,"tag":236,"props":3900,"children":3901},{"class":238,"line":248},[3902],{"type":43,"tag":236,"props":3903,"children":3904},{},[3905],{"type":49,"value":3906},"for job in w.jobs.list():  # Fetches all pages\n",{"type":43,"tag":236,"props":3908,"children":3909},{"class":238,"line":258},[3910],{"type":43,"tag":236,"props":3911,"children":3912},{},[3913],{"type":49,"value":3914},"    print(job.settings.name)\n",{"type":43,"tag":236,"props":3916,"children":3917},{"class":238,"line":267},[3918],{"type":43,"tag":236,"props":3919,"children":3920},{"emptyLinePlaceholder":252},[3921],{"type":49,"value":255},{"type":43,"tag":236,"props":3923,"children":3924},{"class":238,"line":276},[3925],{"type":43,"tag":236,"props":3926,"children":3927},{},[3928],{"type":49,"value":3929},"# For manual control\n",{"type":43,"tag":236,"props":3931,"children":3932},{"class":238,"line":284},[3933],{"type":43,"tag":236,"props":3934,"children":3935},{},[3936],{"type":49,"value":3937},"from databricks.sdk.service.jobs import ListJobsRequest\n",{"type":43,"tag":236,"props":3939,"children":3940},{"class":238,"line":293},[3941],{"type":43,"tag":236,"props":3942,"children":3943},{},[3944],{"type":49,"value":3945},"response = w.jobs.list(limit=10)\n",{"type":43,"tag":236,"props":3947,"children":3948},{"class":238,"line":302},[3949],{"type":43,"tag":236,"props":3950,"children":3951},{},[3952],{"type":49,"value":3953},"for job in response:\n",{"type":43,"tag":236,"props":3955,"children":3956},{"class":238,"line":310},[3957],{"type":43,"tag":236,"props":3958,"children":3959},{},[3960],{"type":49,"value":3961},"    print(job)\n",{"type":43,"tag":743,"props":3963,"children":3965},{"id":3964},"error-handling",[3966],{"type":49,"value":3967},"Error Handling",{"type":43,"tag":226,"props":3969,"children":3971},{"className":228,"code":3970,"language":18,"meta":230,"style":230},"from databricks.sdk.errors import NotFound, PermissionDenied, ResourceAlreadyExists\n\ntry:\n    cluster = w.clusters.get(cluster_id=\"invalid-id\")\nexcept NotFound:\n    print(\"Cluster not found\")\nexcept PermissionDenied:\n    print(\"Access denied\")\n",[3972],{"type":43,"tag":110,"props":3973,"children":3974},{"__ignoreMap":230},[3975,3983,3990,3998,4006,4014,4022,4030],{"type":43,"tag":236,"props":3976,"children":3977},{"class":238,"line":239},[3978],{"type":43,"tag":236,"props":3979,"children":3980},{},[3981],{"type":49,"value":3982},"from databricks.sdk.errors import NotFound, PermissionDenied, ResourceAlreadyExists\n",{"type":43,"tag":236,"props":3984,"children":3985},{"class":238,"line":248},[3986],{"type":43,"tag":236,"props":3987,"children":3988},{"emptyLinePlaceholder":252},[3989],{"type":49,"value":255},{"type":43,"tag":236,"props":3991,"children":3992},{"class":238,"line":258},[3993],{"type":43,"tag":236,"props":3994,"children":3995},{},[3996],{"type":49,"value":3997},"try:\n",{"type":43,"tag":236,"props":3999,"children":4000},{"class":238,"line":267},[4001],{"type":43,"tag":236,"props":4002,"children":4003},{},[4004],{"type":49,"value":4005},"    cluster = w.clusters.get(cluster_id=\"invalid-id\")\n",{"type":43,"tag":236,"props":4007,"children":4008},{"class":238,"line":276},[4009],{"type":43,"tag":236,"props":4010,"children":4011},{},[4012],{"type":49,"value":4013},"except NotFound:\n",{"type":43,"tag":236,"props":4015,"children":4016},{"class":238,"line":284},[4017],{"type":43,"tag":236,"props":4018,"children":4019},{},[4020],{"type":49,"value":4021},"    print(\"Cluster not found\")\n",{"type":43,"tag":236,"props":4023,"children":4024},{"class":238,"line":293},[4025],{"type":43,"tag":236,"props":4026,"children":4027},{},[4028],{"type":49,"value":4029},"except PermissionDenied:\n",{"type":43,"tag":236,"props":4031,"children":4032},{"class":238,"line":302},[4033],{"type":43,"tag":236,"props":4034,"children":4035},{},[4036],{"type":49,"value":4037},"    print(\"Access denied\")\n",{"type":43,"tag":89,"props":4039,"children":4040},{},[],{"type":43,"tag":93,"props":4042,"children":4044},{"id":4043},"when-uncertain",[4045],{"type":49,"value":4046},"When Uncertain",{"type":43,"tag":52,"props":4048,"children":4049},{},[4050],{"type":49,"value":4051},"If I'm unsure about a method, I should:",{"type":43,"tag":4053,"props":4054,"children":4055},"ol",{},[4056,4076,4142],{"type":43,"tag":104,"props":4057,"children":4058},{},[4059,4064],{"type":43,"tag":61,"props":4060,"children":4061},{},[4062],{"type":49,"value":4063},"Check the documentation URL pattern:",{"type":43,"tag":100,"props":4065,"children":4066},{},[4067],{"type":43,"tag":104,"props":4068,"children":4069},{},[4070],{"type":43,"tag":110,"props":4071,"children":4073},{"className":4072},[],[4074],{"type":49,"value":4075},"https:\u002F\u002Fdatabricks-sdk-py.readthedocs.io\u002Fen\u002Flatest\u002Fworkspace\u002F{category}\u002F{service}.html",{"type":43,"tag":104,"props":4077,"children":4078},{},[4079,4084],{"type":43,"tag":61,"props":4080,"children":4081},{},[4082],{"type":49,"value":4083},"Common categories:",{"type":43,"tag":100,"props":4085,"children":4086},{},[4087,4098,4109,4120,4131],{"type":43,"tag":104,"props":4088,"children":4089},{},[4090,4092],{"type":49,"value":4091},"Clusters: ",{"type":43,"tag":110,"props":4093,"children":4095},{"className":4094},[],[4096],{"type":49,"value":4097},"\u002Fworkspace\u002Fcompute\u002Fclusters.html",{"type":43,"tag":104,"props":4099,"children":4100},{},[4101,4103],{"type":49,"value":4102},"Jobs: ",{"type":43,"tag":110,"props":4104,"children":4106},{"className":4105},[],[4107],{"type":49,"value":4108},"\u002Fworkspace\u002Fjobs\u002Fjobs.html",{"type":43,"tag":104,"props":4110,"children":4111},{},[4112,4114],{"type":49,"value":4113},"Tables: ",{"type":43,"tag":110,"props":4115,"children":4117},{"className":4116},[],[4118],{"type":49,"value":4119},"\u002Fworkspace\u002Fcatalog\u002Ftables.html",{"type":43,"tag":104,"props":4121,"children":4122},{},[4123,4125],{"type":49,"value":4124},"Warehouses: ",{"type":43,"tag":110,"props":4126,"children":4128},{"className":4127},[],[4129],{"type":49,"value":4130},"\u002Fworkspace\u002Fsql\u002Fwarehouses.html",{"type":43,"tag":104,"props":4132,"children":4133},{},[4134,4136],{"type":49,"value":4135},"Serving: ",{"type":43,"tag":110,"props":4137,"children":4139},{"className":4138},[],[4140],{"type":49,"value":4141},"\u002Fworkspace\u002Fserving\u002Fserving_endpoints.html",{"type":43,"tag":104,"props":4143,"children":4144},{},[4145,4150],{"type":43,"tag":61,"props":4146,"children":4147},{},[4148],{"type":49,"value":4149},"Fetch and verify",{"type":49,"value":4151}," before providing guidance on parameters or return types.",{"type":43,"tag":89,"props":4153,"children":4154},{},[],{"type":43,"tag":93,"props":4156,"children":4158},{"id":4157},"quick-reference-links",[4159],{"type":49,"value":4160},"Quick Reference Links",{"type":43,"tag":750,"props":4162,"children":4163},{},[4164,4180],{"type":43,"tag":754,"props":4165,"children":4166},{},[4167],{"type":43,"tag":758,"props":4168,"children":4169},{},[4170,4175],{"type":43,"tag":762,"props":4171,"children":4172},{},[4173],{"type":49,"value":4174},"API",{"type":43,"tag":762,"props":4176,"children":4177},{},[4178],{"type":49,"value":4179},"Documentation URL",{"type":43,"tag":773,"props":4181,"children":4182},{},[4183,4198,4214,4230,4245,4261,4277,4293,4309,4324,4340,4356,4371,4387,4402],{"type":43,"tag":758,"props":4184,"children":4185},{},[4186,4190],{"type":43,"tag":780,"props":4187,"children":4188},{},[4189],{"type":49,"value":953},{"type":43,"tag":780,"props":4191,"children":4192},{},[4193],{"type":43,"tag":69,"props":4194,"children":4196},{"href":965,"rel":4195},[73],[4197],{"type":49,"value":965},{"type":43,"tag":758,"props":4199,"children":4200},{},[4201,4206],{"type":43,"tag":780,"props":4202,"children":4203},{},[4204],{"type":49,"value":4205},"Clusters",{"type":43,"tag":780,"props":4207,"children":4208},{},[4209],{"type":43,"tag":69,"props":4210,"children":4212},{"href":1225,"rel":4211},[73],[4213],{"type":49,"value":1225},{"type":43,"tag":758,"props":4215,"children":4216},{},[4217,4222],{"type":43,"tag":780,"props":4218,"children":4219},{},[4220],{"type":49,"value":4221},"Jobs",{"type":43,"tag":780,"props":4223,"children":4224},{},[4225],{"type":43,"tag":69,"props":4226,"children":4228},{"href":1485,"rel":4227},[73],[4229],{"type":49,"value":1485},{"type":43,"tag":758,"props":4231,"children":4232},{},[4233,4237],{"type":43,"tag":780,"props":4234,"children":4235},{},[4236],{"type":49,"value":1847},{"type":43,"tag":780,"props":4238,"children":4239},{},[4240],{"type":43,"tag":69,"props":4241,"children":4243},{"href":1858,"rel":4242},[73],[4244],{"type":49,"value":1858},{"type":43,"tag":758,"props":4246,"children":4247},{},[4248,4253],{"type":43,"tag":780,"props":4249,"children":4250},{},[4251],{"type":49,"value":4252},"Statement Execution",{"type":43,"tag":780,"props":4254,"children":4255},{},[4256],{"type":43,"tag":69,"props":4257,"children":4259},{"href":1699,"rel":4258},[73],[4260],{"type":49,"value":1699},{"type":43,"tag":758,"props":4262,"children":4263},{},[4264,4269],{"type":43,"tag":780,"props":4265,"children":4266},{},[4267],{"type":49,"value":4268},"Tables",{"type":43,"tag":780,"props":4270,"children":4271},{},[4272],{"type":43,"tag":69,"props":4273,"children":4275},{"href":2025,"rel":4274},[73],[4276],{"type":49,"value":2025},{"type":43,"tag":758,"props":4278,"children":4279},{},[4280,4285],{"type":43,"tag":780,"props":4281,"children":4282},{},[4283],{"type":49,"value":4284},"Catalogs",{"type":43,"tag":780,"props":4286,"children":4287},{},[4288],{"type":43,"tag":69,"props":4289,"children":4291},{"href":2131,"rel":4290},[73],[4292],{"type":49,"value":2131},{"type":43,"tag":758,"props":4294,"children":4295},{},[4296,4301],{"type":43,"tag":780,"props":4297,"children":4298},{},[4299],{"type":49,"value":4300},"Schemas",{"type":43,"tag":780,"props":4302,"children":4303},{},[4304],{"type":43,"tag":69,"props":4305,"children":4307},{"href":2143,"rel":4306},[73],[4308],{"type":49,"value":2143},{"type":43,"tag":758,"props":4310,"children":4311},{},[4312,4316],{"type":43,"tag":780,"props":4313,"children":4314},{},[4315],{"type":49,"value":2260},{"type":43,"tag":780,"props":4317,"children":4318},{},[4319],{"type":43,"tag":69,"props":4320,"children":4322},{"href":2271,"rel":4321},[73],[4323],{"type":49,"value":2271},{"type":43,"tag":758,"props":4325,"children":4326},{},[4327,4332],{"type":43,"tag":780,"props":4328,"children":4329},{},[4330],{"type":49,"value":4331},"Files",{"type":43,"tag":780,"props":4333,"children":4334},{},[4335],{"type":43,"tag":69,"props":4336,"children":4338},{"href":2422,"rel":4337},[73],[4339],{"type":49,"value":2422},{"type":43,"tag":758,"props":4341,"children":4342},{},[4343,4348],{"type":43,"tag":780,"props":4344,"children":4345},{},[4346],{"type":49,"value":4347},"Serving Endpoints",{"type":43,"tag":780,"props":4349,"children":4350},{},[4351],{"type":43,"tag":69,"props":4352,"children":4354},{"href":2648,"rel":4353},[73],[4355],{"type":49,"value":2648},{"type":43,"tag":758,"props":4357,"children":4358},{},[4359,4363],{"type":43,"tag":780,"props":4360,"children":4361},{},[4362],{"type":49,"value":2825},{"type":43,"tag":780,"props":4364,"children":4365},{},[4366],{"type":43,"tag":69,"props":4367,"children":4369},{"href":2837,"rel":4368},[73],[4370],{"type":49,"value":2837},{"type":43,"tag":758,"props":4372,"children":4373},{},[4374,4379],{"type":43,"tag":780,"props":4375,"children":4376},{},[4377],{"type":49,"value":4378},"Pipelines",{"type":43,"tag":780,"props":4380,"children":4381},{},[4382],{"type":43,"tag":69,"props":4383,"children":4385},{"href":2978,"rel":4384},[73],[4386],{"type":49,"value":2978},{"type":43,"tag":758,"props":4388,"children":4389},{},[4390,4394],{"type":43,"tag":780,"props":4391,"children":4392},{},[4393],{"type":49,"value":3087},{"type":43,"tag":780,"props":4395,"children":4396},{},[4397],{"type":43,"tag":69,"props":4398,"children":4400},{"href":3098,"rel":4399},[73],[4401],{"type":49,"value":3098},{"type":43,"tag":758,"props":4403,"children":4404},{},[4405,4409],{"type":43,"tag":780,"props":4406,"children":4407},{},[4408],{"type":49,"value":3238},{"type":43,"tag":780,"props":4410,"children":4411},{},[4412],{"type":43,"tag":69,"props":4413,"children":4415},{"href":3249,"rel":4414},[73],[4416],{"type":49,"value":3249},{"type":43,"tag":93,"props":4418,"children":4420},{"id":4419},"related-skills",[4421],{"type":49,"value":4422},"Related Skills",{"type":43,"tag":100,"props":4424,"children":4425},{},[4426,4435,4445,4455,4469,4479,4493],{"type":43,"tag":104,"props":4427,"children":4428},{},[4429,4433],{"type":43,"tag":61,"props":4430,"children":4431},{},[4432],{"type":49,"value":38},{"type":49,"value":4434}," - profile and authentication setup",{"type":43,"tag":104,"props":4436,"children":4437},{},[4438,4443],{"type":43,"tag":61,"props":4439,"children":4440},{},[4441],{"type":49,"value":4442},"databricks-dabs",{"type":49,"value":4444}," - deploying resources via DABs",{"type":43,"tag":104,"props":4446,"children":4447},{},[4448,4453],{"type":43,"tag":61,"props":4449,"children":4450},{},[4451],{"type":49,"value":4452},"databricks-jobs",{"type":49,"value":4454}," - job orchestration patterns",{"type":43,"tag":104,"props":4456,"children":4457},{},[4458,4467],{"type":43,"tag":61,"props":4459,"children":4460},{},[4461],{"type":43,"tag":69,"props":4462,"children":4464},{"href":4463},"..\u002Fdatabricks-unity-catalog\u002FSKILL.md",[4465],{"type":49,"value":4466},"databricks-unity-catalog",{"type":49,"value":4468}," - catalog governance",{"type":43,"tag":104,"props":4470,"children":4471},{},[4472,4477],{"type":43,"tag":61,"props":4473,"children":4474},{},[4475],{"type":49,"value":4476},"databricks-model-serving",{"type":49,"value":4478}," - serving endpoint management",{"type":43,"tag":104,"props":4480,"children":4481},{},[4482,4491],{"type":43,"tag":61,"props":4483,"children":4484},{},[4485],{"type":43,"tag":69,"props":4486,"children":4488},{"href":4487},"..\u002Fdatabricks-vector-search\u002FSKILL.md",[4489],{"type":49,"value":4490},"databricks-vector-search",{"type":49,"value":4492}," - vector index operations",{"type":43,"tag":104,"props":4494,"children":4495},{},[4496,4501],{"type":43,"tag":61,"props":4497,"children":4498},{},[4499],{"type":49,"value":4500},"databricks-lakebase",{"type":49,"value":4502}," - managed PostgreSQL with autoscaling + branching",{"type":43,"tag":4504,"props":4505,"children":4506},"style",{},[4507],{"type":49,"value":4508},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4510,"total":3612},[4511,4528,4542,4557,4574,4594,4605],{"slug":4512,"name":4512,"fn":4513,"description":4514,"org":4515,"tags":4516,"stars":23,"repoUrl":24,"updatedAt":4527},"databricks-agent-bricks","create Databricks Agent Bricks","Create Agent Bricks: Knowledge Assistants (KA) for document Q&A and Supervisor Agents for multi-agent orchestration (MAS).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4517,4520,4521,4524],{"name":4518,"slug":4519,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":4522,"slug":4523,"type":15},"Knowledge Management","knowledge-management",{"name":4525,"slug":4526,"type":15},"Multi-Agent","multi-agent","2026-07-15T05:41:38.548954",{"slug":4529,"name":4529,"fn":4530,"description":4531,"org":4532,"tags":4533,"stars":23,"repoUrl":24,"updatedAt":4541},"databricks-ai-functions","use Databricks built-in AI functions","Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment, ai_similarity, ai_parse_document, ai_prep_search, ai_query, ai_forecast) to add AI capabilities directly to SQL and PySpark pipelines without managing model endpoints. Also covers document parsing and building custom RAG pipelines (parse → prep_search → index → query).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4534,4537,4538],{"name":4535,"slug":4536,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":4539,"slug":4540,"type":15},"LLM","llm","2026-07-31T05:53:33.562077",{"slug":4543,"name":4543,"fn":4544,"description":4545,"org":4546,"tags":4547,"stars":23,"repoUrl":24,"updatedAt":4556},"databricks-ai-runtime","submit and manage Databricks GPU workloads","Databricks AI Runtime (`air`) CLI — the command-line tool for submitting and managing GPU training workloads on Databricks serverless compute. Use for: running `air` workloads, custom Docker image setup, environment configuration, and troubleshooting `air` jobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4548,4549,4550,4553],{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":4551,"slug":4552,"type":15},"Docker","docker",{"name":4554,"slug":4555,"type":15},"Engineering","engineering","2026-07-12T08:04:55.843982",{"slug":4558,"name":4558,"fn":4559,"description":4560,"org":4561,"tags":4562,"stars":23,"repoUrl":24,"updatedAt":4573},"databricks-aibi-dashboards","create Databricks AI\u002FBI dashboards","Create Databricks AI\u002FBI dashboards. Must use when creating, updating, or deploying Lakeview dashboards as Databricks Dashboard have a unique json structure. CRITICAL: You MUST test ALL SQL queries via CLI BEFORE deploying. Follow guidelines strictly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4563,4566,4569,4572],{"name":4564,"slug":4565,"type":15},"Analytics","analytics",{"name":4567,"slug":4568,"type":15},"Dashboards","dashboards",{"name":4570,"slug":4571,"type":15},"Data Visualization","data-visualization",{"name":9,"slug":8,"type":15},"2026-07-12T08:04:25.314591",{"slug":4575,"name":4575,"fn":4576,"description":4577,"org":4578,"tags":4579,"stars":23,"repoUrl":24,"updatedAt":4593},"databricks-app-design","design UX for Databricks AppKit applications","Design the UX of custom-code Databricks Apps (AppKit\u002FReact) data screens — KPI\u002Foverview pages, reports, charts, tables, and Genie\u002Fchat data assistants — mapped to concrete AppKit components. Use when BUILDING or reviewing the UI of an AppKit\u002FReact app that displays data or answers data questions: choosing genre, layout, charts, KPIs, semantic color, required states (loading\u002Fempty\u002Ferror), IBCS notation, and AI-result trust (showing generated SQL\u002Fsources for Genie\u002Fchat). A plain \"create a dashboard\" request means a managed AI\u002FBI (Lakeview) dashboard → use databricks-aibi-dashboards, NOT this skill. Also NOT for non-data frontend (forms, settings, auth, marketing) or scaffolding\u002Fbuild\u002Fdeploy (→ databricks-apps). Complements databricks-apps; use it alongside whenever a custom app has a chart, table, KPI, report, or Genie\u002Fchat\u002FAI surface.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4580,4581,4584,4587,4590],{"name":9,"slug":8,"type":15},{"name":4582,"slug":4583,"type":15},"Design","design",{"name":4585,"slug":4586,"type":15},"Frontend","frontend",{"name":4588,"slug":4589,"type":15},"React","react",{"name":4591,"slug":4592,"type":15},"UI Components","ui-components","2026-07-12T08:04:02.02398",{"slug":4595,"name":4595,"fn":4596,"description":4597,"org":4598,"tags":4599,"stars":23,"repoUrl":24,"updatedAt":4604},"databricks-apps","build applications on Databricks Apps","Build apps on Databricks Apps platform. Use when asked to create data apps, analytics tools, or custom interactive visualizations. A plain \"create a dashboard\" request means a managed AI\u002FBI (Lakeview) dashboard → use databricks-aibi-dashboards, not this skill. Evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4600,4601,4602,4603],{"name":4564,"slug":4565,"type":15},{"name":4567,"slug":4568,"type":15},{"name":4535,"slug":4536,"type":15},{"name":9,"slug":8,"type":15},"2026-07-12T08:03:59.061458",{"slug":4606,"name":4606,"fn":4607,"description":4608,"org":4609,"tags":4610,"stars":23,"repoUrl":24,"updatedAt":4625},"databricks-apps-python","build Python backends for Databricks Apps","Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex. **Default for a new Databricks App is `databricks-apps` (AppKit — Node\u002FTypeScript\u002FReact) — reach for it first.** Use this skill only when the user asks for a Python backend, extends an existing Python app, or the team is Python-only. Covers OAuth auth, app resources, SQL warehouse and Lakebase connectivity, foundation-model \u002F Vector Search \u002F model-serving APIs (via `databricks-python-sdk`), and deployment via CLI or DABs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4611,4612,4615,4618,4621,4622],{"name":9,"slug":8,"type":15},{"name":4613,"slug":4614,"type":15},"FastAPI","fastapi",{"name":4616,"slug":4617,"type":15},"Flask","flask",{"name":4619,"slug":4620,"type":15},"Gradio","gradio",{"name":17,"slug":18,"type":15},{"name":4623,"slug":4624,"type":15},"Streamlit","streamlit","2026-07-12T08:04:10.970845",{"items":4627,"total":3612},[4628,4635,4641,4648,4655,4663,4670,4679,4688,4702,4716,4729],{"slug":4512,"name":4512,"fn":4513,"description":4514,"org":4629,"tags":4630,"stars":23,"repoUrl":24,"updatedAt":4527},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4631,4632,4633,4634],{"name":4518,"slug":4519,"type":15},{"name":9,"slug":8,"type":15},{"name":4522,"slug":4523,"type":15},{"name":4525,"slug":4526,"type":15},{"slug":4529,"name":4529,"fn":4530,"description":4531,"org":4636,"tags":4637,"stars":23,"repoUrl":24,"updatedAt":4541},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4638,4639,4640],{"name":4535,"slug":4536,"type":15},{"name":9,"slug":8,"type":15},{"name":4539,"slug":4540,"type":15},{"slug":4543,"name":4543,"fn":4544,"description":4545,"org":4642,"tags":4643,"stars":23,"repoUrl":24,"updatedAt":4556},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4644,4645,4646,4647],{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":4551,"slug":4552,"type":15},{"name":4554,"slug":4555,"type":15},{"slug":4558,"name":4558,"fn":4559,"description":4560,"org":4649,"tags":4650,"stars":23,"repoUrl":24,"updatedAt":4573},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4651,4652,4653,4654],{"name":4564,"slug":4565,"type":15},{"name":4567,"slug":4568,"type":15},{"name":4570,"slug":4571,"type":15},{"name":9,"slug":8,"type":15},{"slug":4575,"name":4575,"fn":4576,"description":4577,"org":4656,"tags":4657,"stars":23,"repoUrl":24,"updatedAt":4593},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4658,4659,4660,4661,4662],{"name":9,"slug":8,"type":15},{"name":4582,"slug":4583,"type":15},{"name":4585,"slug":4586,"type":15},{"name":4588,"slug":4589,"type":15},{"name":4591,"slug":4592,"type":15},{"slug":4595,"name":4595,"fn":4596,"description":4597,"org":4664,"tags":4665,"stars":23,"repoUrl":24,"updatedAt":4604},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4666,4667,4668,4669],{"name":4564,"slug":4565,"type":15},{"name":4567,"slug":4568,"type":15},{"name":4535,"slug":4536,"type":15},{"name":9,"slug":8,"type":15},{"slug":4606,"name":4606,"fn":4607,"description":4608,"org":4671,"tags":4672,"stars":23,"repoUrl":24,"updatedAt":4625},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4673,4674,4675,4676,4677,4678],{"name":9,"slug":8,"type":15},{"name":4613,"slug":4614,"type":15},{"name":4616,"slug":4617,"type":15},{"name":4619,"slug":4620,"type":15},{"name":17,"slug":18,"type":15},{"name":4623,"slug":4624,"type":15},{"slug":38,"name":38,"fn":4680,"description":4681,"org":4682,"tags":4683,"stars":23,"repoUrl":24,"updatedAt":4687},"configure Databricks CLI and authentication","Databricks CLI operations and the parent\u002Fentry-point skill for Databricks CLI use: authentication, profile selection, and bundles. Load this first for CLI, auth, profile, and bundle tasks, then load the matching product skill. For finding or exploring data, answering questions about the data, or generating SQL, load the databricks-data-discovery skill (it routes to Genie One). Contains up-to-date guidelines for Databricks-related CLI tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4684,4685,4686],{"name":953,"slug":950,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:11:05.45506",{"slug":4442,"name":4442,"fn":4689,"description":4690,"org":4691,"tags":4692,"stars":23,"repoUrl":24,"updatedAt":4701},"manage Databricks Declarative Automation Bundles","Create, configure, validate, deploy, run, and manage Declarative Automation Bundles (DABs, formerly Databricks Asset Bundles). Use when working with Databricks resources via DABs including dashboards, jobs, pipelines, alerts, volumes, and apps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4693,4696,4697,4698],{"name":4694,"slug":4695,"type":15},"Automation","automation",{"name":158,"slug":155,"type":15},{"name":9,"slug":8,"type":15},{"name":4699,"slug":4700,"type":15},"Deployment","deployment","2026-07-15T05:41:35.930355",{"slug":4703,"name":4703,"fn":4704,"description":4705,"org":4706,"tags":4707,"stars":23,"repoUrl":24,"updatedAt":4715},"databricks-data-discovery","discover and query Databricks data","Discover, explore, and query Databricks data via Genie — the CLI equivalent of the Genie One MCP. MUST be invoked whenever the user asks to find or locate data ('what tables are in X', 'where does X live', 'which catalog\u002Fschema has Y'), answer a natural-language question about the data, or write a SQL query.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4708,4709,4712,4713],{"name":4535,"slug":4536,"type":15},{"name":4710,"slug":4711,"type":15},"Data Engineering","data-engineering",{"name":9,"slug":8,"type":15},{"name":4714,"slug":838,"type":15},"SQL","2026-07-31T05:53:32.561877",{"slug":4717,"name":4717,"fn":4718,"description":4719,"org":4720,"tags":4721,"stars":23,"repoUrl":24,"updatedAt":4728},"databricks-dbsql","query and script Databricks SQL warehouses","Databricks SQL (DBSQL) advanced features and SQL warehouse capabilities. This skill MUST be invoked when the user mentions: \"DBSQL\", \"Databricks SQL\", \"SQL warehouse\", \"SQL scripting\", \"stored procedure\", \"CALL procedure\", \"materialized view\", \"CREATE MATERIALIZED VIEW\", \"pipe syntax\", \"|>\", \"geospatial\", \"H3\", \"ST_\", \"spatial SQL\", \"collation\", \"COLLATE\", \"ai_query\", \"ai_classify\", \"ai_extract\", \"ai_gen\", \"AI function\", \"http_request\", \"remote_query\", \"read_files\", \"Lakehouse Federation\", \"recursive CTE\", \"WITH RECURSIVE\", \"multi-statement transaction\", \"temp table\", \"temporary view\", \"pipe operator\". SHOULD also invoke when the user asks about SQL best practices, data modeling patterns, or advanced SQL features on Databricks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4722,4723,4726,4727],{"name":4535,"slug":4536,"type":15},{"name":4724,"slug":4725,"type":15},"Database","database",{"name":9,"slug":8,"type":15},{"name":4714,"slug":838,"type":15},"2026-07-12T08:04:08.678282",{"slug":4730,"name":4730,"fn":4731,"description":4732,"org":4733,"tags":4734,"stars":23,"repoUrl":24,"updatedAt":4742},"databricks-docs","search Databricks documentation","Databricks documentation reference via llms.txt index. Use when other skills do not cover a topic, looking up unfamiliar Databricks features, or needing authoritative docs on APIs, configurations, or platform capabilities.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4735,4736,4739],{"name":9,"slug":8,"type":15},{"name":4737,"slug":4738,"type":15},"Documentation","documentation",{"name":4740,"slug":4741,"type":15},"Reference","reference","2026-07-15T05:41:34.697746"]