Skip to content

Conversation

@hyonaldo
Copy link

This is a transition of the pull-request from ZEPL/zeppelin#398

Using https://www.datatables.net/extensions/tabletools/ we can export table by csv, pdf... etc.

a

Thanks. ^^

@Leemoonsoo
Copy link
Member

Thanks for the cool contribution! Your pull request looks like not based on latest master branch.
Could you rebase your branch with latest master?

@hyonaldo
Copy link
Author

Thank you, @Leemoonsoo

I detected the conflicts and fixed them.
Is there any other problem?

@Leemoonsoo
Copy link
Member

I've tried this branch, and

  1. It works with chrome, but not works with firefox or safari. (i didn't tested with IE).
    is it supposed to work only with chrome?
  2. When i click 'csv' (for 'pdf', too) the default file name is '.csv.csv', it looks bit weird. (tested on OSX). Is it possible to change default name?

image
3. Is it possible to style the 'csv', 'pdf' buttons to make look similar to other buttons?

@hyonaldo
Copy link
Author

@Leemoonsoo

  1. It works In both Firefox and Safari. (and also IE) Do you have Flash installed and enabled? (and updated ?) The Flash is used to provide cross browser / platform ability to save files entirely on the client-side.
    Chrome ships with the Flash plug-in installed locally for itself only. It uses its own plug-in even if there is a system wide one available, although you might want to check with the Chrome folks about that. It means that they can ensure that the latest version of Flash is always used, since they have ever-green updating. I think that's why you think it works with only Chrome.
  2. I think it is weird. It's possible to change default name, as below
    as is:
    "aButtons": [ "csv", "pdf" ]
    to be:

    "aButtons": [
    {
    "sExtends": "csv",
    "sTitle": "My title",
    "sFileName": "TableTools - *.csv"
    }
    ]

    This parameter defines the name of the file that is to be saved. The special character " * " will be replaced by the HTML document's "TITLE" tag if it is present. Otherwise you can use this parameter to define the file name to be used.
  3. It use CSS, so we can style the buttons ( .DTTT_button ).
    http://datatables.net/release-datatables/extensions/TableTools/css/dataTables.tableTools.css
    Or we can set the class of a button.
    as is:
    "aButtons": [ "csv", "pdf" ]
    to be:
    "aButtons": [ {
    "sExtends": "csv",
    "sButtonClass": "my_button_class"
    } ]

    But, I have no idea about what looks good. Could you help me? ^^a

@hyonaldo
Copy link
Author

hyonaldo commented May 3, 2015

@Leemoonsoo

Did you try in firefox or safari with updated Flash?

I removed the entire codes and re-created it, since it had some confilcts with latest incubator-zeppelin.

With the following changes.

a1

when clicking the button,
b

And it can be used with a Bootstrap styled DataTable.
http://www.datatables.net/release-datatables/extensions/TableTools/examples/bootstrap.html

@Leemoonsoo
Copy link
Member

Thanks, let me try

@bzz
Copy link
Member

bzz commented Aug 1, 2015

Hey, what is the status of this branch?

@jongyoul
Copy link
Member

heartbeat

asfgit pushed a commit that referenced this pull request Jan 22, 2016
1)  Rest apis to export notebook as JSON
2)  Rest api to import notebook from JSON
https://issues.apache.org/jira/browse/ZEPPELIN-590

Author: swakrish <[email protected]>
Author: Ramaswamy Devarajan <[email protected]>

Closes #614 from swakrish/master and squashes the following commits:

