You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/09/07 14:30:40 UTC

[GitHub] fatruchir opened a new issue #3427: Cannot run queries in SQL Lab with a DB that has timestamps

fatruchir opened a new issue #3427: Cannot run queries in SQL Lab with a DB that has timestamps
URL: https://github.com/apache/incubator-superset/issues/3427
 
 
   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'
   ```
   - [ ] I have reproduced the issue with at least the latest released version of superset
   Yes
   - [ ] I have checked the issue tracker for the same issue and I haven't found one similar
   Found this: https://github.com/apache/incubator-superset/issues/2791 but does not address how to deal with situation when the DB table already exists
   
   ### 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
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services