Coverage for mindsdb / integrations / handlers / databricks_handler / connection_args.py: 100%
4 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from collections import OrderedDict
3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE
6connection_args = OrderedDict(
7 server_hostname={
8 "type": ARG_TYPE.STR,
9 "description": "The server hostname for the cluster or SQL warehouse.",
10 "required": True,
11 "label": "Server Hostname",
12 },
13 http_path={
14 "type": ARG_TYPE.STR,
15 "description": "The HTTP path of the cluster or SQL warehouse.",
16 "required": True,
17 "label": "HTTP Path",
18 },
19 access_token={
20 "type": ARG_TYPE.STR,
21 "description": "A Databricks personal access token to authenticate the connection.",
22 "required": True,
23 "label": "Access Token",
24 'secret': True
25 },
26 session_configuration={
27 "type": ARG_TYPE.STR,
28 "description": "Additional (key, value) pairs to set as Spark session configuration parameters.",
29 "required": False,
30 "label": "Session Configuration",
31 },
32 http_headers={
33 "type": ARG_TYPE.STR,
34 "description": "Additional (key, value) pairs to set in HTTP headers on every RPC request the connection makes."
35 " This parameter is optional.",
36 "required": False,
37 "label": "HTTP Headers",
38 },
39 catalog={
40 "type": ARG_TYPE.STR,
41 "description": "Catalog to use for the connection.",
42 "required": False,
43 "label": "Catalog",
44 },
45 schema={
46 "type": ARG_TYPE.STR,
47 "description": "Schema (database) to use for the connection.",
48 "required": False,
49 "label": "Schema",
50 },
51)
53connection_args_example = OrderedDict(
54 server_hostname="adb-1234567890123456.7.azuredatabricks.net",
55 http_path="sql/protocolv1/o/1234567890123456/1234-567890-test123",
56 access_token="dapi1234567890ab1cde2f3ab456c7d89efa",
57 schema="sales",
58)