83e7a6d [swakrish] Merge pull request #7 from apache/master
042d9af [swakrish] Merge pull request #6 from apache/master
f5b0805 [swakrish] Merge branch 'master' of [email protected]:swakrish/incubator-zeppelin.git
869b48f [swakrish] logging the error
f8bf1f3 [swakrish] Merge pull request #5 from apache/master
f8a992c [swakrish] Merge branch 'master' of [email protected]:swakrish/incubator-zeppelin.git
270e17b [swakrish] changed soureJSON to sourceJson
4cb69be [swakrish] Merge pull request #4 from apache/master
e282958 [swakrish] Changed websocket import to use common code
e928c14 [swakrish] changed doc to make it http post
4be62f6 [swakrish] Merge branch 'master' of [email protected]:swakrish/incubator-zeppelin.git
db6a580 [swakrish] changed HTTP Put to POST in the docs
ec14034 [swakrish] Merge pull request #3 from apache/master
630664c [swakrish] Merge pull request #2 from apache/master
b080d7d [swakrish] Merge pull request #1 from apache/master
db8b016 [Ramaswamy Devarajan] added note not found check for export
7351f31 [Ramaswamy Devarajan] Moved export/import methods to Notebook.java
6c19668 [Ramaswamy Devarajan] Changed http put to Http post for REST import
ecb8f1e [Ramaswamy Devarajan] Formatting for google style
9b64a66 [Ramaswamy Devarajan] fixed alignments
0e94dce [Ramaswamy Devarajan] add documentation
3645354 [Ramaswamy Devarajan] Rest Apis to export/import
@felixcheung
Copy link
Member

Hi - would you still be interested in completing this?
Seems like datatables also has a bunch of cool capability in addition to export that would be very good to have.

@ankurmitujjain
Copy link

Hi @ hyonaldo Any update on this?

@hyonaldo
Copy link
Author

I'm still interested in this. However no one has directed me to contributing this.

@jongyoul
Copy link
Member

@hyonaldo I'm not good at frontend but i think it's not a good idea using flash for implementing something. Like Moon, I also don't install flash on safari by default. Could you please suggest any other mechanism for doing this? This feature looks very good to me but if I should install flash, I won't use this and find another way.

@ankurmitujjain
Copy link

Hi @jongyoul @Leemoonsoo @hyonaldo ,
I had worked on data-tables.

You can also refer its feature on below URL (Last para.)
https://www.datatables.net/extensions/buttons/

For modern browsers with HTML 5 support datatables don't use Flash, but for legacy browsers
with no HTML5 support it uses FLASH.

So with this I believe it would be very useful feature to use it with HTML5.
Your thoughts?

@ankurmitujjain
Copy link

So instead of using retired tabletools we can use datatables button
https://www.datatables.net/extensions/buttons/

@ankurmitujjain
Copy link

Another way to use it in angular way....
http://l-lin.github.io/angular-datatables

@corneadoug
Copy link
Contributor

http://l-lin.github.io/angular-datatables/#/withOptions
Actually it could be quite quick to add that one (but not use the angular way of that plugin)

@zhongneu zhongneu mentioned this pull request Feb 14, 2016
4 tasks
@jongyoul
Copy link
Member

@hyonaldo @ankurmitujjain Thanks for explaining it, but, personally, #714 looks better approach. How about you?

@ankurmitujjain
Copy link

@jongyoul I feel #714 is quick approach, but stability and features provided by DataTable are good and rich. Also to remove confusion Data-tables table-tool (retired and replaced by buttons extension) used FLASH, but new buttons plugin dont need FLASH if your browser support HTML5.
You can confirm this from below URL that it dont need FLASH.

https://www.datatables.net/extensions/buttons/examples/html5/simple.html

As per my experience when we have multi-line text in a single cell (Header or Data cell) or text in a single cell separated by tab or comma, DataTable is good in handling that.There are many such issues where DataTable had provided solution, and if we implement custom export than we have to handle them.

Also see below URL, where we can select columns to export, pagination, filtration.
https://www.datatables.net/extensions/buttons/examples/html5/columns.html

So as per my thought integrating DataTable instead of custom export, can remove issues already handled and fixed by DataTable and this will also make way for having more features in Zeppelin Table.

@adejanovski
Copy link

+1 on using datatables.

#714 seems nice but viewers have to find out that they need to click on the gear, which is hidden in report mode and simply absent when you link directly to the paragraph as an iframe.

