
Answer-first summary for fast verification
Answer: Use .fromQuery operation to read specific fields from the table.
The correct answer is B: 'Use .fromQuery operation to read specific fields from the table.' Using the BigQueryIO.read.fromQuery() operation allows you to read only the specific fields that are needed from the table, rather than reading the entire table. This approach significantly improves performance by reducing the amount of data that needs to be processed, which is especially important when dealing with large, exponentially growing datasets. By selecting only the relevant columns, you optimize both computational resources and costs.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company is currently engaged in data preprocessing for a machine learning algorithm using Google Cloud Dataflow. During this process, an extensive amount of data logs are being generated, and the team is interested in analyzing these logs. The data volume is rapidly expanding every hour due to the dynamic nature of the campaign. The data scientists have developed code to read the log data and extract new key features. How can you enhance the performance of this data reading operation?
A
Specify the TableReference object in the code.
B
Use .fromQuery operation to read specific fields from the table.
C
Use of both the Google BigQuery TableSchema and TableFieldSchema classes.
D
Call a transform that returns TableRow objects, where each element in the PCollection represents a single row in the table.