TapCub is live — analytics, insights and live chat, free on one platform
Analytics

What is a data pipeline? Stages, types and an analytics example

A data pipeline moves data from where it is created to where it is used. The six stages and how each one fails, batch vs streaming, ETL vs ELT, and a worked event-pipeline example with duplicates, late data and the monitors that catch them.

Chen Yu Published Nov 5, 2026 6 min read Analytics
What is a data pipeline? Stages, types and an analytics exampleSample data

Every analytics number has traveled through a pipeline: collected, validated, cleaned, enriched, stored and queried. This guide walks through the six stages and how each one breaks, compares batch and streaming, and sizes a real-looking event pipeline where retries, late mobile events and a missing script each distorted the dashboard until four simple monitors caught them.

What you will learn

  • A pipeline has collection, ingestion, processing, storage and serving stages
  • Most dashboard errors trace back to one pipeline stage
  • Hybrid pipelines stream for realtime and batch-correct late data
  • Deduplicate business events on a unique id such as order id
  • Monitor freshness, volume, rejects and schema, not only KPIs

What is a data pipeline?

A data pipeline is the set of automated steps that moves data from where it is created to where it is used, transforming it along the way. In analytics, a pipeline takes raw events from websites, apps and servers, checks and cleans them, enriches them (channel, device, location), stores them, and turns them into the tables behind dashboards, alerts and exports.

When a dashboard number looks wrong, the cause is almost always somewhere in the pipeline: an event that never arrived, a duplicate, a late batch, a renamed property. Understanding the stages is the fastest way to debug analytics.

The stages of a data pipeline

StageWhat happensAnalytics exampleTypical failure
Source / collectionData is generated and sentBrowser script, mobile SDK, server events, CRMAd blockers, consent, script not loaded
IngestionData is received, validated and queuedCollector endpoint accepts or rejects payloadsRate limits, invalid payloads, wrong domain
Processing / transformationCleaned, deduplicated, enriched, joinedBot filtering, UTM parsing, session building, identity stitchingDuplicates, wrong time zone, schema drift
StorageWritten to a database or warehouseEvent table, daily rollups, profilesRetention limits, partition errors
Serving / consumptionQueried by reports, APIs, exports, modelsDashboards, alerts, SQL, raw exportStale caches, slow queries
Orchestration and monitoringScheduling, retries, alerts on the pipeline itselfDaily jobs, freshness checks, volume anomaly alertsSilent failures nobody notices
StageExampleTypical failure
CollectionWeb script, SDKs, server eventsBlocked or missing script
IngestionCollector validates payloadsRate limits, invalid payloads
ProcessingBots, UTMs, sessions, identityDuplicates, schema drift
StorageEvent table, rollupsRetention, partitions
ServingReports, SQL, exportsStale caches

Monitor the pipeline itself: a broken collector looks like a traffic drop.

Batch vs streaming pipelines

BatchStreaming
How it runsOn a schedule (hourly, daily) over a chunk of dataContinuously, event by event or in micro-batches
LatencyMinutes to hoursSeconds
Good forDaily reports, billing, exports, heavy joinsRealtime dashboards, alerts, fraud, live chat routing
ComplexityLower; easy to re-runHigher; ordering, late events, exactly-once
Typical toolsAirflow, dbt, cron + SQLKafka, Kinesis, Flink, Redis streams

Most analytics products are hybrid: events stream in for realtime views, while batch jobs build daily rollups and correct late data. That is why "today" numbers can shift slightly overnight.

ETL and ELT

The two classic patterns differ in where transformation happens:

  • ETL (extract, transform, load): clean and shape data before loading it into the warehouse. Smaller, tidier storage; harder to reprocess history.
  • ELT (extract, load, transform): load raw data first, transform inside the warehouse with SQL. Keeps the raw data, so you can rebuild tables when definitions change. Common with modern cloud warehouses.

Worked example: sizing and checking an event pipeline

