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

Cannot run queries in SQL Lab with a DB that has timestamps #3427

Closed
3 tasks
fatruchir opened this issue Sep 7, 2017 · 5 comments
Closed
3 tasks

Cannot run queries in SQL Lab with a DB that has timestamps #3427

fatruchir opened this issue Sep 7, 2017 · 5 comments

Comments

@fatruchir
Copy link

fatruchir commented Sep 7, 2017

Running a simple select * query on a DB table and getting an error: DatetimeTZDtype' object has no attribute 'char'

  • I have checked the superset logs for python stacktraces and included it here as text if any
Traceback (most recent call last):
  File "/Users/ruchir/venv/lib/python2.7/site-packages/superset/views/core.py", line 2076, in sql_json
    query_id=query_id, return_results=True)
  File "/Users/ruchir/venv/lib/python2.7/site-packages/celery/local.py", line 188, in __call__
    return self._get_current_object()(*a, **kw)
  File "/Users/ruchir/venv/lib/python2.7/site-packages/celery/app/task.py", line 428, in __call__
    return self.run(*args, **kwargs)
  File "/Users/ruchir/venv/lib/python2.7/site-packages/superset/sql_lab.py", line 91, in get_sql_results
    ctask, query_id, return_results, store_results)
  File "/Users/ruchir/venv/lib/python2.7/site-packages/superset/sql_lab.py", line 233, in execute_sql
    'columns': cdf.columns if cdf.columns else [],
  File "/Users/ruchir/venv/lib/python2.7/site-packages/superset/dataframe.py", line 108, in columns
    col_db_type = self.db_type(self.__df.dtypes[col])
  File "/Users/ruchir/venv/lib/python2.7/site-packages/superset/dataframe.py", line 55, in db_type
    return cls.type_map.get(dtype.char)
AttributeError: 'DatetimeTZDtype' object has no attribute 'char'

Superset version

0.19.1

Expected results

Should return result of SQL query

Actual results

Getting Error: 'DatetimeTZDtype' object has no attribute 'char'

Steps to reproduce

Run any query on a DB which has a timestamptz column type

@xrmx
Copy link
Contributor

xrmx commented Sep 7, 2017

Still this looks very much like a duplicate of #2791. No need to track the same issue twice

@fabianmenges
Copy link
Contributor

This should be fixed #2937

@fatruchir
Copy link
Author

Still getting this issue after #2937 was merged

@fatruchir
Copy link
Author

Trying to query a PostgreSQL DB

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 200 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

4 participants