Google Professional Data Engineer Question 249
Select 2Google Cloud PlatformYou are working on a data processing pipeline in Google Cloud and need to execute queries on a BigQuery dataset. Some queries are used for ad-hoc data exploration and debugging, while others run nightly to generate summarized reports for business stakeholders. How should you configure the queries to optimize performance and cost?
- A
Use interactive query jobs for ad-hoc data exploration to get immediate results.
- B
Use batch query jobs for ad-hoc data exploration to reduce costs.
- C
Use batch query jobs for nightly summarized reports to take advantage of lower costs.
- D
Use interactive query jobs for nightly summarized reports to ensure they execute as soon as possible.
Show answer and explanation
Correct answers: A, C
Explanation
BigQuery allows you to configure query jobs as either interactive or batch, depending on the use case. Interactive query jobs are designed for real-time or immediate processing needs, making them ideal for ad-hoc data exploration. Batch query jobs are processed at a lower priority and incur lower costs, making them suitable for scheduled jobs like nightly reports that do not require immediate execution. Choosing the correct type of query job based on the scenario can help optimize both performance and cost.
- A. Correct.
Interactive query jobs are well-suited for ad-hoc exploration because they provide immediate results, which is important for debugging or quick insights.
- B. Incorrect.
Batch query jobs are not ideal for ad-hoc data exploration as they can take several minutes to start, making them unsuitable for immediate feedback.
- C. Correct.
Batch query jobs are a good choice for nightly summarized reports because they are cost-efficient and can tolerate the potential delay in execution start time.
- D. Incorrect.
Interactive query jobs are not necessary for nightly summarized reports since these jobs typically do not require immediate execution and can unnecessarily increase costs.