How can I link a Google spreadsheet to PostgreSQL?

2019-02-09 15:06发布

How can I link a Google spreadsheet to PostgreSQL? I googled and got some sample code for MySQL, and a couple of products which do it. As per this link ,support exists for a few databases.

5条回答
我欲成王,谁敢阻挡
2楼-- · 2019-02-09 15:23

My approach is using R and its googlesheets and DBI libraries. Googlesheets connects the spreadsheet with R and DBI connects the R with PostgreSQL. You can update the table whenever you want by simply running the script. With this approach you can also add transformations to the data before storing them in PostgreSQL. Another way is using Python and pandas and gspread libraries.

More info: Googlesheets: https://cran.r-project.org/web/packages/googlesheets/vignettes/basic-usage.html

DBI: https://cran.r-project.org/web/packages/DBI/vignettes/DBI-1.html

查看更多
萌系小妹纸
3楼-- · 2019-02-09 15:30

Wow, I forgot about this question. I got this working by making an additional MySQL database for two databases. The Mysql database had a single table which was used to talk to the google sheets api. In turn this mysql table was a foreign table in the Postgres database.

查看更多
迷人小祖宗
4楼-- · 2019-02-09 15:33

You can also use our self service reporting tool - Kloudio to connect your Google Sheets to PostgreSQL database and integrate it for both downloads and uploads. Moreover, you can schedule a refresh as needed so your Google Sheet will remain updated. No need to run queries manually each time.

查看更多
Explosion°爆炸
5楼-- · 2019-02-09 15:36

Seekwell works great for this. The Google Suite add-on lets you run queries in Sheets and schedule reports.

查看更多
Juvenile、少年°
6楼-- · 2019-02-09 15:39

You should look at QueryClips. You're describing its primary use case.

查看更多
登录 后发表回答