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

sql lab function DATE_TRUNC - error #2589

Closed
bbs2009 opened this issue Apr 11, 2017 · 1 comment
Closed

sql lab function DATE_TRUNC - error #2589

bbs2009 opened this issue Apr 11, 2017 · 1 comment

Comments

@bbs2009
Copy link

bbs2009 commented Apr 11, 2017

Make sure these boxes are checked before submitting your issue - thank you!

  • [+] I have checked the superset logs for python stacktraces and included it here as text if any
  • [+] I have reproduced the issue with at least the latest released version of superset
  • [+] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

{"GIT_SHA": "", "version": "0.17.4"}

Expected results

Actual results

in sql lab
default

in console

2017-04-11 13:20:07,929:INFO:root:SELECT DATE_TRUNC('day', "DATEPARSING") AS __timestamp from marks limit 1
2017-04-11 13:20:07,934:INFO:root:Handling cursor
2017-04-11 13:20:07,938:INFO:root:Fetching data: {'changedOn': datetime.datetime(2017, 4, 11, 10, 20, 8), 'changed_on': '2017-04-11T10:20:08', 'dbId': 4, 'db': 'postgre', 'endDttm': None, 'errorMessage': None, 'executedSql': 'SELECT DATE_TRUNC(\'day\', "DATEPARSING") AS __timestamp from marks limit 1', 'id': 'rkYa675pl', 'limit': 1000000, 'progress': 0, 'rows': None, 'schema': 'public', 'ctas': False, 'serverId': 321, 'sql': 'SELECT DATE_TRUNC(\'day\', "DATEPARSING") AS __timestamp from marks limit 1', 'sqlEditorId': 'rkPz_Tj2x', 'startDttm': Decimal('1491906007825.750000'), 'state': 'running', 'tab': 'Untitled Query 2', 'tempTable': '', 'userId': 1, 'user': 'admin', 'limit_reached': False, 'resultsKey': None}
2017-04-11 13:20:07,950:ERROR:root:zip argument #2 must support iteration
Traceback (most recent call last):
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/superset/views/core.py", line 1994, in sql_json
    query_id=query_id, return_results=True)
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/celery/local.py", line 188, in __call__
    return self._get_current_object()(*a, **kw)
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/celery/app/task.py", line 420, in __call__
    return self.run(*args, **kwargs)
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/superset/sql_lab.py", line 178, in get_sql_results
    'data': cdf.data if cdf.data else [],
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/superset/dataframe.py", line 50, in data
    return self.__df.to_dict(orient='records')
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/pandas/util/decorators.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/pandas/core/frame.py", line 857, in to_dict
    for row in self.values]
  File "/data/work/virtualenvs/superset3/lib/python3.6/site-packages/pandas/core/frame.py", line 857, in <listcomp>
    for row in self.values]
TypeError: zip argument #2 must support iteration

in pgadmin4

default

Steps to reproduce

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 376 days. Feel free to comment and request for this issue to be reopened.

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