↑ ↓ to move, Enter to open, Esc to close

    GCP-PDEProfessional Data Engineer

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search

    Exams / GCP-PDE / D1 Ingesting and processing the data

    D1.1

    Ingesting and processing the data (part 1 of 3)

    • 3 min read
    • 5 sections
    • 29 questions
    • Free preview
    • Exam domain: Ingesting and processing the data
    You are reading a free preview. The rest of the GCP-PDE course unlocks with an Exam pass or All access.See plans

    1. Streaming ingestion: Pub/Sub → Dataflow → sink

    Pub/Sub is "an asynchronous and scalable messaging service that decouples" producers from consumers, so bursts are buffered independently of processing. Dataflow runs Apache Beam pipelines and "uses the same programming model for both batch and" streaming.

    Reference streaming pipeline

    Need Pick
    Bursty global devices / clickstream / votes Pub/Sub (devices or gateways publish directly)
    Stateful processing, windows, late data Dataflow (Beam)
    Ad hoc analytics BigQuery
    Low-latency serving of live results Bigtable
    Per-message serverless job Pub/Sub push subscription → Cloud Run function

    Pub/Sub subscriptions:

    • Push: "In push delivery, Pub/Sub initiates requests to your subscriber"; authentication uses a signed JWT.
    • Unacked or late-acked messages are redelivered: "Leaving messages unacknowledged, whether intentionally or not, creates backlog issues and duplicate deliveries."
    • Seek can replay previously acknowledged messages if acknowledged-message retention is on.

    2. Windows, watermarks, late data

    Window Use
    Fixed (tumbling) Non-overlapping periods
    Sliding (hopping) Moving average: size 30 s, period 5 s
    Session "A session window contains elements within a gap duration of another element." Visit = 30 min gap

    A watermark is Dataflow's estimate of event-time completeness; data behind it is late data. Trigger AfterWatermark.pastEndOfWindow() fires when the window closes. Data freshness (event time to processing time) above your SLA means the pipeline is slow: optimize or add workers.

    3. BigQuery ingestion

    Source Path
    Custom streaming / preprocessing at scale Dataflow ("If you must support custom streaming data sources, or preprocess ... use Dataflow")
    Exactly-once streaming Dataflow STORAGE_WRITE_API mode; 3 GBps in us/eu multi-regions, 300 MBps elsewhere
    Scheduled files from Cloud Storage BigQuery Data Transfer Service
    On-prem MySQL, scheduled/incremental DTS MySQL connector (needs watermark columns)
    Oracle / MySQL / PostgreSQL CDC Datastream (private connectivity for VPC sources)
    No-code scheduled transform BigQuery pipelines with data preparation
    Bad CSV rows Dataflow CSV template with badRecordsOutputTable (dead-letter table)
    Kafka Dataflow Kafka to BigQuery template, brokers reachable from workers

    Read side: use column projection or a query so Dataflow reads only needed columns. Large joins: CoGroupByKey rather than side inputs.

    4. Data protection and networking

    • BigQuery CMEK: keys from Cloud KMS; create CMEK-protected storage and migrate.
    • Sensitive Data Protection (Cloud DLP): content.inspect for in-flight detection; de-identify inside a Dataflow pipeline before the sink.
    • Dataflow without external IPs needs Private Google Access on the subnetwork.
    • Batch job failure after starting with DoFn errors: "The pipeline fails completely when a single bundle fails four times."

    5. Moving data in bulk

    Replication RPO by bucket type

    • Storage Transfer Service uses TLS, also over Interconnect; agents handle on-premises sources.
    • Hours for petabytes → Interconnect + Storage Transfer Service; Transfer Appliance is for slow links and takes much longer.
    • Turbo replication: "For buckets using turbo replication, the RPO for objects is 15 minutes." Default replication: 12 hours.

    Exam traps

    • Pub/Sub is not a processor: windowing and late-data handling belong to Dataflow.
    • Fixed window ≠ moving average; use sliding with a period.
    • Exactly-once into BigQuery = Storage Write API, not the legacy streaming API; regional tables cap at 300 MBps.
    • BigQuery encryption keys protect the table; moving to CMEK means new storage + migration in the expected answer.
    • Dead-letter/bad-record tables beat max_bad_records=0.
    • Removing hops lowers latency (Dataflow reading Kafka directly).
    • Old names: Cloud Functions = Cloud Run functions; Cloud IoT Core is retired; "Dialogflow Enterprise Edition" is Dialogflow ES/CX.

    Docs

    The rest of this chapter is part of the GCP-PDE premium course

    Unlock every chapter, all 349 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters