Coverage for mindsdb / integrations / handlers / clickhouse_handler / connection_args.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from collections import OrderedDict 

2 

3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE 

4 

5 

6connection_args = OrderedDict( 

7 protocol={ 

8 "type": ARG_TYPE.STR, 

9 "description": "The protocol to query clickhouse. Supported: native, http, https. Default: native", 

10 "required": False, 

11 "label": "Protocol", 

12 }, 

13 user={ 

14 "type": ARG_TYPE.STR, 

15 "description": "The user name used to authenticate with the ClickHouse server.", 

16 "required": True, 

17 "label": "User", 

18 }, 

19 database={ 

20 "type": ARG_TYPE.STR, 

21 "description": "The database name to use when connecting with the ClickHouse server.", 

22 "required": True, 

23 "label": "Database name", 

24 }, 

25 host={ 

26 "type": ARG_TYPE.STR, 

27 "description": "The host name or IP address of the ClickHouse server. NOTE: use '127.0.0.1' instead of 'localhost' to connect to local server.", 

28 "required": True, 

29 "label": "Host", 

30 }, 

31 port={ 

32 "type": ARG_TYPE.INT, 

33 "description": "The TCP/IP port of the ClickHouse server. Must be an integer.", 

34 "required": True, 

35 "label": "Port", 

36 }, 

37 password={ 

38 "type": ARG_TYPE.PWD, 

39 "description": "The password to authenticate the user with the ClickHouse server.", 

40 "required": True, 

41 "label": "Password", 

42 "secret": True, 

43 }, 

44 verify={ 

45 "type": ARG_TYPE.BOOL, 

46 "description": "Controls certificate verification in https protocol. Possible choices: true/false. Default is true.", 

47 "required": False, 

48 "label": "SSL Verification", 

49 }, 

50) 

51 

52connection_args_example = OrderedDict( 

53 protocol="native", host="127.0.0.1", port=9000, user="root", password="password", database="database", verify=True 

54)