Automate Google Spreadsheet data load from external database

前端 未结 2 1007
旧巷少年郎
旧巷少年郎 2020-12-06 23:39

I have a shared Google spreadsheet. Some columns of a worksheet must be filled with data (SQL query) that exist in a DB server (PostgreSQL).

Also the data load must

相关标签:
2条回答
  • 2020-12-07 00:08

    Apps Script is able to connect to external database using the JDBC Service of Apps Script. However, as mentioned here(read last comment/post), to have App Script read from a PostgreSQL DB you'll need to implement an API layer yourself.

    Regarding Scheduled Data Loads: This can be achieved by using Time-Driven Triggers and Class ClockTriggerBuilder might also be of some help.

    Regarding "Tweaks" that you are looking to implement: Here is a tutorial that will show you how to send emails using Apps Script. Depending on your use case and what you are looking into implementing, the above mentioned Installable Triggers(use same link as Time-Driven Triggers) can also be used to send email confirmation for completion of your Data Load Process. And this should serve as a good reference for renaming your Sheet using date-time.

    Hence, it is possible to achieve what you are planning on doing using Apps Script but before you start, I would suggest you to thoroughly go through the App Script Documentation.

    0 讨论(0)
  • 2020-12-07 00:16

    I found JDBC in Google Sheets to be quite buggy, so I built SeekWell which lets you automatically send data from Postgres to Sheets and can also sync changes from Sheets back to a database. You can schedule refreshes daily, hourly or every five minutes.

    Disclaimer: I built this.

    0 讨论(0)
提交回复
热议问题