Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kylin SQLAlchemy connection issue #31684

Open
2 of 3 tasks
sandeepkokane opened this issue Jan 2, 2025 · 2 comments
Open
2 of 3 tasks

Kylin SQLAlchemy connection issue #31684

sandeepkokane opened this issue Jan 2, 2025 · 2 comments
Labels
data:connect:kylin Related to Kylin

Comments

@sandeepkokane
Copy link

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

398908124-ccbe777d-d02d-49fd-8958-50a736502f7b

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

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Jan 2, 2025

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.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the data:connect:kylin Related to Kylin label Jan 2, 2025
@rusackas
Copy link
Member

rusackas commented Jan 3, 2025

@zhaoyongjie might have some ideas here :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:connect:kylin Related to Kylin
Projects
None yet
Development

No branches or pull requests

2 participants