Preparing and using data for analysis
Drill 20 practice questions focused entirely on Preparing and using data for analysis for the Google Cloud PDE exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.
Your company publishes a curated BigQuery dataset as an Analytics Hub listing so that external partner organizations can subscribe to it. Leadership wants to know which partners are actually querying the shared data and how often, so they can justify continued investment and identify inactive subscribers. What is the most appropriate way to obtain this usage information?
A retail analytics company wants to monetize a curated BigQuery dataset by sharing it with dozens of external partner organizations. Requirements: partners must query the data from their own projects (paying for their own compute), the provider must be able to revoke access and publish updates centrally without copying data to each partner, and the provider must track which organizations have subscribed. Which approach best meets these requirements?
Your finance team uses a Looker dashboard backed by BigQuery that runs the same set of aggregation queries against a 400 GB partitioned sales table hundreds of times each morning. Executives complain that each dashboard tile takes 6-9 seconds to load, and on-demand query costs are climbing. You need sub-second dashboard response times with minimal changes to the existing SQL and no separate infrastructure to manage. What should you do?
A retail analytics team uses BigQuery ML to forecast weekly sales. Business stakeholders want to understand how much of each forecast is driven by trend, weekly seasonality, and holiday effects so they can validate the model with domain knowledge. The team already has a trained ARIMA_PLUS model. Which approach lets them retrieve the decomposed forecast components alongside the point forecasts with the least effort?
A retail analytics team stores three years of daily sales records in BigQuery, including columns for date, store_id, product_category, and units_sold. They want to produce a 90-day forecast of units_sold per store and product category directly in BigQuery, without exporting data to another platform. The analysts are SQL-proficient but have no experience managing ML infrastructure. Which approach best meets these requirements?
A data scientist is building a logistic regression model in BigQuery ML to predict customer churn. The training table includes a numeric 'monthly_spend' column with a wide range of values and a 'subscription_tier' column containing text values like 'Basic', 'Pro', and 'Enterprise'. They want the same preprocessing (standardizing the numeric column and one-hot encoding the categorical column) to be automatically applied during both training and prediction without maintaining separate SQL logic. What is the most appropriate approach?
A data science team trained a boosted tree classifier using BigQuery ML to predict customer churn. Batch scoring in BigQuery works well for their nightly reports, but the product team now needs sub-100ms online predictions served from a customer-facing web application. What is the most appropriate way to meet this low-latency serving requirement while reusing the already-trained model?
A data engineer is building a BigQuery ML logistic regression model to predict ride-cancellation likelihood. Analysts note that cancellation behavior depends heavily on the *combination* of pickup_city and time_of_day (e.g., 'downtown at rush hour' behaves very differently from 'suburb at midnight'), rather than either feature alone. The engineer wants the model to learn these interaction effects directly during training without manually pre-joining string values in a staging table. Which approach should the engineer use inside the CREATE MODEL statement?
A retail analytics team uses BigQuery to store transaction data. A data scientist wants to build a churn prediction model using Vertex AI's custom training with scikit-learn, but the raw features live in BigQuery. The team needs to generate a training dataset where numeric columns are standardized and categorical columns are one-hot encoded, and they want this preprocessing logic to be reusable and version-controlled outside of BigQuery ML. What is the most appropriate approach to prepare this data for AI/ML?
A retail analytics team stores three years of daily sales history in a BigQuery table with columns sale_date (DATE), store_id (STRING), and revenue (FLOAT64). They want to generate a 30-day revenue forecast per store directly in BigQuery, using SQL only, and need the model to automatically handle seasonality, holidays, and trend without manual feature engineering. Which approach best meets these requirements?
A data engineering team at a media company wants to build a content recommendation feature. They have 5 million article titles and descriptions stored in a BigQuery table. They need to compute semantic similarity between articles so that editors can find related content using SQL, without exporting data or managing separate infrastructure. Which approach best prepares this text data for the similarity use case?
A data science team at a retail company is training a boosted tree classifier in BigQuery ML to predict customer churn. Their initial model underperforms, and they suspect the default values for parameters like the number of trees, learning rate, and max tree depth are suboptimal. They want to systematically search across ranges of these parameters within BigQuery ML without exporting the data or building a separate Vertex AI pipeline. What is the most appropriate approach?
A data scientist is training a BigQuery ML logistic regression model to predict customer churn. In the training table, only about 2% of the rows represent churned customers. After training, the model reports very high accuracy but almost never predicts the positive (churn) class, making it useless for the business. The team wants to improve the model's ability to identify the minority class while continuing to use BigQuery ML. What is the most appropriate action?
A data science team trains a BigQuery ML model to classify incoming support tickets into one of five priority categories. The categories are roughly balanced. After running ML.EVALUATE, they want a single metric that summarizes how often the model assigns the correct category across all five classes, treating each class equally. Which evaluation output should they focus on?
A data science team is building a BigQuery ML logistic regression model to predict customer churn. One key input is customer_age, a continuous integer, and another is annual_income, which ranges from a few thousand to several million and is heavily right-skewed. During evaluation the model underperforms, and the team suspects the raw scale and skew of these numeric features are hurting training. They want the preprocessing logic to be applied consistently and automatically at both training and prediction time, without maintaining a separate transformation pipeline. What should they do?
A data scientist trains a BigQuery ML boosted tree model daily on an orders table that grows continuously. They want the model evaluation metrics to be comparable across daily training runs, and they need each row deterministically assigned to either training or evaluation so that a given order always lands in the same split even as new rows arrive. Which approach best meets these requirements?
A data engineer is building a BigQuery ML logistic regression model to predict customer churn. The raw table contains a transaction timestamp, several engineered numeric features, and the churn label. During evaluation, the model reports 98% accuracy on the test set, but performance drops sharply in production. On review, the engineer notices they computed the mean and standard deviation for feature normalization across the entire table before running CREATE MODEL, and BigQuery ML randomly split rows into training and evaluation sets. What is the most likely cause of the inflated evaluation metrics, and how should it be fixed?
A data science team trains a BigQuery ML model to predict customer churn. During training they compute several engineered features in the SELECT statement: a log transform of monthly_spend, a ratio of support_tickets to tenure_months, and a bucketized age. When the model is deployed and analysts run ML.PREDICT with raw customer rows, predictions are wildly inaccurate compared to evaluation results. The team wants the preprocessing to be applied automatically and identically at both training and prediction time with minimal maintenance. What should they do?
A data science team is training a BigQuery ML linear regression model on a sales dataset. About 8% of rows have NULL values in the numeric feature `avg_basket_value`. They want the imputation logic applied automatically and identically during both training and prediction, without maintaining separate preprocessing SQL for inference. Which approach should they use?
A data science team at a media company wants to build a BigQuery ML logistic regression model to classify news articles by topic. The raw training table contains a single free-text column called 'body'. They want the model to learn from word-frequency signals in the text, and they need the same text preprocessing to be applied automatically at prediction time without re-writing transformation SQL. Which approach best meets these requirements?
More PDE practice
Keep going with the other Professional Data Engineer domains, or take a full timed mock exam.
← Back to PDE overview