PDE domain - 15% of the exam

Preparing and Using Data for Analysis

Preparing and Using Data for Analysis is 15% of the PDE exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

50
Practice questions
3
Objectives
11
Easy
18
Medium
21
Hard

Where people go wrong

  • Choosing the wrong chunk size for embeddings

    The wrong answers embed a whole manual, contract or PDF as one vector, or go the other way and embed single sentences, 50-character fragments or whole pages. A whole-document vector averages many topics, so retrieval matches themes instead of the clause that answers the question. Sentence-level and fragment chunks lose surrounding context, and page boundaries split one argument and mix unrelated clauses. The correct answers split documents into passages of a few hundred tokens, such as roughly 500 tokens, with a small overlap, and embed each chunk separately.

    See it in a sample question
  • Rebuilding preprocessing outside the model

    The wrong answers keep feature engineering somewhere else: a parallel set of scheduled queries, a Dataflow job, a one-off query that bakes values into a table, or transforms applied only at scoring time. Each one lets training and prediction preprocessing drift apart, which is training and serving skew. A TRANSFORM clause in CREATE MODEL is stored with the model, so ML.PREDICT reapplies the same bucketing, scaling and encoding to raw rows automatically.

    See it in a sample question
  • Adding capacity instead of precomputing the aggregate

    The wrong answers speed up a slow Looker tile by adding compute or cache around the same large scan: more slots, BI Engine over a raw table too big for the reservation, or table calculations that run on rows already returned. The scan still happens on every refresh. A materialised view precomputes the aggregate and BigQuery rewrites matching queries to it, BI Engine then accelerates that small working set, and a stale view needs max_staleness and enable_refresh rather than more memory.

    See it in a sample question
  • Sharing the source when only a projection is allowed

    The wrong answers hand consumers access to the raw data: Data Viewer on each source dataset, an Analytics Hub listing of the full tables, or a column policy that still leaves a role on the underlying table. The requirement names only certain columns or rows, with no role on the source. An authorised view in a separate dataset selects the approved columns and filters rows, and consumers get a role on that dataset alone. When the consumer is an external partner, that dataset is what the Analytics Hub listing publishes.

    See it in a sample question
  • Mixing up reversible and one-way Cloud DLP transformations

    The wrong answers pick a Cloud DLP transformation that contradicts the recovery requirement. Redaction and cryptographic hashing are both one-way, so a fraud team holding the wrapping key cannot get the original values back. Format-preserving encryption with a KMS-wrapped key is reversible by key holders, so it fails when the requirement says the email must be irreversibly obscured. Match the transformation to whether recovery is needed: encryption when it is, hashing when it is not.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free samplePreparing and Using Data for Analysishard

A team is building a RAG pipeline over long technical manuals stored in Cloud Storage. They plan to compute embeddings for each chunk of text and store them for vector search. The manuals are dense and full of cross-references, and the team must balance retrieval precision against the cost of computing and storing embeddings. Which chunking strategy most directly supports both goals?

  • ASplit each manual into overlapping chunks of a few hundred tokens with a small overlap between adjacent chunks, then embed each chunk Correct
  • BEmbed the entire manual as a single document so each manual is represented by exactly one vector and storage cost is minimised
  • CSplit each manual into one chunk per sentence and embed every sentence individually for maximum granularity
  • DEmbed only the table of contents and section headings of each manual, then retrieve full sections by heading match at query time
Choose a chunking strategy for unstructured text that balances embedding cost against retrieval precision in a RAG pipeline. Embedding granularity directly controls retrieval quality. Chunks of a few hundred tokens are small enough that one chunk usually concerns one topic, so its embedding sits near user questions about that topic, yet large enough to retain self-contained meaning. A modest overlap between adjacent chunks prevents answers that straddle boundaries from being lost, and the total chunk count stays manageable for both compute and vector storage budgets.

Why A is correct: Chunking into a few hundred tokens keeps each vector focused on a single topic so cosine similarity discriminates between sections, while a small overlap preserves context that straddles chunk boundaries. This is the standard RAG trade-off that buys retrieval precision without exploding the vector count.

Why B is wrong: One vector per manual minimises storage but is tempting only on cost grounds: a single embedding for an entire dense document averages away topic detail, so retrieval cannot locate the specific section that answers a user query, defeating the point of RAG.

Why C is wrong: Per-sentence chunks are tempting because finer granularity sounds like better precision, but very short chunks lose surrounding context, multiply embedding cost dramatically, and force the generator to stitch many tiny snippets together to answer one question.

