You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fairchilddb (via GitHub)" <gi...@apache.org> on 2025/02/27 12:50:21 UTC
[I] Can not add oceanbase database when SQLALCHEMY URL contains tenant information [superset]
fairchilddb opened a new issue, #32409:
URL: https://github.com/apache/superset/issues/32409
### Bug description
please help!
superset version 4.1.1
OceanBase version 3.1.4
SQLALCHEMY URL should be
oceanbase://@#:@:/[?key=value&key=value...]
Stacktrace
Traceback (most recent call last):
File "/root/superset/lib64/python3.9/site-packages/superset/commands/database/test_connection.py", line 170, in run
raise DBAPIError(ex_str or None, None, None)
sqlalchemy.exc.DBAPIError: (builtins.NoneType) None
[SQL: '>=' not supported between instances of 'NoneType' and 'tuple']
(Background on this error at: https://sqlalche.me/e/14/dbapi)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/superset/lib64/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/root/superset/lib64/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/root/superset/lib64/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
return f(self, *args, **kwargs)
File "/root/superset/lib64/python3.9/site-packages/superset/views/base_api.py", line 119, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/root/superset/lib64/python3.9/site-packages/superset/utils/core.py", line 1364, in time_function
response = func(*args, **kwargs)
File "/root/superset/lib64/python3.9/site-packages/superset/utils/log.py", line 303, in wrapper
value = f(*args, **kwargs)
File "/root/superset/lib64/python3.9/site-packages/superset/views/base_api.py", line 91, in wraps
return f(self, *args, **kwargs)
File "/root/superset/lib64/python3.9/site-packages/superset/databases/api.py", line 1215, in test_connection
TestConnectionDatabaseCommand(item).run()
File "/root/superset/lib64/python3.9/site-packages/superset/commands/database/test_connection.py", line 199, in run
raise SupersetErrorsException(errors) from ex
superset.exceptions.SupersetErrorsException: [SupersetError(message="(builtins.NoneType) None\n[SQL: '>=' not supported between instances of 'NoneType' and 'tuple']\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': 'OceanBase', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
### Screenshots/recordings
_No response_
### Superset version
4.1.1
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Can not add oceanbase database when SQLALCHEMY URL contains tenant information [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #32409: Can not add oceanbase database when SQLALCHEMY URL contains tenant information
URL: https://github.com/apache/superset/issues/32409
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Can not add oceanbase database when SQLALCHEMY URL contains tenant information [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32409:
URL: https://github.com/apache/superset/issues/32409#issuecomment-2687878105
<!-- Answer -->
I found a similar unsolved discussion regarding the inability to add an OceanBase database when the SQLALCHEMY URL contains tenant information. You can view the discussion [here](https://github.com/apache/superset/discussions/32390) <sup>[[1]](https://github.com/apache/superset/discussions/32390)</sup>.
For the SQLALCHEMY URL, ensure it is correctly formatted as follows:
```
oceanbase://<User>:<Password>@<Host>:<Port>/<Database>
```
If tenant information is required, it should be included in the query parameters section of the URL, like this:
```
oceanbase://<User>:<Password>@<Host>:<Port>/<Database>?tenant=<TenantName>
```
The error you're encountering, related to a `NoneType` comparison, suggests there might be an issue with the database connection or the SQL expression being executed. Ensure that the SQLALCHEMY URL is correctly formatted and that the OceanBase database is properly set up to handle the requested operations <sup>[[2]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/oceanbase.py)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8e26a96f-d046-4b9f-80c0-1b9f0e82ce5f?feedback_type=other)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Can not add oceanbase database when SQLALCHEMY URL contains tenant information [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32409:
URL: https://github.com/apache/superset/issues/32409#issuecomment-2938292870
Was the bot right about the URL param?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Can not add oceanbase database when SQLALCHEMY URL contains tenant information [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32409:
URL: https://github.com/apache/superset/issues/32409#issuecomment-3948583015
Closing this one out due to inactivity — it's been a while since we asked about the URL parameter workaround and we haven't heard back. Totally understandable if priorities shifted!
If this is still an issue, please don't hesitate to reopen this or file a new issue with any additional details. Happy to help if you're still running into trouble with OceanBase tenant URLs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org