superset: superset.exceptions.SupersetErrorsException: [SupersetError(message='questdb error: QuestDbEngineSpec.execute() takes 3 positional arguments but 4 were given', error_type=, level=, extra={'engine_name': 'QuestDB', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error

Bug description

Hi try this integrate superset docker version with QuestDB as explain here: https://questdb.io/docs/third-party-tools/superset/

after start docker and add database when i run simple select query got this error:

Here is the error that i’ve got in superset webui:

QuestDB Error
questdb error: QuestDbEngineSpec.execute() takes 3 positional arguments but 4 were given
This may be triggered by:
Issue 1002 - The database returned an unexpected error. 

Here is the log:

superset_app          | 2024-08-21 06:15:19,877:WARNING:superset.views.error_handling:SupersetErrorsException
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/views/base_api.py", line 91, in wraps
superset_app          |     return f(self, *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/sqllab/api.py", line 409, in execute_sql_query
superset_app          |     command_result: CommandResult = command.run()
superset_app          |   File "/app/superset/utils/decorators.py", line 266, in wrapped
superset_app          |     return on_error(ex)
superset_app          |   File "/app/superset/utils/decorators.py", line 236, in on_error
superset_app          |     raise ex
superset_app          |   File "/app/superset/utils/decorators.py", line 259, in wrapped
superset_app          |     result = func(*args, **kwargs)
superset_app          |   File "/app/superset/commands/sql_lab/execute.py", line 106, in run
superset_app          |     status = self._run_sql_json_exec_from_scratch()
superset_app          |   File "/app/superset/commands/sql_lab/execute.py", line 161, in _run_sql_json_exec_from_scratch
superset_app          |     return self._sql_json_executor.execute(
superset_app          |   File "/app/superset/sqllab/sql_json_executer.py", line 113, in execute
superset_app          |     raise SupersetErrorsException(
superset_app          | superset.exceptions.SupersetErrorsException: [SupersetError(message='questdb error: QuestDbEngineSpec.execute() takes 3 positional arguments but 4 were given', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'QuestDB', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]



gunicorn 22.0.0
questdb-connect==1.0.12
Redis version=7.4.0
PostgreSQL 15.8 (Debian 15.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
celery@d41d4bb1f20b v5.4.0 (opalescent)
Linux-5.14.0-70.13.1.el9_0.x86_64-x86_64-with-glibc2.36 (edited) 

How to reproduce the bug

…

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

In our case we have not passed the password properly, the thing is we have to pass the password / all values as URL encoded if at all it has special characters like ` @#$%^&*()!~.,/', ect., Most cases or in our case we have special characters in password.

Read More about this Here in the - SQLAlchemy 2.0 Documentation

Sample connection string looks like mssql+pymssql://test:test%40123@localhost:1433/sampledb Here the password is test@123 which is turned into test%40123 by doing URL encoding.

Sample code to encode a URL using python is,

import urllib.parse

print(urllib.parse.quote_plus('test@123'))

# which will result
# test%40123
# %40 -means @

Actually the error code 20009 means more, see here. By This any error on the database side like database not found, login failed, timeout, or any error from MSSqlServer will be informed with 20009.

Do a sample python program to validate is that connection able to be made to the destination machine. I tried to find the error codes page, couldn’t be able to find it, anyone has that information which will help please post here.

Now its resolved, thank you to @kalai-logicsoft