A SaaS product sends about 120,000 events a day from web and app (sample figures).

Volume. At roughly 0.8 KB per raw JSON event, that is 96 MB a day, about 2.9 GB a month and 35 GB a year uncompressed. JSON event data typically compresses around 8–12× with gzip, so a year of exports is a few gigabytes. Volume is rarely the problem for a site this size; correctness is.

Duplicates. Mobile SDKs retry when the network drops. In one week, 0.6% of purchase events arrived twice. Without a dedupe key, revenue was overstated by 0.6%. Sending the order id with each purchase and deduplicating on it removed the duplicates.

Late data. 1.8% of app events arrived more than an hour late (offline devices syncing). A daily batch that ran at 00:30 and never re-processed undercounted yesterday by that amount. Re-running the previous day's rollup once more after a few hours fixed it.

Freshness and volume checks. The team added two monitors on the pipeline itself:

CheckRuleWhat it caught
FreshnessAlert if no events for 20 minutes during business hoursA deploy that broke the collector URL
VolumeAlert if daily events fall more than 25% below the same weekday's 4-week averageA tag manager change that removed the script from pricing pages
RejectsAlert if rejected payloads exceed 1% of the dayA new SDK version sending an invalid property type
SchemaAlert on new event names or properties not in the tracking planTypos such as signup_compelted

These are what data observability tools automate: freshness, volume, schema, distribution and lineage.

app.tapcub.com/analytics/data-quality

Pipeline monitors

Last 30 days
  • freshnessNo events for 20 min in business hours1 alertcollector URL broken
  • volumeDaily events < same weekday 4-week avg −25%1 alertscript missing on /pricing
  • rejectsRejected payloads > 1% of day2 alertsinvalid property type
  • schemaEvent not in tracking plan4 eventssignup_compelted
  • duplicatesPurchases sharing an order id0.6% → 0%dedupe on order id
Sample data

Data pipeline best practices

  1. Define events before you collect them. A tracking plan and data dictionary prevent most schema problems.
  2. Make every step idempotent. Re-running a job for the same day should give the same result, not double it.
  3. Carry a unique id on business events (order id, invoice id) and deduplicate on it.
  4. Store timestamps in UTC, convert to the reporting time zone at query time.
  5. Keep raw data for a defined period so you can rebuild derived tables.
  6. Watch cardinality. Properties with millions of unique values (full URLs with session ids, free text) bloat storage and slow queries.
  7. Monitor the pipeline, not only the business metrics. A traffic drop and a broken collector look the same on a dashboard.
  8. Keep personal data out early. Strip emails and tokens at collection; it is far harder later.

How the TapCub pipeline works

  • Collection: the web script, mobile and mini-program SDKs, and server-side events. You can also import server logs.
  • Ingestion: the collector validates each payload. Rejects happen before storage and are listed on the data quality page by reason and day: domain mismatch, exclusion rule, monthly quota, rate limit, invalid payload and bots.
  • Processing: bot detection, channel and UTM parsing, sessions, identity resolution.
  • Storage: an event table and a daily person rollup. Default retention is 365 days for events, 90 for autocapture and 730 for profiles and consent receipts.
  • Serving: reports, SQL queries, monitors and raw data export as gzipped JSONL (up to 365 days per job; files kept for 48 hours) for your own warehouse.

For purchases, send the order id so retries do not create a second order.

See also: Lakehouse vs warehouse, Data lineage.

Sources

  • Kleppmann, M. (2017). Designing Data-Intensive Applications. O'Reilly, chapters 10–11.
  • Google Cloud. What is a data pipeline?
  • Reis, J. and Housley, M. (2022). Fundamentals of Data Engineering. O'Reilly.

Was this article helpful?

We use your answers to fix and expand this page.

Chen Yu

Technical Engineer

Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.

Take your raw events anywhere

Query events with SQL or export gzipped JSONL to your own warehouse.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics