Problem with Teradata Database
See original GitHub issueFrom the Official Documentation it clearly stated that the recommended connector library is sqlalchemy-teradata. As far as I know this library is no longer maintained since last commit on its github page is on Jul 14, 2018. Furthermore Teradata has other SQL Driver Dialect for SQLAlchemy which is always updated until now, the last version is on Jun 16, 2020, that is teradatasqlalchemy. There are some advantage with teradatasqlalchemy. This library require no ODBC connector, and it patch up sqlalchemy-teradata on its inability to adding table data source from another schema. Okay. I tried using teradatasqlalchemy, running on SQL Lab, and this problem happen.
Expected results
SQL Lab show table result as usual.
Actual results
base error: [Version 17.0.0.6] [Session 288395] [Teradata Database] [Error 3706] Syntax error: expected something between the word 'PENERIMAAN' and the 'LIMIT' keyword. at gosqldriver/teradatasql.
Screenshots
The complete Error Message
How to reproduce the bug
- Create Database Source using teradatasqlalchemy library connector.
- Go to SQL Lab and try some queries.
- Run.
Environment
- superset version:
Superset 0.37.2
- python version:
Python 3.8.5
- node.js version:
node -v
- npm version:
npm -v
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- [v] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [v] I have reproduced the issue with at least the latest released version of superset.
- [v] I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
I think this error raised because in Teradata, you don’t do LIMIT
to limiting the row result, but you use SAMPLE
instead.
This is some additional log.
Triggering query_id: 84
INFO:superset.views.core:Triggering query_id: 84
/home/bram/pysuperset/lib/python3.8/site-packages/sqlalchemy/sql/sqltypes.py:661: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage.
util.warn(
timeout can't be used in the current context
WARNING:superset.utils.core:timeout can't be used in the current context
signal only works in main thread
Traceback (most recent call last):
File "/home/bram/pysuperset/lib/python3.8/site-packages/superset/utils/core.py", line 624, in __enter__
signal.signal(signal.SIGALRM, self.handle_timeout)
File "/usr/lib/python3.8/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
ERROR:superset.utils.core:signal only works in main thread
Traceback (most recent call last):
File "/home/bram/pysuperset/lib/python3.8/site-packages/superset/utils/core.py", line 624, in __enter__
signal.signal(signal.SIGALRM, self.handle_timeout)
File "/usr/lib/python3.8/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
INFO:werkzeug:127.0.0.1 - - [23/Oct/2020 10:14:22] "GET /superset/queries/1603419084426.791 HTTP/1.1" 200 -
SQLite Database support for metadata databases will be removed in a future version of Superset.
WARNING:superset.sql_lab:SQLite Database support for metadata databases will be removed in a future version of Superset.
Query 84: Executing 1 statement(s)
INFO:superset.sql_lab:Query 84: Executing 1 statement(s)
Query 84: Set query to 'running'
INFO:superset.sql_lab:Query 84: Set query to 'running'
Query 84: Running statement 1 out of 1
INFO:superset.sql_lab:Query 84: Running statement 1 out of 1
Query 84: <class 'teradatasql.OperationalError'>
ERROR:superset.sql_lab:Query 84: <class 'teradatasql.OperationalError'>
INFO:werkzeug:127.0.0.1 - - [23/Oct/2020 10:14:24] "POST /superset/sql_json/ HTTP/1.1" 500 -
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
@cwiebe18 thanks for the contribution and sorry for not getting to it earlier. @mccushjack do you mind addressing the comment from @betodealmeida and move the pr forward? thanks!!