Google Professional Data Engineer Question 248
Select 3Google Cloud PlatformYou are a data engineer working for an e-commerce company. The company stores transactional data in Google BigQuery and needs to perform two types of queries: 1) Interactive queries to support the business intelligence dashboards that require real-time data, and 2) Batch queries to generate daily sales reports. How should you configure the query jobs to optimize cost and performance?
- A
Run interactive queries with the default priority setting and batch queries with batch priority.
- B
Run both interactive and batch queries with the interactive priority setting to ensure faster execution.
- C
Use batch priority for batch queries to reduce costs and interactive priority for interactive queries to minimize latency.
- D
Schedule batch queries during non-peak hours to avoid contention with interactive queries.
- E
Use a higher slot reservation for batch queries while keeping interactive queries on the default slot allocation.
Show answer and explanation
Correct answers: A, C, D
Explanation
To balance cost and performance, interactive queries should use interactive priority for low-latency responses, while batch queries should use batch priority to reduce costs. Scheduling batch queries during non-peak hours further optimizes resource utilization and avoids contention with interactive queries. Using default slot allocation for interactive queries generally provides sufficient performance unless specific capacity needs are identified.
- A. Correct.
Correct. Configuring interactive queries with the default priority and batch queries with batch priority is a cost-effective and performance-optimized approach.
- B. Incorrect.
Incorrect. Running all queries with interactive priority increases costs unnecessarily for batch queries, which do not require low latency.
- C. Correct.
Correct. Using batch priority for batch queries reduces costs, and interactive priority for interactive queries ensures low-latency responses.
- D. Correct.
Correct. Scheduling batch queries during non-peak hours minimizes resource contention with interactive queries, improving performance for both.
- E. Incorrect.
Incorrect. A higher slot reservation for batch queries is not necessary unless batch jobs need to be prioritized, which contradicts the cost-saving approach of batch priority.