Datatables work fine and are very extensible.

@jongyoul
Copy link
Member

@ankurmitujjain @adejanovski Thanks for explaining it and checking a problem. @corneadoug What do you think of https://www.datatables.net/extensions/buttons/ ? I've heard from some analysts that they want to download a result as an Excel or csv.

@corneadoug
Copy link
Contributor

Adding those buttons also means changing the table rendering to use Datatables right?
I see no problems for testing that option with the angular plugin. Might not be as easy as it looks because of the paragraph height. But if it can improve the table features or performances, lets give it a try!

@jongyoul
Copy link
Member

@corneadoug Thanks for the positive feedback! @hyonaldo Do you want to improve this feature?

@zhongneu
Copy link
Contributor

@ankurmitujjain @jongyoul @corneadoug @adejanovski
Hi, I am the author of #714 . Sorry that I missed the previous conversions of this PR. I created #714 because this PR hadn't been updated for quite a while, and I really need a simple exporting functionality.

I have to say that I am conservative about using DataTable as an exporting tool. DataTable is a very powerful tool, but it will also introduce many extra dependencies into Zeppelin, which we should always be careful about. For exporting functionality, I think a simple solution is good enough.

@corneadoug
Copy link
Contributor

I'm fine with adding a new dependency for that feature if :

  • Its an Angular plugin
  • It improves the current Table features without degrading its performances

And also if it act as we would expect from that feature, which in my opinion should be:

  • Allowing Export to be not only Table based, but also of Chart Pivoted data
  • Have a PDF export for both table and graphs

On a separate note, In the future we could think about extending it with a back-end export also.

@adejanovski
Copy link

Seems like this is the port of datatables to Angular : http://l-lin.github.io/angular-datatables/#/welcome
It requires both JQuery and Angular to be imported though.

Datatables are notoriously fast if you pick the right loader for data. It does lazy loading with pagination which makes it really fast on big datasets.

I agree that what we're also looking for is some kind of full pdf export of all the paragraphs at once (if that's what you meant), in order to have some full report rendering feature that would be awesome, but trickier to do with Javascript...

@corneadoug
Copy link
Contributor

@adejanovski
Good thing we already have both dependencies in the project :)
Full document would be nice (and its not that hard), however I was talking about a single paragraph.
But I don't know if people would think single paragraph PDF export is useful

@adejanovski
Copy link

@corneadoug
Nice :)

I agree, single paragraph PDF might not be that useful if we get csv/xls export.
Still, full document PDF export would be a killer feature...

@khalidhuseynov
Copy link
Member

hi guys, I wonder what's the state of this PR? Also does it support exporting whole table? since there's limitation on number of rows loaded in front-end

@b3nbk1m70
Copy link

+1 on Khalid's comment.

For my use case, CSV (header, delimiter options) and Excel exports are the most important to my company.

@ankurmitujjain
Copy link

@adejanovski @corneadoug @bzz @Leemoonsoo

http://l-lin.github.io/angular-datatables
seems to have issue with angular-animate...

So I had tried to use the way this PR was proposed using data-tables with buttons only (No angular-datatables).
Please let me know if this is fine, I can create a new PR to commit it...

Thanks
Ankur

@corneadoug
Copy link
Contributor

I already posted pre-requisite before.
If the angular version do not work, then what is left is:

  • It improves the current Table features without degrading its performances
  • Allowing Export to be not only Table based, but also of Chart Pivoted data

ankurmitujjain pushed a commit to ankurmitujjain/incubator-zeppelin that referenced this pull request Mar 4, 2016
@ankurmitujjain
Copy link

Hello Team,
I am not sure how I can contribute to this PR, but I had implemented Datatables and added it as part #761 please review and let me know your views..

Thanks
Ankur

asfgit pushed a commit that referenced this pull request Apr 30, 2016
### What is this PR for?
It is an extension of #6 #714
It allows user to export data in a paragraph to a TSV/CSV file.

### What type of PR is it?
Feature

