Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-3667] [Improvement] Large CVS download. #3101

Open
wants to merge 3 commits into
base: branch-0.7
Choose a base branch
from

Conversation

maitreyak
Copy link

What is this PR for?

The download CSV feature from the table views fails when the total data accumulated is greater than 2MB on the chrome browser.

encodeURIComponent call has a maxs out for larger sizes of csv, using blob extends csv download size limitations.

What type of PR is it?

[Improvement]

What is the Jira issue?

ZEPPELIN-3667

How should this be tested?

set env variable ZEPPELIN_INTERPRETER_OUTPUT_LIMIT to greater than 2 MB.
Test downloading a small to moderate CSV from the table segment on chrome, safari, opera and firefox.
Test downloading a large CSV(2MB or greater) from the table segment on chrome, safari, opera and firefox.
All downloads should pass.

angular.element('body').append('<a id="SaveAsId"></a>');
var saveAsElement = angular.element('body > a#SaveAsId');
saveAsElement.attr('href', content);
var url = window.URL.createObjectURL(new Blob([content], {type: 'image/svg;charset=utf-8'}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image/svg for cvs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Removed it. thank you @Tagar

@Tagar
Copy link
Contributor

Tagar commented Jul 28, 2018

FYI. That download button will be removed by #3013

@maitreyak
Copy link
Author

@Tagar providing the fix for 0.7x versions. #3013 is meant for 0.8 and up according to the JIRA.

@maitreyak
Copy link
Author

Intended for branch-0.7. We use this version of Zeppelin with the posted fix at our organization.
We don't intend to update to version 0.8+ due to the custom enhancements we have made.

Thought it would be useful for folks on the same branch version or EMR folks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants