multiprocessio / datastation

App to easily query, script, and visualize data from every database, file, and API.
https://datastation.multiprocess.io
Other
2.9k stars 112 forks source link

Feature request: Add Google Sheets as a data source #206

Closed nekromoff closed 2 years ago

nekromoff commented 2 years ago

API reference: https://developers.google.com/sheets/api/reference/rest

eatonphil commented 2 years ago

Good one! I actually already added support for it but I got stuck with permissions I think so I couldn't test it and removed the option from the ui.

Hopefully I can get permissions working so I can test it out and make it available soon.

https://github.com/multiprocessio/datastation/blob/main/runner/database_google_sheets.go

nekromoff commented 2 years ago

I would recommend OAuth2 process https://developers.google.com/identity/protocols/oauth2/native-app

Server-side process can be easier to set up as a JSON file is provided for download: https://developers.google.com/identity/protocols/oauth2/web-server

I have some previous experience with this, but only on a server side (PHP ...). If I can be of any help, let me know.

And I can do testing as well, if needed.

nekromoff commented 2 years ago

Good one! I actually already added support for it but I got stuck with permissions I think so I couldn't test it and removed the option from the ui.

Hopefully I can get permissions working so I can test it out and make it available soon.

https://github.com/multiprocessio/datastation/blob/main/runner/database_google_sheets.go

Can I somehow test this with the current version? Is there way to include this runner / compile it into existing version?

eatonphil commented 2 years ago

Hey sorry for the lack of response. I've got Google Sheets working now. It only recognizes one format though where your sheet has a header row. In https://github.com/multiprocessio/datastation/pull/235.

I can make a release candidate after merging this PR and you can try it out.

eatonphil commented 2 years ago

You can also test out Google Sheets now in the 0.10.0-rc1 release candidate if you'd like https://github.com/multiprocessio/datastation/releases/tag/0.10.0-rc1

nekromoff commented 2 years ago

I have tested, but not sure what is required here: image

I tried adding path to file, but the field seems to be of password type (hidden characters), so I tried pasting the contents of JSON service file, but I am not sure this is the expectation.

Also, this source is not visible in the panels afterwards.

eatonphil commented 2 years ago

I tried adding path to file, but the field seems to be of password type (hidden characters), so I tried pasting the contents of JSON service file, but I am not sure this is the expectation.

I should probably change it to be a file but you just paste in your service account JSON itself.

Also, this source is not visible in the panels afterwards.

This is how all encrypted fields work/show up in DataStation.