google-cloud-platformgoogle-cloud-firestoregoogle-cloud-functionsnosql

Understanding Google Cloud Platform task required for Job Interview


Just to clarify, I'm not really looking for help to solve the task, I just want to understand it as I've never done anything whatsoever in GCP .

So the task is:

create an API in GCP with a Cloud Function and Node with a connection to a (NoSQL) Cloud Datastore-database (Firestore in Datastore-mode). The table should include customers with certain attributes, and the API should support the methods /getCustomers (returns id and name), and /getCustomer?id (which returns all attributes). Put the code in a Cloud Source Repository, and create a pipeline in Cloud Build with a trigger to operate automatically on every commit/push to the repo.

What I've found so far, by searching and doing stuff in Google Cloud Console, I can create one or several tables in BigQuery (for the customers) and then call them from a Cloud Function which responds to a trigger, though I'm unsure what trigger since they said "every commit/push"?

But it feels like I'm missing something... Am I supposed to create a web app using App Engine and store the data i Cloud Firestore (Serverless NoSQL database)?


Solution

  • The trigger being referred to there does not have anything to do with Cloud Functions. It's talking about Cloud Build. You will need to learn how to set it up so that a build and deployment to Cloud Functions happens automatically whenever code is pushed to Cloud Source Repository. This is covered in the documentation.

    You can configure Cloud Build to automatically build a new image any time a user pushes a change to files stored in Cloud Source Repositories. Events that initiate automatic builds are called build triggers.