### Todos
* [x] - Improves the current Table features like Search, Fixed Headers, Sorting

### Is there a relevant Jira issue?
[ZEPPELIN-672](https://issues.apache.org/jira/browse/ZEPPELIN-672)

### How should this be tested?
1. Create a paragraph with data in %table view
2. Click on TSV/CSV button to export CSV/TSV file

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/1140475/13525760/4913bd8e-e229-11e5-9cd5-480c8b583d5b.png)

### Questions:
* Does the licenses files need update?
 Need to have MIT license for Datatables.
* Is there breaking changes for older versions?
No
* Does this needs documentation?
No

Author: ankur_jain <[email protected]>
Author: Ankur Jain <[email protected]>
Author: Damien CORNEAU <[email protected]>

Closes #761 from ankurmitujjain/master and squashes the following commits:

4ddcc0f [Ankur Jain] Updated testcases for @corneadoug pull request
e6470aa [Ankur Jain] Merge pull request #1 from corneadoug/clean/dataframe
dd8901b [Damien CORNEAU] last fixes
5aca081 [Damien CORNEAU] Last Modifications
9c4412f [Damien CORNEAU] Remove buttons
2561630 [Ankur Jain] Updated for indent
c9b675d [Ankur Jain] Updated for indent
38ee3c3 [Ankur Jain] Updated for indent
b23cab4 [Ankur Jain] Updated for indent
09c87a0 [Ankur Jain] Updated for indent
e4b3abb [ankur_jain] Removed R.md accidentally added
d3aadc6 [ankur_jain] Updated testcase
210b7a6 [ankur_jain] Updates latest code of controller
80bd58c [ankur_jain] Merge branch 'upstream/master'
0ee76b1 [ankur_jain] Update 3 files
0c5f623 [ankur_jain] Revert "Merge branch 'upstream/master'"
adb66a3 [ankur_jain] Merge branch 'upstream/master'
6363e97 [ankur_jain] Merge branch 'master' of https://github.com/ankurmitujjain/incubator-zeppelin
0c94cab [ankur_jain] Merge branch 'master' of https://github.com/ankurmitujjain/incubator-zeppelin
d23202e [ankur_jain] Merge remote-tracking branch 'refs/remotes/origin/master' into apache/master
415c1f5 [ankur_jain] Merge branch 'apache/master'
7901f5e [ankur_jain] Merge branch 'refs/heads/master' into apache/master
6e6587b [ankur_jain] Updating codebase as per @prabhjyotsingh comments
aea8446 [ankur_jain] Merge branch 'apache/master'
df1620c [ankur_jain] Updated testcase as resultant paragraph have text of buttons and search box.
00b36e5 [ankur_jain] Reverted line 117 and 2122 as per previous code
9351a0d [ankur_jain] Committed for Datatables #6
onkarshedge pushed a commit to onkarshedge/incubator-zeppelin that referenced this pull request May 11, 2016
### What is this PR for?
It is an extension of apache#6 apache#714
It allows user to export data in a paragraph to a TSV/CSV file.

### What type of PR is it?
Feature

### Todos
* [x] - Improves the current Table features like Search, Fixed Headers, Sorting

