grahamearley / FirestoreGoogleAppsScript

A Google Apps Script library for accessing Google Cloud Firestore.
http://grahamearley.website/blog/2017/10/18/firestore-in-google-apps-script.html
MIT License
644 stars 108 forks source link

Feature request: batched writes #65

Open maria-le opened 5 years ago

maria-le commented 5 years ago

I looks like, at the moment, if I want to write many records at once, I have to either do a series of individual document writes. Or I have to write all the records to a single doc. It would be great to be able to create and write out to many docs simultaneously and atomically.

LaughDonor commented 4 years ago

We'll need to add support for the following API Endpoints:

lahirue commented 4 years ago

This is a very useful feature. Without this feature , its a useless library for a production application. Batch Writes , Batch Updates are critical in production mode. Hope this feature will be implemented soon.

chintananand commented 3 years ago

First of all, kudos to the entire team for developing this library. it's pretty simple and very useful.

Batch operations are must to have feature for this library. Google has restricted usage of read and write operations - and due to this limitation in a very short span of time the limit gets exhausted. Due to sequential processing ulrfetch which is used internally is eating up the cap.
Exception: Service invoked too many times for one day: urlfetch. at method(Request:48:38) at patch(Request:108:21) at updateDocument(FirestoreWrite:47:36) at updateDocument(Firestore:95:21)

Request you to please add the capability at your earliest.

mellowcello77 commented 3 years ago

Batch writes is a must for me, I would definitely used this for production if it was available.

abkarino commented 2 years ago

For my use case, I have a huge number of writes but due to the update document mask exceeding the limit, I have to read and merge the data manually. A batched write or a transaction would allow the mask to be included in the body of the request rather than in the url query.

michaelconan commented 1 year ago

Also would be interested in using this library but no way I can use without batch write function, which appears to have been open for a year without clear progress. I'll carry on with my own rough implementation... :/