Coverage for mindsdb / integrations / handlers / snowflake_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 account={
8 "type": ARG_TYPE.STR,
9 "description": "The Snowflake account identifier.",
10 "required": True,
11 "label": "Account",
12 },
13 user={
14 "type": ARG_TYPE.STR,
15 "description": "The user name used to authenticate with the Snowflake account.",
16 "required": True,
17 "label": "User",
18 },
19 password={
20 "type": ARG_TYPE.PWD,
21 "description": "The password to authenticate the user with the Snowflake account. Required for password authentication.",
22 "required": False,
23 "label": "Password",
24 "secret": True,
25 },
26 private_key_path={
27 "type": ARG_TYPE.PATH,
28 "description": "Path to the private key file for key pair authentication. Required for key pair authentication.",
29 "required": False,
30 "label": "Private Key Path",
31 },
32 private_key={
33 "type": ARG_TYPE.PWD,
34 "description": "PEM-formatted private key content for key pair authentication. Use when the key cannot be stored on disk.",
35 "required": False,
36 "label": "Private Key",
37 "secret": True,
38 },
39 private_key_passphrase={
40 "type": ARG_TYPE.PWD,
41 "description": "Optional passphrase for the encrypted private key.",
42 "required": False,
43 "label": "Private Key Passphrase",
44 "secret": True,
45 },
46 database={
47 "type": ARG_TYPE.STR,
48 "description": "The database to use when connecting to the Snowflake account.",
49 "required": True,
50 "label": "Database",
51 },
52 schema={
53 "type": ARG_TYPE.STR,
54 "description": "The schema to use when connecting to the Snowflake account.",
55 "required": False,
56 "label": "Schema",
57 },
58 warehouse={
59 "type": ARG_TYPE.STR,
60 "description": "The warehouse to use when executing queries on the Snowflake account.",
61 "required": False,
62 "label": "Warehouse",
63 },
64 role={
65 "type": ARG_TYPE.STR,
66 "description": "The role to use when executing queries on the Snowflake account.",
67 "required": False,
68 "label": "Role",
69 },
70 auth_type={
71 "type": ARG_TYPE.STR,
72 "description": 'Required authentication type. Options: "password" or "key_pair".',
73 "required": True,
74 "label": "Auth Type",
75 },
76)
78connection_args_example = OrderedDict(
79 account="abcxyz-1234567", user="user", password="password", database="test", auth_type="password"
80)