Back to exam

Associate Data Practitioner Cheatsheet

Google Cloud Certified - Associate Data Practitioner

Download free PDF

Data preparation and ingestion

Choose the destination

  • **Cloud Storage** holds objects such as CSV, Parquet, text and audio files. **BigQuery** is a managed analytical warehouse for SQL, reporting and ML over large datasets.
  • **Cloud SQL** provides managed relational databases for transactional applications. **Firestore** serves application documents. **Bigtable** serves large key-based, wide-column workloads with low-latency access.
  • A mixed-source pipeline can land feedback files in **Cloud Storage**, load relational records into **BigQuery**, and send live events through **Pub/Sub** for processing. Choose destinations by access pattern and data shape.
  • **CSV** needs explicit handling of delimiters, headers, quoting and types. **Avro** is row-oriented with a schema; **Parquet** is columnar and supports efficient analytical reads.

Load and transfer data

  • **bq load** creates a BigQuery batch load from local files or supported Cloud Storage objects. Match the schema, format, write disposition and source location to the target dataset.
  • **BigQuery Data Transfer Service** automates recurring imports from supported sources such as Google Ads. Configure historical backfills and refresh schedules within the connector's supported range.
  • **Storage Transfer Service** moves data into Cloud Storage from supported object stores and filesystems. Agent pools support on-premises filesystem transfers, bandwidth limits and progress reporting.
  • **Transfer Appliance** supports offline bulk ingestion when network transfer would take too long. Estimate bytes divided by usable bandwidth, then include copying, shipping and ingestion time.
  • **gcloud storage** suits direct object copies. For many small files, measure listing and per-object overhead; use supported parallelism or disjoint prefixes without overlapping transfer scope.
  • **Database Migration Service** supports initial copy and ongoing replication for eligible database migrations. Validate compatibility and data integrity, then coordinate final synchronization and cutover. Reuse suitable existing BigQuery connectors when that reduces migration work.

Prepare and validate

  • **ETL** transforms data before loading the analytical destination. **ELT** loads first and transforms in the warehouse. Apply privacy or validation controls before loading when raw sensitive data must never enter the target.
  • Profile **nulls, duplicates, types, ranges and formats** before transformation. Standardize casing and dates, validate required fields, quarantine invalid records and record data quality counts.
  • Use BigQuery **TRIM**, **UPPER**, **SAFE_CAST**, **COALESCE** and conditional expressions for SQL cleaning. Decide whether missing values should remain null, be rejected or be imputed.
  • Deduplicate using a stable business key and a deterministic tie-breaker, for example **ROW_NUMBER()** ordered by update time, followed by **QUALIFY**. Preserve the latest valid record deliberately.
  • **Sensitive Data Protection** inspects and de-identifies sensitive values through supported masking, redaction or tokenization techniques. Validate findings and transformations before releasing data.
  • **Parameterized queries** keep user input separate from SQL syntax. Cleaning text alone is insufficient protection against SQL injection; enforce validation and safe query construction at the application boundary.

Match the transformation tool

  • **BigQuery SQL** is a low-overhead choice for filtering, joining and aggregating data already in the warehouse. Use staging tables and write curated results for consumers.
  • **Cloud Data Fusion** provides visual, low-code pipelines with source, transformation and sink plugins. Wrangler supports interactive preparation; validate the resulting pipeline and quality rules.
  • **Dataflow** runs Apache Beam batch and streaming transformations with managed scaling. Use it for high-volume filtering, enrichment and aggregation before loading BigQuery.
  • **Dataproc** runs existing Spark or Hadoop workloads. **Dataproc Serverless** runs supported Spark batches without managing a cluster; preserve useful Spark code and choose resources for the workload.
  • **Cloud Run functions** suit lightweight event-triggered work, such as submitting a BigQuery load when an object is finalized. Make repeated event delivery safe and keep heavy processing in an appropriate data service.

Data analysis and presentation

SQL patterns for analysis

  • **GROUP BY** aggregates at the requested grain; **WHERE** filters input rows and **HAVING** filters aggregate groups. Define the time period and business dimensions before calculating metrics.
  • **JOIN** combines related columns using keys; verify cardinality to prevent duplicated totals. **UNION ALL** stacks compatible rows from regional tables. **UNION DISTINCT** also removes duplicate rows; **CROSS JOIN** creates combinations.
  • A moving average can use **AVG(sales) OVER (PARTITION BY location ORDER BY sale_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW)**. This covers seven rows; fill missing dates when seven calendar days are required.
  • **ROW_NUMBER** gives a unique sequence; **RANK** preserves ties and leaves gaps; **DENSE_RANK** preserves ties without gaps. Partition by month to select the top regions separately for each period.
  • **DATE_SUB** defines relative date cutoffs; **DATE_TRUNC** aligns month or week boundaries. Distinguish a rolling month from a completed calendar month and apply the intended time zone.