### Is there a relevant Jira issue?
[ZEPPELIN-672](https://issues.apache.org/jira/browse/ZEPPELIN-672)

### How should this be tested?
1. Create a paragraph with data in %table view
2. Click on TSV/CSV button to export CSV/TSV file

### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/1140475/13525760/4913bd8e-e229-11e5-9cd5-480c8b583d5b.png)

### Questions:
* Does the licenses files need update?
 Need to have MIT license for Datatables.
* Is there breaking changes for older versions?
No
* Does this needs documentation?
No

Author: ankur_jain <[email protected]>
Author: Ankur Jain <[email protected]>
Author: Damien CORNEAU <[email protected]>

Closes apache#761 from ankurmitujjain/master and squashes the following commits:

4ddcc0f [Ankur Jain] Updated testcases for @corneadoug pull request
e6470aa [Ankur Jain] Merge pull request apache#1 from corneadoug/clean/dataframe
dd8901b [Damien CORNEAU] last fixes
5aca081 [Damien CORNEAU] Last Modifications
9c4412f [Damien CORNEAU] Remove buttons
2561630 [Ankur Jain] Updated for indent
c9b675d [Ankur Jain] Updated for indent
38ee3c3 [Ankur Jain] Updated for indent
b23cab4 [Ankur Jain] Updated for indent
09c87a0 [Ankur Jain] Updated for indent
e4b3abb [ankur_jain] Removed R.md accidentally added
d3aadc6 [ankur_jain] Updated testcase
210b7a6 [ankur_jain] Updates latest code of controller
80bd58c [ankur_jain] Merge branch 'upstream/master'
0ee76b1 [ankur_jain] Update 3 files
0c5f623 [ankur_jain] Revert "Merge branch 'upstream/master'"
adb66a3 [ankur_jain] Merge branch 'upstream/master'
6363e97 [ankur_jain] Merge branch 'master' of https://github.com/ankurmitujjain/incubator-zeppelin
0c94cab [ankur_jain] Merge branch 'master' of https://github.com/ankurmitujjain/incubator-zeppelin
d23202e [ankur_jain] Merge remote-tracking branch 'refs/remotes/origin/master' into apache/master
415c1f5 [ankur_jain] Merge branch 'apache/master'
7901f5e [ankur_jain] Merge branch 'refs/heads/master' into apache/master
6e6587b [ankur_jain] Updating codebase as per @prabhjyotsingh comments
aea8446 [ankur_jain] Merge branch 'apache/master'
df1620c [ankur_jain] Updated testcase as resultant paragraph have text of buttons and search box.
00b36e5 [ankur_jain] Reverted line 117 and 2122 as per previous code
9351a0d [ankur_jain] Committed for Datatables apache#6
asfgit pushed a commit that referenced this pull request Jun 8, 2016
### What is this PR for?
Allow users to export data in a paragraph to a TSV file.

There is already a [PR](#6) for this, but it uses DataTables, which requires Flash.

### What type of PR is it?
Feature

### Todos
* [ ] - Hide/disable the button if it is not in table/chart view
* [ ] - Find an icon for the new button
* [ ] - Saved file name is not correct in Safari
* [ ] - Test with large data set

### Is there a relevant Jira issue?
[ZEPPELIN-672](https://issues.apache.org/jira/browse/ZEPPELIN-672)

### How should this be tested?
1. create a paragraph with data in %table view
2. select the "Export to TSV" item in the paragraph settings list

### Screenshots (if appropriate)
![vvzhsyciev](https://cloud.githubusercontent.com/assets/3282033/13032147/d589e88e-d29c-11e5-8763-96fca4db2fd0.gif)

### Questions:
* Does the licenses files need update?
NO

* Is there breaking changes for older versions?
NO

* Does this needs documentation?
NO

Author: Zhong Wang <[email protected]>

Closes #714 from zhongneu/export-to-tsv and squashes the following commits:

3c9e9e6 [Zhong Wang] fix missing semicolons
089018e [Zhong Wang] first attempt to implement exporting to TSV
@asfgit asfgit closed this in 41a7302 Jun 22, 2016
asfgit pushed a commit that referenced this pull request Sep 6, 2016
### What is this PR for?
Recreation of #1354
This PR is bringing Contribution guidelines to the website.
We also introduce a sidemenu on those pages allowing to create additional content.
As an example, for the Web Application Guidelines, we added a page about "Defining Components"

In a different PR, we will remove the contributing markdown, and change the links in the repository to the website.

The layout of the doc was slightly modified to allow a larger documentation at max size.
It was also modified to accommodate better on smaller screens.

### What type of PR is it?
Documentation

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1346

### How should this be tested?
Build the website locally and visit the community page

### Screenshots (if appropriate)
![screen shot 2016-08-23 at 3 50 41 pm](https://cloud.githubusercontent.com/assets/710411/17882774/8da96b86-6949-11e6-8789-fed606b64fd8.png)

<img width="1346" alt="screen shot 2016-08-31 at 10 33 36 am" src="https://cloud.githubusercontent.com/assets/710411/18113150/7bb2a152-6f68-11e6-8678-667c2d4f07ef.png">

#### Layout update (Before / After)

Navbar Bug fix

<img width="908" alt="screen shot 2016-08-31 at 10 35 14 am" src="https://cloud.githubusercontent.com/assets/710411/18113174/a374ee84-6f68-11e6-8878-a8eb7b564bd7.png">

<img width="781" alt="screen shot 2016-08-31 at 10 31 18 am" src="https://cloud.githubusercontent.com/assets/710411/18113161/9a280b0e-6f68-11e6-8dc5-1656b5bc86b1.png">

Small Device Margin Improvement

<img width="402" alt="screen shot 2016-08-31 at 10 35 34 am" src="https://cloud.githubusercontent.com/assets/710411/18113176/a590f74e-6f68-11e6-8468-18274413be28.png">

<img width="398" alt="screen shot 2016-08-31 at 10 31 28 am" src="https://cloud.githubusercontent.com/assets/710411/18113168/9e904d5a-6f68-11e6-9a2e-2536cbf7a37f.png">

Content Width Change

<img width="953" alt="screen shot 2016-08-31 at 10 33 50 am" src="https://cloud.githubusercontent.com/assets/710411/18113180/a7fc954c-6f68-11e6-8d58-08afb54549c1.png">

<img width="1023" alt="screen shot 2016-08-31 at 10 32 12 am" src="https://cloud.githubusercontent.com/assets/710411/18113169/a0d71aee-6f68-11e6-8654-3f124bd2a71b.png">

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Damien CORNEAU <[email protected]>
Author: AhyoungRyu <[email protected]>
Author: CORNEAU Damien <[email protected]>

Closes #1356 from corneadoug/add/ContributeCategory and squashes the following commits:

1a45b92 [Damien CORNEAU] Improve margin for small devices
9169c68 [Damien CORNEAU] Improve wording and spacing in contribution docs
d31cf3f [Damien CORNEAU] Improve CSS for the content
a469d52 [Damien CORNEAU] Extend pages_list to support multi group
79d15a3 [Damien CORNEAU] Add Contribution Guidelines to SubMenu
934afd9 [Damien CORNEAU] Change Zeppelin to Apache Zeppelin in general.md
2d62d20 [CORNEAU Damien] Merge pull request #6 from AhyoungRyu/add/ContributeCategory-ahyoung
e34fc64 [Damien CORNEAU] fix typo in front-end doc
a4c924b [AhyoungRyu] Remove 'menu' property
e0b4c8d [Damien CORNEAU] change name of good practice file
9882670 [Damien CORNEAU] Allows contribution page without side Menu
318c4c1 [AhyoungRyu] Add section for 'For committers only'
8f69f28 [Damien CORNEAU] Add GUI integration tests CLI
e7209ea [AhyoungRyu] Add docs contribution guide
94d653b [Damien CORNEAU] Fix typos
81493ab [Damien CORNEAU] Change Side Menu style
666f3ec [Damien CORNEAU] Add first Zeppelin-web best practices page
306ae06 [Damien CORNEAU] Add zeppelin-web GPG menu
c933c19 [Damien CORNEAU] Add zeppelin-web contribution page
5f7e2bd [Damien CORNEAU] Add a side menu template
acc68b5 [Damien CORNEAU] Add contribution Guidelines to the website
cb87608 [Damien CORNEAU] Add forgotten license headers
06238fb [Damien CORNEAU] Modify the Community page
gef756 added a commit to gef756/zeppelin that referenced this pull request Oct 16, 2017
Savalek pushed a commit to Savalek/zeppelin that referenced this pull request Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.