You can use the Get operation of the SQL Analytics REST API (maybe together with List
) - it returns the JDBC connection string as a part of response (jdbc_url
field):
{
"id": "123456790abcdef",
"name": "My SQL endpoint",
"cluster_size": "Medium",
"min_num_clusters": 1,
"max_num_clusters": 10,
"auto_stop_mins": 30,
"num_clusters": 5,
"num_active_sessions": 30,
"state": "RUNNING",
"creator_name": "[email protected]",
"jdbc_url":"jdbc:spark://<databricks-instance>:443/default;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/protocolv1/o/0123456790abcdef;",
"odbc_params": {
"host": "<databricks-instance>",
"path": "/sql/protocolv1/o/0/123456790abcdef",
"protocol": "https",
"port": 443
}
}
HTTP Path is also there, as path
part of the odbc_params
object.
{"error_code":"FEATURE_DISABLED","message":"SQL Gateway is not supported for Org XXXX}
Why listing endpoints is in preview? – Algid