Tables, views and query cost

  • **Native tables** store data in BigQuery. **External tables** query supported data in Cloud Storage or Google Drive without first loading it; account for source access, location and performance.
  • **Object tables** expose metadata for unstructured objects, such as audio in Cloud Storage, through a BigQuery connection. Supported ML integrations can access object content with appropriate permissions.
  • A **logical view** stores SQL and evaluates it at query time. A **materialized view** stores reusable results for supported query patterns and can accelerate repeated aggregation; check SQL and refresh restrictions.
  • **Scheduled queries** write periodically refreshed results to tables when transformations need broader SQL support. Freshness follows the schedule; a saved query alone does not automate execution.
  • **Partitioning** reduces scanned data when filters prune partitions; ingestion-time tables expose **_PARTITIONTIME** and, for daily partitions, **_PARTITIONDATE**. **Clustering** organizes blocks by selected columns.
  • Select needed columns, filter early and inspect bytes processed or execution details. **On-demand** pricing follows data scanned; **capacity reservations** allocate slots. Use department projects and reservation assignments to isolate capacity and spending responsibility.
  • **Capacity pricing** depends on configured baseline, commitments and autoscaling limits; a reservation alone is not a fixed bill. Query quotas can constrain usage, while budget alerts notify rather than stop work.

BigQuery ML essentials

  • **BigQuery ML** trains supported models using **CREATE MODEL** near the data. For binary churn, purchase or click labels, **LOGISTIC_REG** predicts class probabilities; set **input_label_cols** to the target column.
  • **Linear regression** predicts numeric outcomes. **K-means** groups similar observations without labels. **Matrix factorization** models user-item interactions for recommendations; match model type to the learning task.
  • Keep the target out of input features and avoid **data leakage** from future events. Use representative training and evaluation splits, preserving time order when forecasting or simulating future predictions.
  • **ML.EVALUATE** measures model quality; **ML.PREDICT** scores new records with compatible features. For classification, inspect precision, recall, confusion matrix and decision threshold rather than accuracy alone.
  • **ARIMA_PLUS** models time-series patterns such as trend and seasonality. **ML.FORECAST** generates future values and intervals; provide timestamps, target values and series identifiers when forecasting multiple products.
  • **Data drift** is a change in input distributions over time. **Training-serving skew** is a mismatch between training and serving inputs; **concept drift** changes the relationship between features and outcomes. Investigate quality and performance before retraining.

Python, text and unstructured analysis

  • **Colab Enterprise** provides managed collaborative notebooks for Python, statistical packages and visualizations. Query BigQuery from the notebook and document methods alongside results.
  • Push filters and aggregation into **BigQuery** before downloading results. **BigQuery DataFrames (bigframes.pandas)** offers a pandas-style interface with supported operations executed remotely, avoiding a full local copy.
  • Query **public datasets** by reference when permitted, then save reproducible SQL or notebooks and charts. Data access may be public while query execution still uses the querying project's resources.
  • **BigQuery remote models** connect to supported Vertex AI models, including Gemini, for tasks such as text summarization. Configure a cloud resource connection, service account access, location and model permissions.
  • For **sentiment analysis**, preserve meaningful language signals such as emojis and negation, use representative labeled examples when training, and evaluate on the actual language mix. Validate generated summaries before relying on them.
  • **Cloud Translation** translates text through an API. A **BigQuery remote function** can call an external service through a supported endpoint; plan batching, retries, API quotas and costs.

Looker semantic modeling

  • **Looker** uses **LookML** for governed semantic definitions. **Views** define fields; **Explores** define query entry points and joins. Build a coherent Explore when metrics share compatible business relationships.
  • **Dimensions** describe attributes; **measures** calculate aggregations. A profit-margin measure should use aggregate revenue and cost, with safe division, rather than average row-level percentages blindly.
  • **Custom fields** generate database SQL in an Explore when permissions allow. **Table calculations** operate on returned results; they do not add a persistent warehouse column. LookML changes require development permissions.
  • Define join relationships and keys accurately to protect measures from **fanout**. Add filters and **drill fields** so users can move from regional totals to underlying transactions.
  • **Looker Studio** builds reports with connectors and calculated fields. **Connected Sheets** analyzes BigQuery from Google Sheets; refresh settings and credentials determine when results update.
  • A **Google Sheets external table** can expose a live budget sheet to BigQuery for joining against actuals. Reading live sheet data and refreshing a saved result table are separate operations.

Governed dashboards and delivery

  • **User attributes** store per-user values such as region. A LookML **access_filter** binds an Explore field to an attribute to enforce data restrictions; a visible dashboard filter is a user-controlled selection.
  • **Groups** simplify team permission management. Use folder access to allow broad viewing and team-specific editing; check inherited access because a child folder cannot remove access already inherited from its parent.
  • Separate **content access** from **data access**: permission to view a dashboard does not define which database rows a user may query. Model permissions, user attributes and warehouse security must agree.
  • **Looker schedules** automate recurring dashboard delivery with supported formats and filters. Use the **Looker SDK** for many personalized scheduled plans; verify execution identity and recipient access before distributing sensitive results.

Data pipeline orchestration

Pub/Sub and streaming pipelines

  • **Pub/Sub** decouples event publishers and subscribers. A **topic** receives messages; a **subscription** tracks delivery independently. Acknowledge after successful processing and expect redelivery under normal at-least-once delivery.
  • Use **Dataflow** between Pub/Sub and BigQuery when events need cleaning, enrichment or aggregation. Google-provided templates reduce development; supported templates accept a **UDF** for custom transformations.
  • A **BigQuery subscription** writes Pub/Sub messages directly to a table for compatible schemas and supported processing needs. Preserve raw events in a base table when downstream aggregates must coexist with detailed queries.
  • **Flow control** caps outstanding messages or bytes so subscribers do not exhaust memory. Combine suitable acknowledgment deadlines, lease extension and subscriber scaling to manage bursts.
  • **Dead-letter topics** isolate messages that repeatedly fail. Monitor failures, fix the cause and replay deliberately; retries alone do not solve malformed data or insufficient processing capacity.
  • Use **idempotent writes** or deduplication keys to handle retries safely. Streaming aggregations need explicit event-time windows and late-data rules; track backlog and watermark lag as well as throughput.

Event and batch execution

  • **Cloud Storage finalization events** signal completed object writes. Use Eventarc or supported Pub/Sub notifications to trigger processing; identify the object generation to avoid processing the same event twice.
  • For recurring files, choose between a lightweight **load trigger**, a visual batch pipeline and a continuously running **Dataflow** pipeline according to volume, transformations, latency and operating cost.
  • **Cloud Scheduler** triggers work on a schedule; it does not manage a multi-stage dependency graph. **Workflows** coordinates supported service calls and custom steps; **Cloud Composer** manages Airflow DAGs.
  • Keep **orchestration** separate from heavy computation. An operator submits and monitors work in BigQuery, Dataproc or Dataflow; execute transformations in the service sized for the data.

Dependencies, retries and SQL workflows

  • **Cloud Composer** is managed Apache Airflow. A **DAG** defines tasks and dependencies; operators integrate services. Migrate existing DAGs with their dependencies, connections and environment compatibility checked.
  • For staged pipelines, persist intermediate outputs and make tasks **idempotent**. After correcting a failed stage, clear and rerun appropriate failed or downstream tasks rather than repeat every successful stage.
  • **Dataform** develops BigQuery transformations in **SQLX**, with JavaScript for reusable definitions, Git version control, dependency references and environment-specific compilation settings.
  • **Dataform assertions** test conditions such as uniqueness, non-null fields and valid row values. Build dependency-aware workflows and schedule releases; assertions reveal violations and do not automatically repair data.
  • **Dataproc workflow templates** describe supported job dependencies. Add an appropriate external trigger for scheduled runs; use broader orchestration when workflows also need notifications or other services.

Monitor and troubleshoot

  • For a failed **Dataflow** job, inspect job status, the execution graph, job logs and worker logs. Separate invalid records or permissions errors from resource pressure and source or sink failures.
  • **Cloud Logging** provides event details; **Cloud Monitoring** provides metrics and alerting. Track error rates, throughput, latency, CPU, memory and backlog, then alert on actionable thresholds.
  • For a failed **scheduled query**, inspect its run history and error details first. Use BigQuery job details, **INFORMATION_SCHEMA.JOBS** and audit logs when deeper investigation is needed.
  • Use a dedicated **service account** for execution and distinguish its permissions from the human operator's permissions. **Dataflow Worker** supports worker operations; **Developer**, **Viewer** and **Admin** roles serve different operator needs. Grant only required actions.

Data management

