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

Exporting query results as Google Spreadsheet #2343

Closed
wants to merge 7 commits into from

Conversation

kyoshidajp
Copy link
Member

@kyoshidajp kyoshidajp commented Feb 25, 2018

In order to export query results to Google Spreadsheet, calling IMPORTDATA with CSV format URL from Spreadsheet is the easiest way. However, the way is needed to make access public to allow access from Google.

This feature is export query results by using Google Spreadsheet API and add you as the owner. Also, after you export results, then open the sheet page.

Steps to use

  1. Submit JSON Key File which has https://spreadsheets.google.com/feeds and https://www.googleapis.com/auth/drive scope of Google Spreadsheet at settings page
  2. Run a query and get the result
  3. Click Export button on query page

Screenshot

Export button on query page

"Download" label may not be an appropriate name.

Before After
download_before download_after

JSON key file input on settings page

Before After
settings_before settings_after

@kyoshidajp
Copy link
Member Author

Sorry, I'm going to fix error tests later.

@kyoshidajp kyoshidajp force-pushed the export_spreadsheet branch 2 times, most recently from bf835f4 to 131564f Compare February 26, 2018 10:40
@kocsmy
Copy link
Collaborator

kocsmy commented Feb 26, 2018

I like this feature, thanks @kyoshidajp

Question: what happens if you don't have your JSON Key file and your try to hit the "Export as Spreadsheet" button?

I think it'd be an elegant solution to show a modal with a little message that you'll need to upload your JSON Key File first and link to the Settings (or maybe link to support article).

The choice of word for Download/Export is indeed a bit confusing. What I'd do is keep it as Download (and we'll figure out something better for this later) but use "Export as Google Spreadsheet" instead to be clear about what's going to happen.

On the Settings page, shouldn't we use "Google Spreadsheet" (instead of Spreadsheet) to be more specific about what is this for?

@denisov-vlad
Copy link
Member

Is it possible to export to Google Spreadsheets without passing JSON key file when the user is registered via OAuth?

@kyoshidajp
Copy link
Member Author

@kocsmy Thanks.

Question: what happens if you don't have your JSON Key file and your try to hit the "Export as Spreadsheet" button?

I didn't consider that. Now, I changed that redirect to settings page with a warning message.

organization settings 2018-02-27 20-23-51

Also, I changed the label on the settings and on the query page.

new querym 2018-02-27 20-19-09

@kyoshidajp
Copy link
Member Author

@denisov-vlad No. Export by Service Account with API. JSON key file of Google Spreadsheet Account must be set.

@kocsmy
Copy link
Collaborator

kocsmy commented Feb 27, 2018

Thanks @kyoshidajp that all looks great now!

@kyoshidajp
Copy link
Member Author

I have resolved the conflict.

@bealdav
Copy link

bealdav commented Mar 26, 2018

really interesting feature, thanks

@arikfr
Copy link
Member

arikfr commented Jan 21, 2020

Hi,

(This is a template message, but I mean every word of it. Also you're welcome to reply)

Thank you for making this contribution. While we couldn't bring it to completion and merge, it's still very much appreciated. 🙇

In the past year the Redash code base gone under massive updates: on the backend we moved to Python 3 & RQ instead of Celery and on the frontend we replaced Angular with React. It's very likely this makes this PR irrelevant without significant changes. :-(

I'm closing this PR now. But if you're still interested in making it happen, let me know and I will reopen.

Thanks.

@arikfr arikfr closed this Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants