ASSOCIATE-DATA-PRACTITIONER practice question 23 of 25

You are a data analyst at your organization. You have been given a BigQuery dataset that includes customer information. The dataset contains inconsistencies and errors, such as missing values, duplicates, and formatting issues. You need to effectively and quickly clean the dat a. What should you do?

Full set: 106 questions
Answer options
A: Develop a Dataflow pipeline to read the data from BigQuery, perform data quality rules and transformations, and write the cleaned data back to BigQuery.
B: Use Cloud Data Fusion to create a data pipeline to read the data from BigQuery, perform data quality transformations, and write the clean data back to BigQuery.
C: Export the data from BigQuery to CSV files. Resolve the errors using a spreadsheet editor, and re- import the cleaned data into BigQuery.
D: Use BigQuery's built-in functions to perform data quality transformations. Correct answer
Correct Answer:
D. Use BigQuery's built-in functions to perform data quality transformations.
Explanation

For a data analyst working directly within BigQuery, using its built-in Standard SQL functions is the most effective and quickest method for data cleaning. BigQuery provides a comprehensive library of functions for handling nulls (e.g., COALESCE, IFNULL), correcting formats (e.g., CAST, PARSEDATE), cleaning strings (e.g., TRIM, REPLACE), and identifying duplicates using window functions (e.g., ROWNUMBER()). This approach requires no additional services or data movement, allowing for rapid, iterative cleaning directly on the source data.

Why Incorrect

A. Dataflow is a powerful ETL service but introduces overhead for an analyst's task, being better suited for complex, recurring batch/streaming pipelines.
B. Cloud Data Fusion is a GUI-based integration service, which adds pipeline management overhead and is less direct than writing a simple SQL query.
C. Exporting data to a spreadsheet is not scalable, is highly manual, and is an anti-pattern for handling data that resides in BigQuery.

References

1. Google Cloud. (n.d.). Data manipulation language (DML) statements in Google Standard SQL. Google Cloud Documentation. Retrieved from https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. (This shows how to use SQL to modify data directly).

2. Google Cloud. (n.d.). Standard SQL function call rules. Google Cloud Documentation. Retrieved from https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators. (This is the entry point to the vast library of functions available for data transformation and cleaning).

3. Google Cloud. (n.d.). Window functions calls. Google Cloud Documentation. Retrieved from https://cloud.google.com/bigquery/docs/reference/standard-sql/window-function-calls. (The ROWNUMBER() function described here is a standard way to find and manage duplicate rows).

Scroll to Top