Storage classes and lifecycle

  • **Standard** suits active data; **Nearline**, **Coldline** and **Archive** suit progressively less frequent access. Their minimum storage durations are 30, 90 and 365 days; include retrieval, operations and early-deletion charges.
  • All Cloud Storage classes provide **online access**, including Archive. Choose using access frequency and total cost; monthly retrieval often fits Nearline better than colder classes.
  • **Object Lifecycle Management** applies age or other conditions to deletion and storage-class transitions. Use explicit rules for known policies, such as deleting temporary objects after seven days.
  • **Autoclass** automatically manages classes based on access patterns, useful when older objects may become popular again. Lifecycle rules and Autoclass have compatibility constraints; choose a coherent policy.
  • **BigQuery long-term storage** reduces eligible storage pricing after 90 days without modification; access performance is unchanged. Consider partition-level activity and total query costs before exporting rarely used data.

Retention, expiration and recovery

  • A Cloud Storage **retention policy** prevents early deletion or replacement for its retention period. **Bucket Lock** makes a retention policy irreversible; use it only after validating the compliance requirement.
  • **Object holds** block deletion until released. **Object Versioning** preserves replaced or deleted generations; **soft delete** supports recovery of eligible deletions. Neither alone establishes a mandatory retention period.
  • Cloud Storage lifecycle deletion waits until applicable **retention and holds** permit deletion. Lower-cost storage classes change billing characteristics, not the legal retention guarantee.
  • **BigQuery partition expiration** removes old partitions automatically. For ingestion-time partitions, age follows the partition boundary, not each row's business date. A view filter hides rows without removing storage.
  • **Table and partition expiration** automate deletion; they do not lock data against authorized early deletion. For mandatory retention, combine controlled permissions with appropriately protected retained copies.
  • **BigQuery time travel** recovers recent historical data within its configured window. **Snapshots** preserve read-only table state beyond that window; **clones** are writable copies. Schedule protection to match update frequency and recovery needs.

Location, availability and recovery objectives

  • A Cloud Storage **region** provides redundancy across zones in that region. A **dual-region** stores replicas in a specified region pair; a **multi-region** uses a broad geographic area. Match placement to residency requirements.
  • A **dual-region bucket** can meet a permitted two-region placement policy when the pair is supported. Coordinate bucket and BigQuery dataset locations for loading, querying and transfer costs.
  • **Cloud SQL HA** uses a primary and standby across zones with synchronous replication for zonal resilience. Failover can interrupt connections; clients need retries and reconnection logic.
  • A **read replica** offloads reads and generally replicates asynchronously. It is distinct from an HA standby; cross-region replica promotion can support disaster recovery with possible replication lag and data loss.
  • **RPO** is acceptable data loss; **RTO** is acceptable recovery time. Backups and point-in-time recovery preserve history, while replicas support availability. Verify backup location and restore procedures against a regional failure.

Least privilege and governed sharing

  • **IAM** binds principals to roles at a resource scope. Use groups for people and service accounts for applications; prefer dataset or table scope when project-wide data access is unnecessary.
  • **BigQuery Job User** allows query-job creation in a project; **Data Viewer** allows reading the granted data. Applications that modify data need suitable write permissions, such as scoped **Data Editor**, separately from job permissions.
  • Treat dataset discovery, job execution, table reads and table updates as separate permissions. Avoid broad **BigQuery Admin** or **Data Owner** grants when narrower roles satisfy the task.
  • **Row-level access policies** restrict records. **Policy tags** support column access controls; **dynamic data masking** changes sensitive values for applicable users. Dataset access alone cannot express every row or column restriction.
  • **Authorized views** expose selected or aggregated results without granting direct access to source tables. Grant users access to the view and job execution, and authorize the view against its source data.
  • **Analytics Hub** publishes listings through data exchanges; subscribers query linked datasets without managing a copied dataset. Use private exchanges and partner-specific curated data or supported access policies.
  • Where supported, **data egress restrictions** constrain copying or exporting shared data. Review supported operations and consumer permissions; sharing mechanisms do not automatically define partner-specific row and column rules.

Encryption and sensitive data

  • **Google-managed encryption keys** protect data at rest with minimal key-management work. **CMEK** uses customer-managed Cloud KMS keys for supported services, adding control over key access and lifecycle.
  • **Customer-supplied encryption keys** require the customer to supply key material for supported operations. **Cloud EKM** integrates supported external key management; select the mechanism required by the service and control policy.
  • **AEAD encryption** protects individual values with authenticated encryption and associated data. Plan key granularity and recovery: deleting a shared key can make many users' data unreadable.
  • For employee offboarding, revoke **identity and data access** promptly. Key destruction is a separate, potentially irreversible operation; it is appropriate only when the intended data and key scope require cryptographic erasure.
  • **Encryption**, **masking**, **de-identification** and **authorization** serve different purposes. Encryption at rest does not limit the data returned to an already authorized query user.