burr icon indicating copy to clipboard operation
burr copied to clipboard

Burr -- Google Sheets Persister

Open elijahbenizzy opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Heh, this is actually just a really cool idea. And, why not? Would make it super easy to debug, and google sheets is basically an extremely powerful (if not limited in scalability) database.

Describe the solution you'd like Build a persister that saves to/loads from google sheets.

  • [ ] Determine data models -- partition key = one sheet? App = one tab? All in a drive?
  • [ ] Determine parameters for data model
  • [ ] Figure out best way to wire through secrets (ensuring that we don't accidentally track it...)
  • [ ] Test
  • [ ] Add CSV/Excel as well, based on this

See https://github.com/DAGWorks-Inc/burr/blob/26cfcd272a26c58e88c6ec84b18682b8ad87a9bd/burr/integrations/persisters/b_redis.py#L19.

for a sample working persister

Describe alternatives you've considered Not doing this for fear that someone will use it in prod (or maybe they should...).

elijahbenizzy avatar May 26 '24 18:05 elijahbenizzy

I am requesting more information as I am interested in this issue

cmm25 avatar Sep 24 '24 07:09 cmm25

@cmm25 sorry for the tardy response. What questions do you have here?

skrawcz avatar Sep 30 '24 05:09 skrawcz

Seeing this as a good first issue I am interested in handling this but I cannot quite understand the needed requirements.

cmm25 avatar Oct 01 '24 07:10 cmm25

@cmm25 sure let me try to unpack it.

  1. The high level idea is that we could use google sheets as a database for persistence
  2. e.g. use their python API to read and write data (see their quickstart)

Things to implement:

  1. A GoogleSheetsPersister (e.g. here's the postgres one for example)
  2. The persister should implement the required methods and then subsequently use the python google sheets API to read/write appropriately.
  3. Then an example application that uses it and exercises the functionality.

How I would get started:

  1. Have setup google credentials and are able to run https://developers.google.com/sheets/api/quickstart/python
  2. Have forked the burr repository
  3. Added the google python client as an optional dependency to the project
  4. created the new persister class
  5. design the "data model" for the google sheet. It might be simplest to mirror the table structure from the postgresql persister?
  6. check in with us for feedback / thoughts.

Does that help?

skrawcz avatar Oct 01 '24 16:10 skrawcz