Buckets:

download
raw
1.07 kB
#!/usr/bin/env python3
"""Test Databricks connection with environment variables."""
from src.integration.databricks.client import DatabricksClient
def test_connection():
print("šŸ” Testing Databricks SDK client with environment variables...")
try:
client = DatabricksClient()
clusters = client.list_clusters()
print(f"āœ… Connection successful! Found {len(clusters)} clusters")
# Show cluster details
for cluster in clusters[:3]: # Show first 3
cluster_name = cluster.get("cluster_name", "Unknown")
state = cluster.get("state", "Unknown")
print(f" - {cluster_name} ({state})")
return True
except Exception as e:
print(f"āŒ Connection failed: {e}")
print("\nšŸ’” To fix this:")
print("1. Set DATABRICKS_HOST environment variable")
print("2. Set DATABRICKS_TOKEN environment variable")
print("3. Optional: Set DATABRICKS_HTTP_PATH for SQL connector")
return False
if __name__ == "__main__":
test_connection()

Xet Storage Details

Size:
1.07 kB
Ā·
Xet hash:
9a483511ea3a6e5a0af7952dfff90bb4bc9a9d95bd4608a0804f2ddf00ac9ce4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.