PROFESSIONAL-DATA-ENGINEER · Question #325
You are preparing data that your machine learning team will use to train a model using BigQueryML. They want to predict the price per square foot of real estate. The training data has a column for the
The correct answer is A. SELECT * EXCEPT (feature1), IFNULL(feature1, 0) AS feature1_cleaned FROM training_data;. Option A is correct because it uses SELECT * EXCEPT (feature1) to include all columns except the original feature1, then uses IFNULL(feature1, 0) to replace null values with zeros and aliases it as feature1_cleaned - this preserves all data points including those with missing val
Question
Exhibits
Options
- ASELECT * EXCEPT (feature1), IFNULL(feature1, 0) AS feature1_cleaned FROM training_data;
- BSELECT * EXCEPT (price, square_feet), price/square_feet AS price_per_sqft FROM training_data WHERE feature1 IS NOT NULL;
- CSELECT * EXCEPT(price, square_feet, feature1), price/square_feet AS price_per_sqft, IFNULL(feature1, 0) AS feature1_cleaned FROM training_data;
- DSELECT * FROM training_data WHERE feature1 IS NOT NULL;
How the community answered
(34 responses)- A91% (31)
- B3% (1)
- C6% (2)
Explanation
Option A is correct because it uses SELECT * EXCEPT (feature1) to include all columns except the original feature1, then uses IFNULL(feature1, 0) to replace null values with zeros and aliases it as feature1_cleaned - this preserves all data points including those with missing values, which aligns with the stated goal. The query keeps all other columns intact (including price and square_feet, which are needed for training) without performing any unnecessary transformations.
Topics
Community Discussion
No community discussion yet for this question.



