Associate Data Practitioner (Google Cloud) — Free Practice Questions
10 free sample questions from a bank of 72, with the correct answers and explanations. No signup required — start practising right now.
1Your retail company wants to predict customer churn using historical purchase data stored in BigQuery. The dataset includes customer demographics, purchase history, and a label indicating whether the customer churned or not. You want to build a machine learning model to identify customers at risk of churning. You need to create and train a logistic regression model for predicting customer churn, using the customer_data table with the churned column as the target label. Which BigQuery ML query should you use?
-------------------------
-------------------------
-------------------------
-------------------------
Answer: B
The short version
B — Create a BigQuery ML logistic regression model with churned as the label. Use CREATE MODEL with OPTIONS(model_type='LOGISTIC_REG', input_label_cols=['churned']) over customer_data.
Key concepts in this question
BigQuery ML: in-database supervised learning with SQL CREATE MODEL statements.
LOGISTIC_REG: model_type for binary classification such as churned versus not churned.
input_label_cols: declares the target label column from customer_data, here churned.
Demographics and purchase history: feature columns the model learns churn risk from.
Why B is correct
Option B declares a logistic regression classifier and names churned as the target label on the customer_data table. That matches the task exactly: binary churn prediction from demographics and purchase history without exporting data. BigQuery ML then trains and evaluates the model in place for scoring at-risk customers.
Why the others are wrong
A. Uses incorrect CREATE MODEL syntax or wrong model_type and does not declare the churned label for logistic regression.
C. Uses a model_type suited to another task such as linear regression or clustering, not binary churn classification.
D. Omits input_label_cols or selects the wrong training data, so it cannot learn churned as the target.
ADP exam tip
For binary prediction in BigQuery, remember LOGISTIC_REG plus input_label_cols equals the label column.
2Your company has several retail locations. Your company tracks the total number of sales made at each location each day. You want to use SQL to calculate the weekly moving average of sales by location to identify trends for each store. Which query should you use?
-------------------------
-------------------------
-------------------------
-------------------------
Answer: C
The short version
C — Weekly moving average with AVG() OVER partitioned by location. Use PARTITION BY location ORDER BY day with ROWS BETWEEN 6 PRECEDING AND CURRENT ROW.
Key concepts in this question
Window function: AVG() OVER computes a rolling aggregate without collapsing rows.
PARTITION BY location: restarts the average per retail store for per-store trends.
ORDER BY day plus 7-row frame: defines the weekly window ending on each day.
Moving average: smooths daily sales variation to reveal trend per location.
Why C is correct
Option C partitions sales by location, orders by day, and averages the current day plus six preceding days. That yields a true 7-day weekly moving average per store directly in SQL. It preserves daily granularity while adding the trend column.
Why the others are wrong
A. Aggregates without the correct per-location partition or weekly frame, so it does not give a per-store 7-day trend.
B. Uses GROUP BY or wrong window bounds that collapse days instead of computing a rolling average.
D. Omits ORDER BY or the ROWS frame, producing an overall average rather than a weekly moving average.
ADP exam tip
Moving average by group means AVG OVER with PARTITION BY the group and a 6-PRECEDING frame for weekly.
3Your company is building a near real-time streaming pipeline to process JSON telemetry data from small appliances. You need to process messages arriving at a Pub/Sub topic, capitalize letters in the serial number field, and write results to BigQuery. You want to use a managed service and write a minimal amount of code for underlying transformations. What should you do?
Use a Pub/Sub to BigQuery subscription, write results directly to BigQuery, and schedule a transformation query to run every five minutes.
Use a Pub/Sub to Cloud Storage subscription, write a Cloud Run service that is triggered when objects arrive in the bucket, performs the transformations, and writes the results to BigQuery.
Use the “Pub/Sub to BigQuery” Dataflow template with a UDF, and write the results to BigQuery.
Use a Pub/Sub push subscription, write a Cloud Run service that accepts the messages, performs the transformations, and writes the results to BigQuery.
Answer: C
The short version
C — Use the Pub/Sub to BigQuery Dataflow template with a UDF. It streams JSON telemetry, capitalizes serial numbers, and loads BigQuery with minimal code.
Key concepts in this question
Pub/Sub to BigQuery template: Google-provided managed Dataflow pipeline for streaming ingest.
UDF: user-defined JavaScript function for light transforms such as upper-casing serial number.
Managed service: Dataflow autoscaling streaming without provisioning workers.
Near real-time JSON telemetry: small-appliance messages needing per-message transform before warehousing.
Why C is correct
The Pub/Sub to BigQuery template provides a managed streaming path with a UDF hook for the serial-number capitalization. It satisfies minimal code because only the UDF is authored while Dataflow handles windowing, scaling, retries, and BigQuery writes. Results land in BigQuery in near real time.
Why the others are wrong
A. Writes raw messages via a BigQuery subscription then batches a 5-minute query, adding latency and leaving the serial transform outside the stream.
B. Builds a Cloud Storage subscription plus a custom Cloud Run transformer, requiring more code, triggers, and operational management.
D. Builds a custom push-subscription Cloud Run service, requiring message handling, scaling, and BigQuery insert code instead of a managed template.
ADP exam tip
Pub/Sub plus light per-message transform with minimal code means Dataflow template plus UDF.
4You want to process and load a daily sales CSV file stored in Cloud Storage into BigQuery for downstream reporting. You need to quickly build a scalable data pipeline that transforms the data while providing insights into data quality issues. What should you do?
Create a batch pipeline in Cloud Data Fusion by using a Cloud Storage source and a BigQuery sink.
Load the CSV file as a table in BigQuery, and use scheduled queries to run SQL transformation scripts.
Load the CSV file as a table in BigQuery. Create a batch pipeline in Cloud Data Fusion by using a BigQuery source and sink.
Create a batch pipeline in Dataflow by using the Cloud Storage CSV file to BigQuery batch template.
Answer: A
The short version
A — Build a Cloud Data Fusion batch pipeline from Cloud Storage to BigQuery. It transforms daily sales CSVs scalably and surfaces data-quality insights.
Key concepts in this question
Cloud Data Fusion: managed visual ETL with Cloud Storage source and BigQuery sink.
Wrangler transformations: no-code cleansing and shaping of CSV sales data.
Data-quality insights: profiling of nulls, errors, and schema issues during preparation.
Scalable batch pipeline: daily file ingest that scales without cluster management.
Why A is correct
A Cloud Data Fusion batch pipeline reads the daily Cloud Storage CSV, applies transforms in Wrangler, and loads BigQuery for reporting. It is quickly built visually, scales as a managed service, and explicitly provides data-quality visibility that pure SQL or template loads do not.
Why the others are wrong
B. Loads the CSV then relies on scheduled SQL scripts, which lacks a managed transform pipeline and built-in quality profiling.
C. Loads BigQuery first then runs Data Fusion BigQuery-to-BigQuery, adding a redundant hop instead of transforming from Cloud Storage directly.
D. Uses a Dataflow CSV-to-BigQuery template that moves data but does not provide the requested data-quality insight experience.
ADP exam tip
CSV in bucket plus transform plus quality insights points to Cloud Data Fusion with Wrangler.
5You manage a Cloud Storage bucket that stores temporary files created during data processing. These temporary files are only needed for seven days, after which they are no longer needed. To reduce storage costs and keep your bucket organized, you want to automatically delete these files once they are older than seven days. What should you do?
Set up a Cloud Scheduler job that invokes a weekly Cloud Run function to delete files older than seven days.
Configure a Cloud Storage lifecycle rule that automatically deletes objects older than seven days.
Develop a batch process using Dataflow that runs weekly and deletes files based on their age.
Create a Cloud Run function that runs daily and deletes files older than seven days.
Answer: B
The short version
B — Configure a Cloud Storage lifecycle rule deleting objects older than seven days. It automatically removes temporary processing files to cut cost.
Key concepts in this question
Lifecycle rule: bucket policy with age condition and Delete action evaluated daily.
Temporary processing files: intermediate objects needed only seven days.
Automatic deletion: no scheduler or function to maintain.
Cost and organization: expired objects stop accruing storage without manual cleanup.
Why B is correct
A lifecycle rule with age greater than seven days and a Delete action natively expires exactly the temporary files described. It is serverless, declarative, runs automatically, and keeps the bucket organized with zero operational code.
Why the others are wrong
A. Schedules a weekly Cloud Run cleanup job, adding custom code, scheduling, and failure modes for a native bucket feature.
C. Runs a weekly Dataflow batch to delete by age, which is heavyweight batch infrastructure for simple object expiry.
D. Runs a daily Cloud Run deleter, adding custom listing, date logic, and IAM maintenance instead of a declarative rule.
ADP exam tip
Auto-delete by age in Cloud Storage always means a lifecycle rule, not custom code.
6You work for a healthcare company that has a large on-premises data system containing patient records with personally identifiable information (PII) such as names, addresses, and medical diagnoses. You need a standardized managed solution that de-identifies PII across all your data feeds prior to ingestion to Google Cloud. What should you do?
Use Cloud Run functions to create a serverless data cleaning pipeline. Store the cleaned data in BigQuery.
Use Cloud Data Fusion to transform the data. Store the cleaned data in BigQuery.
Load the data into BigQuery, and inspect the data by using SQL queries. Use Dataflow to transform the data and remove any errors.
Use Apache Beam to read the data and perform the necessary cleaning and transformation operations. Store the cleaned data in BigQuery.
Answer: B
The short version
B — Use Cloud Data Fusion to transform and de-identify PII before Google Cloud ingestion. Store cleaned patient records in BigQuery.
Key concepts in this question
PII de-identification: masking or tokenizing names, addresses, and diagnoses.
Standardized managed solution: repeatable pipeline applied across all on-premises feeds.
Prior to ingestion: cleaning occurs before sensitive data lands in Google Cloud.
Cloud Data Fusion: managed visual integration for transform and cleansing into BigQuery.
Why B is correct
Cloud Data Fusion provides a standardized managed pipeline that transforms on-premises patient feeds, applies de-identification of PII, and loads cleaned data to BigQuery. It centralizes the logic across feeds so every ingestion path is treated consistently before storage.
Why the others are wrong
A. Builds bespoke Cloud Run cleaning functions, which is custom serverless code rather than a standardized managed de-identification pipeline.
C. Loads raw PII into BigQuery first then inspects with SQL, violating the requirement to de-identify prior to ingestion.
D. Hand-codes Apache Beam cleaning jobs, requiring pipeline development and operations instead of a managed standardized solution.
ADP exam tip
Standardized managed de-identification before ingestion means Data Fusion cleansing into BigQuery.
7You manage a large amount of data in Cloud Storage, including raw data, processed data, and backups. Your organization is subject to strict compliance regulations that mandate data immutability for specific data types. You want to use an efficient process to reduce storage costs while ensuring that your storage strategy meets retention requirements. What should you do?
Configure lifecycle management rules to transition objects to appropriate storage classes based on access patterns. Set up Object Versioning for all objects to meet immutability requirements.
Move objects to different storage classes based on their age and access patterns. Use Cloud Key Management Service (Cloud KMS) to encrypt specific objects with customer-managed encryption keys (CMEK) to meet immutability requirements.
Create a Cloud Run function to periodically check object metadata, and move objects to the appropriate storage class based on age and access patterns. Use object holds to enforce immutability for specific objects.
Use object holds to enforce immutability for specific objects, and configure lifecycle management rules to transition objects to appropriate storage classes based on age and access patterns.
Answer: D
The short version
D — Use object holds for immutability plus lifecycle rules for storage-class tiering. Holds enforce retention while lifecycle cuts cost by age and access.
Key concepts in this question
Object holds: retention and event-based holds that make specific objects immutable for compliance.
Lifecycle management: transitions objects across storage classes by age and access patterns.
Raw, processed, and backup tiers: different access frequencies suited to different classes.
Retention versus cost: immutability must not force all data to stay in expensive Standard storage.
Why D is correct
Object holds provide enforceable immutability on regulated data types while lifecycle rules move aging objects to cheaper classes based on age and access. The combination meets strict retention mandates and reduces cost with an efficient native process.
Why the others are wrong
A. Pairs lifecycle tiering with Object Versioning, but versioning preserves overwritten versions and does not enforce compliance immutability like holds.
B. Pairs class moves with Cloud KMS CMEK encryption, but encryption controls confidentiality and key control, not retention immutability.
C. Uses a custom Cloud Run function to move objects by metadata plus holds, replacing managed lifecycle automation with code to maintain.
ADP exam tip
Immutability means holds, cost tiering means lifecycle rules — encryption and versioning are not retention locks.
8You work for an ecommerce company that has a BigQuery dataset that contains customer purchase history, demographics, and website interactions. You need to build a machine learning (ML) model to predict which customers are most likely to make a purchase in the next month. You have limited engineering resources and need to minimize the ML expertise required for the solution. What should you do?
Use BigQuery ML to create a logistic regression model for purchase prediction.
Use Vertex AI Workbench to develop a custom model for purchase prediction.
Use Colab Enterprise to develop a custom model for purchase prediction.
Export the data to Cloud Storage, and use AutoML Tables to build a classification model for purchase prediction.
Answer: A
The short version
A — Use BigQuery ML logistic regression for purchase prediction. It trains in-warehouse with SQL and needs minimal ML expertise.
Key concepts in this question
BigQuery ML: CREATE MODEL with logistic regression over purchase history, demographics, and interactions.
Limited engineering and ML expertise: SQL-based modeling without custom training code.
In-place training: no export of the BigQuery dataset to external systems.
Binary purchase prediction: likelihood of purchase in the next month.
Why A is correct
BigQuery ML builds the logistic regression classifier directly on the BigQuery dataset with SQL, minimizing engineering effort and ML expertise. There is no data movement, no cluster to manage, and scoring stays in BigQuery for downstream use.
Why the others are wrong
B. Uses Vertex AI Workbench for custom modeling, requiring notebook development, frameworks, and ML expertise.
C. Uses Colab Enterprise for custom modeling, requiring Python development and pipeline management instead of SQL.
D. Exports to Cloud Storage then uses AutoML Tables, adding export overhead and a separate training system.
ADP exam tip
Predict in BigQuery with minimal expertise means BigQuery ML logistic regression in SQL.
9You are designing a pipeline to process data files that arrive in Cloud Storage by 3:00 am each day. Data processing is performed in stages, where the output of one stage becomes the input of the next. Each stage takes a long time to run. Occasionally a stage fails, and you have to address
the problem. You need to ensure that the final output is generated as quickly as possible. What should you do?
Design a Spark program that runs under Dataproc. Code the program to wait for user input when an error is detected. Rerun the last action after correcting any stage output data errors.
Design the pipeline as a set of PTransforms in Dataflow. Restart the pipeline after correcting any stage output data errors.
Design the workflow as a Cloud Workflow instance. Code the workflow to jump to a given stage based on an input parameter. Rerun the workflow after correcting any stage output data errors.
Design the processing as a directed acyclic graph (DAG) in Cloud Composer. Clear the state of the failed task after correcting any stage output data errors.
Answer: D
The short version
D — Model staged processing as a Cloud Composer DAG and clear the failed task. Resume from the failure so final output arrives fastest.
Key concepts in this question
Staged pipeline: output of one long stage feeds the next on daily 3am files.
Clear failed task state: reruns only the corrected stage and downstream tasks.
Time to final output: avoiding rework of completed long stages is decisive.
Why D is correct
A Composer DAG expresses the stage dependencies natively, so after fixing a stage failure the operator clears that task state and the DAG resumes from that stage. Completed long stages are not recomputed, which minimizes delay to the final output for daily 3am arrivals.
Why the others are wrong
A. Runs a monolithic Dataproc Spark program that waits for input on error, forcing manual intervention and rerun of prior work.
B. Models stages as Dataflow PTransforms and restarts the whole pipeline, reprocessing successful stages.
C. Uses Cloud Workflow with parameterized jumps to a stage, which is manual stage routing rather than dependency-aware DAG resume.
ADP exam tip
Long stages plus fail-and-resume-fast means Composer DAG — clear the failed task, keep completed work.
10Another team in your organization is requesting access to a BigQuery dataset. You need to share the dataset with the team while minimizing the risk of unauthorized copying of data. You also want to create a reusable framework in case you need to share this data with other teams in the future. What should you do?
Create authorized views in the team’s Google Cloud project that is only accessible by the team.
Create a private exchange using Analytics Hub with data egress restriction, and grant access to the team members.
Enable domain restricted sharing on the project. Grant the team members the BigQuery Data Viewer IAM role on the dataset.
Export the dataset to a Cloud Storage bucket in the team’s Google Cloud project that is only accessible by the team.
Answer: B
The short version
B — Share via Analytics Hub private exchange with data egress restriction. It grants governed access and creates a reusable sharing framework.
Key concepts in this question
Analytics Hub: governed data-exchange framework for sharing BigQuery datasets across teams.
Private exchange with egress restriction: prevents unauthorized copying or exfiltration outside the exchange.
Reusable framework: future teams are onboarded to the same exchange pattern.
Least-copy sharing: teams query shared data without duplicating the dataset.
Why B is correct
An Analytics Hub private exchange publishes the dataset once with egress restriction and grants the requesting team access. It minimizes copy risk by keeping data governed in place while establishing a repeatable exchange other teams can later join.
Why the others are wrong
A. Creates authorized views in the other team's project, which scopes one share but does not provide the reusable exchange framework requested.
C. Uses domain restricted sharing plus BigQuery Data Viewer on the dataset, which still permits query-result copying and is not a governed exchange.
D. Exports the dataset to the team's Cloud Storage bucket, which is an outright copy and maximizes exfiltration risk.
ADP exam tip
Governed reusable BigQuery sharing with anti-copy control means Analytics Hub plus egress restriction.