You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2017/10/23 07:50:21 UTC

[GitHub] rumbin opened a new issue #3704: [SQLLab] datetime columns interpreted as strings when exporting _cached_ result to CSV

rumbin opened a new issue #3704: [SQLLab] datetime columns interpreted as strings when exporting _cached_ result to CSV
URL: https://github.com/apache/incubator-superset/issues/3704
 
 
   ### Foreword
   I reported this issue in #3695, together with a related one.
   As I found out that the two are not as closely related as I thought, I decided to split them...
   
   ### Superset version
   0.20.4
   
   ### Expected results
   Datetime columns are interpreted and formatted correcty when exporting a _cached_ query result as CSV.
   
   ### Actual results
   The datetime columns are, when fetched from the cache, interpreted as string/object. When exporting the data to CSV, any `date_format` setting in the `CSV_EXPORT` options is without effect.
   
   Even if no `date_format` is specified, the fromat of timestamps differd from the one obtained from CSV exports that are created without caching, as the default export fromat from pandas' `to_csv` method separates date and time with a space instead of a `T`. The latter is what is obtained when exporting the results from cache.
   
   One major drawback of this issue is that MS Excel cannot _automatically_ deal with ISO timestamps which feature the `T` separator between date and time. Unfortunately, I think that we have to adapt to this embarassing inability of Excel.
   
   ### Steps to reproduce
   Have a cache backend configured for superset (here: Redis) and execute and then export the following query:
   ```
   select now()::timestamp as my_timestamp
   ```
   
   

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