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

ClickHouse connection issue after upgrading to 2.1.0 #255

Open
xRomZak opened this issue May 2, 2023 · 1 comment
Open

ClickHouse connection issue after upgrading to 2.1.0 #255

xRomZak opened this issue May 2, 2023 · 1 comment

Comments

@xRomZak
Copy link

xRomZak commented May 2, 2023

URL format: clickhouse+native://.... (was ok before upgrade)

[ImportError: cannot import name '_literal_as_label_reference'
...
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 122, in wraps
    raise ex
  File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 113, in wraps
    duration, response = time_function(f, self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/superset/utils/core.py", line 1586, in time_function
    response = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/superset/utils/log.py", line 266, in wrapper
    value = f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 85, in wraps
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/superset/databases/api.py", line 865, in test_connection
    TestConnectionDatabaseCommand(item).run()
  File "/usr/local/lib/python3.8/site-packages/superset/databases/commands/test_connection.py", line 229, in run
    raise DatabaseTestConnectionUnexpectedError(errors) from ex
superset.databases.commands.exceptions.DatabaseTestConnectionUnexpectedError: [SupersetError(message="cannot import name '_literal_as_label_reference' from 'sqlalchemy.sql.elements' (/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py)", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'ClickHouse', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]

I tried to connect by clickhousedb:// defined on wiki, but got an another error: superset.databases.commands.exceptions.DatabaseTestConnectionDriverError: Could not load database driver: ClickHouseConnectEngineSpec

@amancevice
Copy link
Owner

you might want to play with upgrading the pip for clickhouse. If you find a version that works, please open a PR and we'll upgrade it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants