Google Cloud Professional Cloud Developer — Question 97
You have an HTTP Cloud Function that is called via POST. Each submission's request body has a flat, unnested JSON structure containing numeric and text data. After the Cloud Function completes, the collected data should be immediately available for ongoing and complex analytics by many users in parallel. How should you persist the submissions?
Answer options
- A. Directly persist each POST request's JSON data into Datastore.
- B. Transform the POST request's JSON data, and stream it into BigQuery.
- C. Transform the POST request's JSON data, and store it in a regional Cloud SQL cluster.
- D. Persist each POST request's JSON data as an individual file within Cloud Storage, with the file name containing the request identifier.
Correct answer: B
Explanation
The correct answer is B because BigQuery is designed for handling large-scale analytics and can efficiently process streaming data, making it suitable for complex queries from multiple users. Options A and C do not provide the same level of analytical capability, and option D may lead to management overhead and slower access for analytics due to file-based storage.