Why D is wrong: Indexing only headings is tempting because it is cheap, but headings are short and generic, so the embedding distance between user questions and headings is a poor proxy for actual content relevance and many useful passages will never be retrieved.

Free samplePreparing and Using Data for Analysishard

A team has trained a BigQuery ML boosted tree classifier on raw event data and used a TRANSFORM clause in the CREATE MODEL statement to perform bucketing, scaling, and one-hot encoding of several columns. They now want to score new events in production. Which statement most accurately describes how the TRANSFORM clause behaves at prediction time?

  • AThe TRANSFORM clause applies only during training, so prediction queries must reproduce the bucketing, scaling, and one-hot encoding in SQL before calling ML.PREDICT
  • BThe TRANSFORM logic is applied automatically to the input rows at prediction time, so ML.PREDICT can be called on the same raw column shape as the training table Correct
  • CThe TRANSFORM clause is rejected for boosted tree models, which require all preprocessing to be done outside BigQuery ML using Dataflow
  • DThe TRANSFORM clause is stored only as metadata for documentation purposes and has no effect on prediction inputs or outputs
Understand how the BigQuery ML TRANSFORM clause keeps training and serving preprocessing consistent. Declaring preprocessing inside the CREATE MODEL TRANSFORM clause bakes it into the model. At inference, ML.PREDICT runs the same TRANSFORM expressions against the raw input rows before scoring, which guarantees that bucket boundaries, scaling parameters, and one-hot vocabularies match training. This is the recommended pattern in BigQuery ML to eliminate training and serving skew without a separate Dataflow or Vertex AI preprocessing job.

Why A is wrong: Manually re-implementing the preprocessing is tempting because preprocessing pipelines often must be duplicated in other ML stacks, but it is exactly what TRANSFORM is designed to remove; rebuilding it by hand reintroduces training and serving skew.

Why B is correct: The TRANSFORM clause becomes part of the saved model artefact. BigQuery ML applies the same preprocessing automatically inside ML.PREDICT, so callers pass raw rows in the original schema and the warehouse keeps training and serving preprocessing identical, eliminating a common source of skew.

Why C is wrong: Routing preprocessing through Dataflow is tempting because boosted trees are sometimes associated with external pipelines, but BigQuery ML supports TRANSFORM with boosted tree models, and pushing preprocessing out of the warehouse is unnecessary.

Why D is wrong: Treating TRANSFORM as documentation is tempting because the syntax sits near other declarative options, but the clause is functional: it actually executes against inference rows, and ignoring that would silently produce wrong predictions.

Free samplePreparing and Using Data for Analysismedium

A media analytics team runs a Looker dashboard that aggregates two years of ad impression data from a BigQuery table partitioned by event_date and clustered by campaign_id. The headline tile, a campaign-level summary for the last 30 days, takes 35 seconds to render and scans roughly 800 GB on every refresh because analysts frequently change the campaign filter. The underlying SQL recomputes the same SUM and COUNT DISTINCT expressions on every load. The team wants sub-second response for this tile without changing the dashboard layout. Which approach best meets that goal?

  • AAdd a Looker derived table that performs the same aggregation in SQL and configure a persistent derived table with a daily rebuild trigger so each rebuild rescans the base partitions.
  • BSwitch the headline tile to a Looker custom field that uses table_calculations to compute the SUM and COUNT DISTINCT inside the browser after pulling raw rows.
  • CIncrease the BigQuery slot reservation for the project from 500 to 2000 baseline slots so the existing query has more parallelism on each refresh.
  • DCreate a BigQuery materialised view that pre-aggregates impressions and unique users per campaign_id and event_date, then point the Looker Explore to the materialised view so queries hit precomputed rows. Correct
Use BigQuery materialised views to precompute frequently requested aggregations so Looker dashboards serve repeat queries from maintained summary rows. BigQuery materialised views store the result of an aggregation query and are kept fresh by an automatic incremental refresh process. When a query against the base table matches the materialised view's structure, the optimiser rewrites the plan to read the much smaller maintained table, which cuts both bytes scanned and execution time, the two factors that drive Looker tile latency for repeat aggregate queries.

Why A is wrong: A daily-rebuilt persistent derived table can speed reads, but it does not benefit from BigQuery's automatic incremental refresh, and a single daily build means same-day impressions are missing until the next rebuild, which the team needs for current-day filtering.

Why B is wrong: Table calculations execute client-side on rows already returned, so the underlying query still scans 800 GB and transfers a large result set, making the tile slower rather than faster and consuming significant browser memory.

Why C is wrong: More slots can shorten wall-clock time, but the query still scans 800 GB on every refresh and the cost scales linearly with reservation size, which is wasteful when precomputed aggregates would reduce work by orders of magnitude.

