question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Teradata Database

See original GitHub issue

From 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

image The complete Error Message

How to reproduce the bug

  1. Create Database Source using teradatasqlalchemy library connector.
  2. Go to SQL Lab and try some queries.
  3. 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:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
issue-label-bot[bot]commented, Oct 23, 2020

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

0reactions
junlincccommented, Oct 19, 2021

@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!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Finding and Fixing Problem Queries - Teradata Database
High CPU Use% combined with low REQ I/O accesses. If the CPU divided by the I/0 is > 100, the query is probably...
Read more >
Teradata Database Problem - Teradata Tools and Utilities
If the Teradata Database does not receive the reconnect messages within 20 minutes after it comes back up, it removes the sessions that...
Read more >
17.00 - Resolved Issues - Teradata Tools and Utilities
When connected to a Teradata Database 16.20 instance, and INTERVAL data types are bound to the SQL_C_BINARY type, the driver cannot query INTERVAL...
Read more >
Troubleshoot Problems with Sessions | Teradata Vantage ...
Teradata Vantage™ - Database Administration ... When a session appears idle, it is also referred to as a hung session. Hung sessions can...
Read more >
16.20 - Resolved Issues - Teradata Tools and Utilities
Resolved issues track corrections and updates to Teradata Tools and Utilities software and to documentation affected by the updates.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found