0

I have a BigQuery View/Query that every morning I need to run and copy the result to a Google Sheet. I am using Javascript, and plan to use the node.js BigQuery client library and the Google Sheets node.js API for interacting with BigQuery and Google Sheets.
I would like to achieve this using Google's Cloud Functions but I'm not sure how to put it all together and how to schedule it.

Can someone explain which tools/products I should use and how to string them together.

1 Answer 1

0

I believe your scenario should involve using Cloud Functions to host the code you want to execute and Cloud Pub/Sub and Cloud Scheduler in order to trigger it as explained in this article.

To sum up the article, you should:

  • Develop the code that queries the BigQuery View and dumps the result to Google Sheet.
  • Make a Cloud Function that triggers using Cloud Pub/Sub with the code you developed earlier. Create a new Pub/Sub topic for this task.
  • Create a Cloud Scheduler job with the frequency you need that targets the Pub/sub topic you created before. Take a look at this page if you want to nail the unix-cron format.

These should be all the steps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .