rumbin opened a new issue #3695: [CSV export] Regression: Inconsistent 
formatting of arrays and timestamps: Explore vs SQLLab
URL: https://github.com/apache/incubator-superset/issues/3695
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if any
   - [x] I have reproduced the issue with at least the latest released version 
of superset
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar
   
   
   ### Superset version
   0.20.4
   
   If relevant: Database is PostgreSQL 9.6
   
   ### Expected results
   * CSV-exports of identical data do not differ, regardless whether the export 
has been invoked from SQLLab or from a slice or dashboard.
   * The format of timestamps can be influenced by passing an appropriate 
`date_format` option in the `CSV_EXPORT` options
   
   ### Actual results
   * By default, the timestamps are formatted as follows:
       * from SQLLab: e.g., `2017-10-19T15:24:05.365260`
       * from Explore: e.g., `2017-10-19 15:24:05.365260`
       * in superset 0.15.4: consistently `2017-10-19 15:24:05.365260`
   * Setting a different timestamp format, e.g., `'date_format:' '%Y-%m-%d 
%H:%M'` has no effect on the SQLLab export, while the Explore export respects 
this option. However, setting a different field separator `'sep': ';'` affects 
_both_ export paths equivalently.
   
   * Arrays (here a text array) are by default formatted as follows:
       * from SQLLab: e.g., `"['a', 'b', 'c']"`
       * from Explore: e.g., `"[""a"", ""b"", ""c""]"`
       * in superset 0.15.4: _consistently_ `"[a, b, c]"`
   * Setting `sep=';'` slightly lowers the unease about the array quoting for 
the SQLLab export but still does not yield the same results:
       * from SQLLab: e.g., `['a', 'b', 'c']`
       * from Explore: e.g., `"[""a"", ""b"", ""c""]"`
   
   ### Steps to reproduce
   Here is a dummy query:
   ```
   select 
   'text with spaces, and comma; and semicolon' as text_with_spaces,
   'text_no_spaces' as text_no_spaces,
   ARRAY[1,2,3]::int[] as intarray,
   ARRAY[1,2.0,3.1]::numeric[] as numarray,
   ARRAY['a','b','c'] as txtarray,
   ARRAY['a','b','c']::text[] as txtarray_cast,
   now()::timestamp as timestamp_cast
   ```
   
   I intentionally added quite a lot of type-casting just to make it crystal 
clear...
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to