Exporting data from google cloud catastrophe to google sheets via api

50 views
Skip to first unread message

Richard Bernstein

unread,
May 25, 2018, 9:08:39 AM5/25/18
to Google App Engine
Ok I am pretty much going to use the standard implementation rather than flexible. I will have a need to export certain parts of my data to google sheets to allow users to manipulate data. Is there any existing limitation on using standard/mysql/googlesheets api together?

Ani Hatzis

unread,
May 25, 2018, 12:18:21 PM5/25/18
to google-a...@googlegroups.com

If I understand correctly, you want to export certain parts of your data from Cloud SQL (MySQL 2nd generation) to Google Sheets, and users should be able to manipulate the exported data in the sheets. I assume by "manipulating" you refer to pivot tables, diagrams and so on. Do you want to stream the data in realtime to Sheets? Or do you want to export the data occasionally, e.g. manually, or just every few hours or days? Is the data changed exclusively through your App Engine app or are there clients that will write directly into your Cloud SQL database? And also, do you want to export full sets of data, e.g. replacing an old sheet or exporting data to a new sheet, or would it make sense to append new data to the sheet? Do you need to re-export updated data into sheets? Do you need a strongly consistent view of the data in the sheet? How much data is exported into how many sheets and how often? And how should the access of users be controlled? Do all Sheets users have the same permissions and do all of them access the same data? And which programming language of the available Google App Engine standard environments have you picked?

There are many ways to perform such exports, depending on the answers to the above questions, and also your preferred programming language and tools.
  • One obvious of course is to manually export SQL data into a CSV file or similar and import the file into a spreadsheet. Also see Best Practices for Importing and Exporting Data.
  • If you are looking for an automated process: Inside your App Engine app, you could create background tasks that send the data to the Sheets API frequently or whenever data is changed or on a certain user request. This would consume GAE instance hours and is also subject to some GAE quotas and limits, e.g. for outbound requests. Also see Sheets API usage limits. The advantage is that task queues are integrated with your environment, so you can stick with your language and tools and test all pieces together on the local development server.
  • Or you could have a Google Apps Script web-app that pulls data directly from Cloud SQL and writes them into a spreadsheet. Most Google Apps Script quotas and limits are per user account. This route might make sense if you are already familiar with Google Apps Script or at least JavaScript, and if you want a deeper Google Drive integration.
  • Compared to a Google Apps Script web-app, Cloud Functions could be the better option, if you also plan to support export targets outside of Google Drive.
  • If you want to improve the user experience for Google Drive users: You also can integrate a Sheets add-on that users can install, that would pull the data from Cloud SQL into their current sheet. The add-on could have a sidebar with a form so the users could enter data filters before the data is pulled.
  • There are a few more options that come to mind though.
Ani



On Fri, May 25, 2018 at 3:08 PM Richard Bernstein <rich...@gmail.com> wrote:
Ok I am pretty much going to use the standard implementation rather than flexible. I will have a need to export certain parts of my data to google sheets to allow users to manipulate data. Is there any existing limitation on using standard/mysql/googlesheets api together?

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c1d22698-477d-4765-b80a-9b9e569ff0aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Bernstein

unread,
May 25, 2018, 12:43:59 PM5/25/18
to Google App Engine
Ani, thx. That was very helpful. The app as it is right now can export data to a csv file. So a user could download their data. At some point in the future I want to write some macros for sheets that will enable a specific type of statistical treatment on the data.

For right now I am trying to get my php app running on dev_appserver. I also used mysql in this app and hopefully can get the datastore emulator to run mysql. I am not sure if this is possible? This could be a big problem for me while trying to get this working app ported to run on app engine. Any suggestions on using cloud storage to run the mysql part of this?

I have dev_appserver running on my local machine but am having a little trouble setting up the app.yaml with this codeigniter based app.

Katayoon (Cloud Platform Support)

unread,
May 28, 2018, 10:53:15 AM5/28/18
to Google App Engine

I should add that Cloud SQL and Cloud Datastore are different products and Datastore Emulator is only applicable on Cloud datastore. Here you may find different storage and database solutions and choose the best option for your project based on your application type. You may find a sample on Using Cloud SQL for MySQL in PHP to get a good grasp of how to configure your app.yaml file.


Kindly note that Google Groups are reserved for general Google Cloud Platform-end product discussions and not for technical questions. For technical questions, I recommend that you post your full detailed question to Stack Overflow.


Reply all
Reply to author
Forward
Message has been deleted
0 new messages