You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/01 12:53:01 UTC

[GitHub] [incubator-superset] lilila opened a new issue #10218: Preserve Column Order in Table CSV Export

lilila opened a new issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218


   I am experiencing this new issue with superset 36. 
   
   I am pretty sure in the previous versions of superset Table exported in CSV had column order preserved. 
   I also have trouble exporting CSV data with 'latin-1' encoding, which I did not have before 
   
   Is this possible or I am dreaming and it never worked ? :/  


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] lilila commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
lilila commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-672884854


   I come back on this issue, the problem is still not resolved with superset 37. 
   Here is an example : 
   
   The chart : 
   
   <img width="856" alt="Screenshot 2020-08-12 at 15 46 45" src="https://user-images.githubusercontent.com/607430/90022746-31bdcb00-dcb3-11ea-86c0-f29c9165d45e.png">
   
   and the CSV export : 
   
   <img width="716" alt="Screenshot 2020-08-12 at 15 46 50" src="https://user-images.githubusercontent.com/607430/90022814-4306d780-dcb3-11ea-8b00-9f008b3419a0.png">
   
   
   As you can see, the columns' order is modified and additionally the names of the columns were replaced by the variables :(


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] lilila commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
lilila commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675389725


   I found out the problem (at least for the table export) comes from this line :
   https://github.com/apache/incubator-superset/blob/ca9ca995109ee5251918b9df60980bffaf9b9a24/superset/viz.py#L325
   
   
   The set function does not preserve the original order , I have seen this `list(set( .... ))` or `set(gb)` in many places in the via.py file. 
   Is there any better way to preserve unicity in columns and make sure there is no duplicate? 
   
    
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] michalgala commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
michalgala commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-673166273


   I have the same issue, and it can be quite annoying for tables with many columns


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] michalgala edited a comment on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
michalgala edited a comment on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675463072


   As a quick fix you could use:
   
   `sorted(list(gb + columns), key=list(gb + columns).index)`
   However, there might be some performance issues if you have many columns.
   
   OR
   
   `list(dict.fromkeys(list(gb + columns)).keys())`
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] michalgala edited a comment on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
michalgala edited a comment on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675463072


   As a quick fix you could use:
   
   `sorted(list(l1+l2), key=list(l1+l2).index)`
   
   However, there might be some performance issues if you have many columns.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro closed issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
villebro closed issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] lilila edited a comment on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
lilila edited a comment on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675389725


   I found out the problem (at least for the table export) comes from this line :
   https://github.com/apache/incubator-superset/blob/ca9ca995109ee5251918b9df60980bffaf9b9a24/superset/viz.py#L325
   
   
   The set function does not preserve the original order , I have seen this `list(set( .... ))` or `set(gb)` in many places in the viz.py file. 
   Is there any better way to preserve unicity in columns and make sure there is no duplicate? 
   
    
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-652400059


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.59. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] lilila edited a comment on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
lilila edited a comment on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675389725


   I found out the problem (at least for the table export) comes from this line :
   https://github.com/apache/incubator-superset/blob/ca9ca995109ee5251918b9df60980bffaf9b9a24/superset/viz.py#L325
   
   
   The set function does not preserve the original order , I have seen this `list(set( .... ))` or `set(gb)` in many places in the viz.py file. 
   Is there any better way to preserve columns' order and make sure there is no duplicate? 
   
    
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] JunlinC commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
JunlinC commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-697945317


   Hi Lila, our team mentioned that you have been providing valuable product feedbacks and requests in the community. I would like to invite you to join Superset new designated user panels. I couldn't find you on Slack, would you mind sharing your email with me and I can share more info with you if you are interested. Thanks! @lilila 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] michalgala commented on issue #10218: Preserve Column Order in Table CSV Export

Posted by GitBox <gi...@apache.org>.
michalgala commented on issue #10218:
URL: https://github.com/apache/incubator-superset/issues/10218#issuecomment-675463072


   As a quick fix you could use:
   
   `concat_list = gb+columns`
   `sorted(set(concat_list), key=concat_list.index)`
   
   However, there might be some performance issues if you have many columns.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org