Why D is correct: A materialised view persists the pre-aggregated SUM and approximate distinct counts, and BigQuery automatically routes matching queries to the maintained results, reducing the 800 GB scan to a small read of the summarised rows and delivering sub-second response without altering the dashboard.

Free samplePreparing and Using Data for Analysismedium

A healthcare analytics team exposes a BigQuery dataset of patient encounters to a group of research analysts who must aggregate outcomes by hospital region. The underlying table contains direct identifiers such as patient name, national health identifier, and date of birth, and the analysts must never see these columns or any row that has been flagged as withdrawn from research. The dataset owners want to grant access without duplicating data and without giving the analysts any role on the underlying table. Which approach best satisfies these requirements?

  • ACreate an authorised view in a separate dataset that selects only the non-identifying columns and filters out withdrawn rows, grant the analysts the BigQuery Data Viewer role on that dataset, and authorise the view against the source dataset. Correct
  • BGrant the analysts the BigQuery Data Viewer role on the source dataset and rely on column-level access policies attached to the identifier columns to block access to those fields at query time.
  • CSchedule a query that copies the de-identified subset into a new table each night, grant the analysts the BigQuery Data Viewer role on that table, and rotate the snapshot daily to keep it fresh.
  • DCreate a materialised view that aggregates encounters by region and grant the analysts the BigQuery Data Viewer role on the materialised view only, leaving the base table with no analyst-facing grants.
Use authorised views to delegate filtered, column-restricted access to BigQuery data without granting any role on the source table. An authorised view runs with the view's own identity against the source dataset, so consumers who hold a role only on the view's dataset can read the projected columns and rows without any direct permission on the underlying table, and the view's SELECT and WHERE clauses enforce both column exclusion and row filtering in one object.

Why A is correct: Authorised views let the view's service identity read the source while the analysts hold no role on the source itself, and the SELECT list and WHERE clause enforce column and row exclusion in a single object.

Why B is wrong: Column-level policies can hide individual columns but the requirement also forbids any role on the underlying table, and policies alone do not enforce the row filter for withdrawn participants.

Why C is wrong: Nightly copies duplicate the data, which the requirement explicitly rules out, and any change between snapshots is invisible to analysts until the next run, so freshness is also poor.

Why D is wrong: Materialised views are designed for query acceleration and do not implement view-level access delegation, so analysts still need read access on the base table to query a materialised view that references it.

Free samplePreparing and Using Data for Analysismedium

A telecommunications company stores raw customer support transcripts in a BigQuery table that downstream teams use to train classification models. Compliance has determined that mobile numbers, email addresses, and named individuals must be obscured before the transcripts leave the platform, but the original characters must remain recoverable by a small fraud team that holds the wrapping key. The data engineering lead wants to produce a derived table that the ML teams can read directly while keeping the recovery path intact. Which Cloud DLP transformation should be applied when generating the derived table?

  • AApply the redact transformation to the detected mobile number, email, and person name infoTypes so that the matched substrings are removed from the transcripts.
  • BApply the cryptographic format-preserving encryption transformation using a KMS-wrapped key on the mobile number, email, and person name infoTypes so the original values can be recovered by holders of the key. Correct
  • CApply the cryptographic hashing transformation on the detected mobile number, email, and person name infoTypes so that each value is replaced with a deterministic hash digest.
  • DApply the bucketing transformation on the detected mobile number, email, and person name infoTypes so that each value is replaced by a coarse range or category label.
Choose a reversible Cloud DLP transformation when masked sensitive data must be recoverable by holders of a wrapping key. Cryptographic format-preserving encryption in Cloud DLP wraps a KMS-managed key and replaces detected values with ciphertext of the same character set and length, so the derived table can be shared with downstream consumers while the original values remain recoverable by anyone with access to unwrap the key.

Why A is wrong: Redaction simply removes the matching text, which destroys the original characters and prevents the fraud team from ever recovering them, so it fails the reversibility requirement.

Why B is correct: Format-preserving encryption with a KMS-wrapped key replaces the matched values with ciphertext of the same shape and is fully reversible by anyone who can unwrap the key, which matches both the masking and recovery requirements.

Why C is wrong: Cryptographic hashing is a one-way function, so although the hashes are deterministic and useful for joins, the fraud team cannot recover the original values from the digest.

Why D is wrong: Bucketing is designed for numeric or ordinal data and collapses values into ranges, which is meaningless for free-text personal data and offers no path to recover the original strings.

Other domains in this exam

See also the PDE cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Google Cloud. Original, blueprint-aligned practice material only.