You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by BruceXu1991 <gi...@git.apache.org> on 2017/09/27 10:57:34 UTC

[GitHub] zeppelin pull request #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV d...

GitHub user BruceXu1991 opened a pull request:

    https://github.com/apache/zeppelin/pull/2601

    [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data will get unexpected division when the column value contains both delimiter and quotation mark.

    ### What is this PR for?
    Fix for ZEPPELIN-2956. This PR is to deal with the case when column value contains both delimiter and quotation mark. So the downloaded data can be well recogized and seperated by Excel.
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    None
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-2956
    
    ### How should this be tested?
    Manual test.
    After applying this PR, you can test the patch as following steps:
    1、suppose one of the column value contain both  delimiter and quotation mar:  
    eg: hello  beijing  i  lo"v,"e  you
    2、download the data as csv/tsv file
    3、open the data file through Excel
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update?
    no
    * Is there breaking changes for older versions?
    no
    * Does this needs documentation?
    no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceXu1991/zeppelin fix_csv_tsv_download_bug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2601.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2601
    
----
commit d9485bd7a8d4ccce712d7ac2de31dcbb3173caba
Author: xu.wenchun <xu...@immomo.com>
Date:   2017-09-27T10:28:07Z

    fix bug: Excel can't seperate csv/tsv data well

----


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    ok, I will do it.


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @1ambda  If the table library in #2323 could deal with the problem of downloading column value both contain delimiter and quotation mark, It may be better to use library.


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    I tryed again, but CI test failed job 6.4, and I could not figure out what the error means.
    https://travis-ci.org/BruceXu1991/zeppelin/jobs/281177302 


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    After merging to master, CI tests still have some exception, but the exception seems have no relation with this patch.
    
    > job 7.2 https://travis-ci.org/BruceXu1991/zeppelin/jobs/281329390
    > job 7.3 https://travis-ci.org/BruceXu1991/zeppelin/jobs/281329391
    
    
    ```
    Failed: No element found using locator: By(xpath, //div[@class="new-paragraph" and @ng-click="insertNew('below');"])
    
    15:11:48,992 ERROR org.apache.spark.scheduler.LiveListenerBus:91 - Listener  threw an exception
    java.lang.NullPointerException
    	at org.apache.zeppelin.spark.Utils.getNoteId(Utils.java:156)
    	at org.apache.zeppelin.spark.SparkInterpreter$1.onJobStart(SparkInterpreter.java:189)
    	at org.apache.spark.scheduler.SparkListenerBus$class.doPostEvent(SparkListenerBus.scala:37)
    	at org.apache.spark.scheduler.LiveListenerBus.doPostEvent(LiveListenerBus.scala:36)
    ```


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @BruceXu1991 Right, https://github.com/apache/zeppelin/pull/2603 fix CI job 6.4 error.
    You can try merge master and see if CI becomes green!


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by Tagar <gi...@git.apache.org>.
Github user Tagar commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    > I believe one could remove old button "Download Data as CSV".
    
    filed https://issues.apache.org/jira/browse/ZEPPELIN-3511 to remove old export csv/tsv 
    
    This idea was also briefly discussed on [PR-2971](https://github.com/apache/zeppelin/pull/2971#issuecomment-391219166) 


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @BruceXu1991 I think that's fair. @1ambda what do you think?


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @Tagar  Yes, ZEPPELIN-2956 and ZEPPELIN-1803 point to the same issue. RFC-4180 explains the issue.


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    could you setup CI tests
    https://zeppelin.apache.org/contribution/contributions.html#continuous-integration



---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @mebelousov   OK, I will close this PR.


---

[GitHub] zeppelin pull request #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV d...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 closed the pull request at:

    https://github.com/apache/zeppelin/pull/2601


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @1ambda   hi, is there any conclusion?


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by Tagar <gi...@git.apache.org>.
Github user Tagar commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    I wonder if it's related to https://issues.apache.org/jira/browse/ZEPPELIN-1803 ?


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    Hi, https://github.com/apache/zeppelin/pull/2323 added a new table library and it supports downloads. (for 0.8.0-SNAPSHOT)
    
    ![image](https://user-images.githubusercontent.com/4968473/31066518-8bd3f424-a788-11e7-8d86-0a3eb8e0569e.png)
    
    _ http://ui-grid.info/docs/#/tutorial/206_exporting_data
    
    Could we remove the custom csv / tsv generation for 0.8.0-SNAPSHOT and above versions? 
    
    What do you think of?


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    hmm, that's odd, I don't think I've seen that before.... perhaps.. try again?


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by mebelousov <gi...@git.apache.org>.
Github user mebelousov commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    https://github.com/apache/zeppelin/pull/2601
    Hi, @BruceXu1991!
    As @1ambda, I believe one could remove old button "Download Data as CSV".
    
    The new exporter works fine and conform to RFC-4180 in most cases.
    Excel 2013 processes well your case with new CSV exporter.
    ```
    %python
    import pandas as pd
    data = [['hello', 'moscow', 'i', 'lo"v, "e', 'you']]
    df = pd.DataFrame(data)
    print('%table ' + df.to_csv(sep='\t', index=False))
    ```
    This code gives the next result:
    ![2601](https://user-images.githubusercontent.com/9324163/34775721-3471f3fc-f625-11e7-8fc6-1169cbe227b8.PNG)


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @felixcheung The API(http://ui-grid.info/docs/#/tutorial/206_exporting_data) only support export data as csv format but no tsv format supporting. So if using this API, tsv format related PR should be submited to the API lib first. Maybe we could change to [#2601 (comment)](https://github.com/apache/zeppelin/pull/2601#issuecomment-333452621) after the API support tsv format.  


---

[GitHub] zeppelin issue #2601: [ZEPPELIN-2956] [font-end] Downloaded CSV/TSV data wil...

Posted by BruceXu1991 <gi...@git.apache.org>.
Github user BruceXu1991 commented on the issue:

    https://github.com/apache/zeppelin/pull/2601
  
    @felixcheung  I have setup the CI tests, but Jenkins server seems to have no space on device.
    
    FATAL: Unable to produce a script file
    java.io.IOException: No space left on device
    	at java.io.FileOutputStream.writeBytes(Native Method)
    
    Caused: java.io.IOException: Failed to create a temp file on /home/jenkins/jenkins-slave/workspace/zeppelin-pull-request
    	at hudson.FilePath.createTextTempFile(FilePath.java:1386)
    	at hudson.tasks.CommandInterpreter.createScriptFile(CommandInterpreter.java:162)
    	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:94)


---