Random and fake test data in Sheets with Google Apps Script

682 views
Skip to first unread message

Bruce Mcpherson

unread,
Jun 20, 2021, 9:43:04 AM6/20/21
to Google Apps Script Community
Sometimes you need to generate some fake data for a spreadsheet. In this post I’ll cover a few utilities in 2 separate libraries that can help with this.

chart (2).png

Alex

unread,
Jun 22, 2021, 3:44:23 AM6/22/21
to Google Apps Script Community
I also use this. And I thought about a simple addon for this.

Bruce Mcpherson

unread,
Jun 22, 2021, 4:11:46 AM6/22/21
to google-apps-sc...@googlegroups.com
Alex

If you mean 'faker', it's a pretty big library 1.5mb minimized and it might not be a great candidate for a permanent add-on dependency. Might be better in a cloud run environment with an API.



--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/032333c7-fb61-44c0-a322-e3a67e9dc211n%40googlegroups.com.

Alex

unread,
Jun 22, 2021, 4:30:21 AM6/22/21
to Google Apps Script Community
That is the place where I stuck!

I thought about distributed system. And now I'm thinking about GCF. But my experience with Cloud Functions gives me a tip that it can be expensive. Therefore, I am considering a cloud run and a common virtual server.

Bruce Mcpherson

unread,
Jun 22, 2021, 5:19:24 AM6/22/21
to google-apps-sc...@googlegroups.com
There's a pretty generous free tier, and you can put a budget on it so it doesn't runaway. 
image.png

The advantage of cloud run over cloud functions  with a big module like this, is in startup time. Cloud run has some global variable persistence so each call doesn't necessarily generate a completely new cold start instance. 

check this out..



Alex

unread,
Jun 22, 2021, 5:49:49 AM6/22/21
to Google Apps Script Community
That's it!

And I'd like ask you an additional question. How do you think what is the best benefits for use GCF with Apps Scripts? I notice that I'm using CF by inertia from my experience with Firebase.

Bruce Mcpherson

unread,
Jun 22, 2021, 6:02:40 AM6/22/21
to google-apps-sc...@googlegroups.com
One factor would be that you already have a node app or container to perform some self contained function or to run something that only works on node, or you want to use pubsub and/or cloud storage, or of course if you are using firestore/firebase, or if you have something that would take too long to run on Apps Script and want to split it into one or multiple simultaneously executing chunks. 
btw - I normally use regular cloud functions rather than involving firebase.

cloud run is a bit more complicated than cloud functions to work with. If you are running kubernetes, you can execute cloud run on your own cluster which avoids a lot of faffing around with security stuff. 

Here's how..



Alex

unread,
Jun 22, 2021, 6:09:40 AM6/22/21
to Google Apps Script Community
Thank you!

Also is bmFaker updated automatically? Is a GitHub Action?

Bruce Mcpherson

unread,
Jun 22, 2021, 6:15:06 AM6/22/21
to google-apps-sc...@googlegroups.com
No - its a clone so I'd need to update it from time to time

Reply all
Reply to author
Forward
0 new messages