Trying to connect Apache Superset 1.3 with Trino/Presto using Kerberos. Able to successfully install the plugins using pip install pyhive['presto']==0.6.2, also tried other versions.
When tried doing a connection test, I get the following error
[SupersetError(message='(builtins.NoneType) None\n(Background on this error at: http://sqlalche.me/e/13/dbapi)', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error' >, extra={'engine_name': 'Presto', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})] 2021-09-03 10:22:54,708:WARNING:superset.views.base:[SupersetError(message='(builtins.NoneType) None\n(Background on this error at: http://sqlalche.me/e/13/dbapi)', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC _DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Presto', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error
I tried this configuration in my engine_params
"kerberos_principal" : "[email protected]", "requests_kwargs": {"verify":""}}}
Superset documentation states that this is an issue with the backend DB i.e. Presto https://superset.apache.org/docs/miscellaneous/issue-codes
There is absolutely no issue making this work with LDAP i.e. username:password The problem is only using kerberos.
To debug this further, from python and SQLAlchemy layer, I tried these steps Works flawlessly with LDAP
>>> from sqlalchemy import *
>>> from sqlalchemy.engine import create_engine
>>> from sqlalchemy.schema import *
>>> engine = create_engine('presto://myuser:mypassword@presto-coordinator:8080/hive/default', connect_args={'protocol': 'https','port' : 8080,'auth':'Kerberos','Kerberos_Config_Path':'/etc/krb5.conf','Kerberos_Keyta
b_Path':'/opt/superset/mykeytab.keytab','Kerberos_Principal':'[email protected]','Kerberos_Remote_Service_Name':'presto'})
However, one after another, we keep getting error where the kerberos specific properties are 'unknown', starts with "auth" and then complains about all kerberos keys i.e., 'kerberos_principal', 'kerberos_config_path' etc.
Traceback (most recent call last):
File "/opt/app-root/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1204, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/opt/app-root/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 1044, in _init_statement
self.cursor = self.create_cursor()
File "/opt/app-root/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 1177, in create_cursor
return self._dbapi_connection.cursor()
File "/opt/app-root/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 1000, in cursor
return self.connection.cursor(*args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/pyhive/presto.py", line 67, in cursor
return Cursor(*self._args, **self._kwargs)
TypeError: __init__() got an unexpected keyword argument 'auth'
Can someone share if you've had similar experience ??