You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, @sandeepkokane! I'm here to help you with your Kylin SQLAlchemy connection issue. Let's squash this bug together! 🐞
There is a similar closed issue regarding the inability to connect Apache Kylin to Superset, but no solution was found in the comments [1].
In your case, the error seems to be related to the KylinSQLCompiler._compose_select_body() function receiving an incorrect number of arguments. This might be an issue with the kylinpy library or its integration with SQLAlchemy. You might want to check if there are any updates or patches available for kylinpy or if there are any known compatibility issues with the version of SQLAlchemy you are using.
Bug description
Facing issue using kylin
i am using latest version using pip install kylinpy as per docs Kylin Connector
Kyligence/kylinpy#56
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
superset_app | 2025-01-02 13:24:49,928:DEBUG:superset.stats_logger:[stats_logger] (incr) test_connection_attempt
superset_app | 2025-01-02 13:24:49,942:DEBUG:superset.models.core:Database._get_sqla_engine(). Masked URL: kylin://ADMIN:XXXXXXXXXX@kylin_server/learn_kylin
superset_app | 2025-01-02 13:24:49,945:DEBUG:superset.stats_logger:[stats_logger] (incr) test_connection_error.DBAPIError
superset_app | 2025-01-02 13:24:49,947:DEBUG:superset.stats_logger:[stats_logger] (incr) DatabaseRestApi.test_connection.error
superset_app | 2025-01-02 13:24:49,947:WARNING:superset.views.error_handling:SupersetErrorsException
superset_app | Traceback (most recent call last):
superset_app | File "/app/superset/commands/database/test_connection.py", line 170, in run
superset_app | raise DBAPIError(ex_str or None, None, None)
superset_app | sqlalchemy.exc.DBAPIError: (builtins.NoneType) None
superset_app | [SQL: KylinSQLCompiler._compose_select_body() takes 7 positional arguments but 9 were given]
superset_app | (Background on this error at: https://sqlalche.me/e/14/dbapi)
superset_app |
superset_app | The above exception was the direct cause of the following exception:
superset_app |
superset_app | Traceback (most recent call last):
superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
superset_app | rv = self.dispatch_request()
superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
superset_app | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
superset_app | File "/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
superset_app | return f(self, *args, **kwargs)
superset_app | File "/app/superset/views/base_api.py", line 119, in wraps
superset_app | duration, response = time_function(f, self, *args, **kwargs)
superset_app | File "/app/superset/utils/core.py", line 1364, in time_function
superset_app | response = func(*args, **kwargs)
superset_app | File "/app/superset/utils/log.py", line 303, in wrapper
superset_app | value = f(*args, **kwargs)
superset_app | File "/app/superset/views/base_api.py", line 91, in wraps
superset_app | return f(self, *args, **kwargs)
superset_app | File "/app/superset/databases/api.py", line 1215, in test_connection
superset_app | TestConnectionDatabaseCommand(item).run()
superset_app | File "/app/superset/commands/database/test_connection.py", line 199, in run
superset_app | raise SupersetErrorsException(errors) from ex
superset_app | superset.exceptions.SupersetErrorsException: [SupersetError(message='(builtins.NoneType) None\n[SQL: KylinSQLCompiler._compose_select_body() takes 7 positional arguments but 9 were given]\n(Background on this error at: https://sqlalche.me/e/14/dbapi)', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Apache Kylin', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
Checklist
The text was updated successfully, but these errors were encountered: