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

What is data transformation? Definition and a before-and-after example

Data transformation changes raw data into the form you need to analyse it. Nine common types, a six-row event example from raw to report-ready, where transformation runs and rules to trust it.

Xu An Reviewed by Lucas Hayes Also called data transformations Last updated Nov 23, 2026 Glossary

Quick answer

Data transformation is the process of changing data from the form in which it was collected into the form needed for analysis: fixing formats, removing duplicates and bots, splitting fields, adding derived values and summarising rows.

Formula: Rows in − rows dropped = rows out (example: 6 − 1 duplicate − 1 crawler = 4)

What is data transformation?

Data transformation is the process of changing data from the form in which it was collected into the form you need to analyse it. It covers everything between a raw record and a number in a report: fixing formats, removing duplicates and test traffic, splitting a combined field into parts, adding a derived field, and summarising many rows into one.

Raw data is built for the system that produced it, not for the person who will analyse it. A web server writes a line per request; a tracking script writes an event per action; a payment system writes a string with a currency sign. None of them agree on how to write a date, a name or an amount, and none of them filters out the robots. Transformation is where those differences are resolved so that one question gets one answer.

Two neighbouring terms are easy to confuse with it:

  • Data conversion is narrower: changing a value or file from one format to another, for example a date string to a timestamp or a spreadsheet to a CSV file. See data conversion. Conversion is often one step inside a transformation.
  • ETL and ELT describe when the transformation happens. In ETL (extract, transform, load) the data is transformed before it is stored in the destination; in ELT it is loaded first and transformed in the destination. The transformation itself is the same.

For the techniques in detail, see data transformation techniques. This page defines the term and walks through one concrete before-and-after example.

Common types of transformation

TypeWhat it doesExample
CleaningRemoves or fixes bad recordsDrop test events; delete a row with an impossible date
StandardisingMakes values follow one conventionSignup and signup become signup
ParsingSplits one field into severalA URL becomes page path, source and medium
Type conversionChanges the data type"$1,200.00" becomes the number 1200.00
DeduplicatingKeeps one copy of repeated recordsTwo identical signup events become one
FilteringRemoves records that are out of scopeRemove search-engine crawler requests
EnrichingAdds data from another sourceAdd country from an address lookup
DerivingComputes a new fieldRevenue = price × quantity
AggregatingSummarises many rowsDaily counts per event

Most real pipelines use several of these in a fixed order: clean and standardise first, then parse and convert, then deduplicate and filter, then enrich, derive and aggregate. The order matters. If you deduplicate before standardising time zones, two records for the same instant look different and both survive.

A before-and-after example

Sample data: six raw event rows collected on the same day. Each is valid for the system that wrote it, but they cannot be added up.

Before (raw rows):

UserTime as receivedEventPageAmountAgent
u103/01/2026 23:30:05 -0800Signup/pricing?utm_source=Google&utm_medium=CPCBrowser
u12026-03-02T07:30:05Zsignup/pricing/?utm_source=google&utm_medium=cpcBrowser
u22026-03-02T09:15:00+01:00Purchase/checkout$1,200.00Browser
u32026-03-02T10:00:00Zpurchase/checkout49.5Browser
u42026-03-02T10:05:00Zpage_view/pricingBrowser
bot2026-03-02T10:06:00Zpage_view/pricingSearch crawler

The problems are visible once you look for them. Two time formats and three time zones. Signup and signup as two events. Capitalised and lower-case campaign values. A trailing slash in one page path. An amount stored as text with a currency sign and a comma. The first two rows describe the same signup. And one row is a crawler.

The steps applied, in order:

  1. Parse and standardise time to UTC in the format given in RFC 3339 (2026-03-02T07:30:05Z). The first row, 23:30:05 at −08:00, becomes 07:30:05Z the next day.
  2. Standardise names: event names to lower case.
  3. Parse the page: split the query string into source and medium, lower-case both, remove the trailing slash from the path.
  4. Convert the amount to a number: $1,200.00 becomes 1200.00 and 49.5 becomes 49.50 (assuming a single currency, USD).
  5. Deduplicate: after steps 1 to 3, rows 1 and 2 are identical, so keep one.
  6. Filter: remove the crawler row.

After (clean rows):

Date (UTC)UserEventPageSourceMediumRevenue
2026-03-02u1signup/pricinggooglecpc
2026-03-02u2purchase/checkout1200.00
2026-03-02u3purchase/checkout49.50
2026-03-02u4page_view/pricing

What changed in the report:

  • Raw, grouped by event name, there are five distinct groupings (Signup, signup, Purchase, purchase, page_view) and the revenue column cannot be summed because it holds text. Clean, there are three events and revenue is 1,200.00 + 49.50 = 1,249.50.
  • The first signup, which a report grouped by the local date would place on 1 March, now falls on 2 March (UTC), the same day as every other row.
  • Row count check: 6 raw rows − 1 duplicate − 1 crawler = 4 clean rows. Always reconcile like this; if the numbers do not add up, a step lost data.

Where transformation happens

The same steps can run in different places. Each place trades speed, flexibility and risk.

WhereExampleStrengthWeakness
At collectionA tracking script lower-cases names and drops oversized valuesBad data never entersYou cannot redo it on old data
At ingestionThe server filters crawlers and deduplicatesOne shared rule for every reportA rule change affects only new data
In the warehouse (ELT)SQL views clean and aggregateRaw data is kept and rules can be rerunCosts storage, and someone must maintain the SQL
At report timeA chart applies a filter or calculated fieldFast to tryEvery report repeats the rule, results drift

Transformation is a large share of any pipeline. The Kimball Group's description of the 34 subsystems of an ETL architecture assigns three to extracting data, five to cleaning and conforming it, thirteen to delivering it and thirteen to managing the process.

Rules for transformations you can trust

  1. Keep the raw data. Write transformed data to a new table or file; never overwrite the source. If a rule turns out to be wrong, you can rerun it.
  2. Make each step repeatable. Running the same input twice must give the same output, with no duplicates added.
  3. Reconcile counts at every step. Rows in − rows dropped = rows out, and every drop has a reason.
  4. Write down the rules. Time zone, currency, how an event name is cleaned, which crawlers are filtered. A rule only you know is a bug waiting.
  5. Standardise time first. Use one time zone, and write timestamps in the Internet date and time format of RFC 3339, which requires a four-digit year, T between date and time, and either Z or a numeric offset.
  6. Test with a sample you can check by hand, like the six rows above, before running at full size.

Common mistakes

  • Transforming without keeping a copy. One bad rule then destroys data you cannot recover.
  • Deduplicating before standardising. Records that differ only in case or time zone are not recognised as the same.
  • Mixing currencies or units. Summing 49.5 and 1,200 is only valid if both are in the same currency.
  • Silently dropping rows. If you filter bots, count how many and report it.
  • Doing the same cleaning in every report. Move shared rules upstream so the numbers match.
  • Treating missing values as zero. A blank amount on a signup is not a $0 purchase; leave it empty and exclude it from averages.

How data transformation works in TapCub

TapCub does the common cleaning for web, app and mini program data at collection, and gives you the raw detail for anything beyond that.

  1. Robots are separated. Web analytics › Bots counts recognised crawlers and AI crawlers apart from real visitors by default, so they do not enter visitor and conversion counts. This is the filtering step.
  2. Repeats are dropped. The collector ignores a repeat from the same visitor on the same path and query within one second when the event name and properties match, which is a narrow form of deduplication.
  3. Names and values are normalised. Event names in the catalog must be snake_case; over-long names and properties are truncated, and only strings, numbers and booleans are kept as property values. New events land in All-platform analytics › Data › Event inbox first, where you can name them or merge them into an existing event.
  4. Time is handled for you. Events imported through the server interface that are more than 72 hours old have their event time replaced by the received time.
  5. Define derived values. All-platform analytics › Behavior › Metrics & SQL lets you define a metric from a formula or an event plus an aggregation, and run SQL on event data.
  6. Take the raw data out. All-platform analytics › Data › Data export runs an asynchronous export of raw detail within the retention period, so you can run your own transformations elsewhere. Data import takes CSV events, user properties and Nginx or Apache logs, skipping crawlers.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Xu An

Customer Experience Consultant

Writes about live chat, visitor conversations, and self-service, sharing practical ways to make customer communication clearer and more effective.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is data transformation in simple terms?

Data transformation changes data from the way it was collected into the way you need it for analysis. It includes fixing formats, removing duplicates and bot traffic, splitting fields such as URLs and turning text amounts into numbers, so that one question has one answer.

What are examples of data transformation?

Converting timestamps from different time zones to UTC, lower-casing event names, splitting a URL into path, source and medium, turning "$1,200.00" into 1200.00, removing duplicate events and filtering crawler requests. The example here applies six such steps to six rows.

What is the difference between data transformation and data conversion?

Data conversion changes a value or file from one format to another, such as a date string to a timestamp. Data transformation is broader and includes cleaning, deduplicating, filtering, enriching and aggregating; conversion is often one step inside it.

What is the difference between ETL and ELT?

Both extract data, transform it and load it. In ETL the data is transformed before it is loaded into the destination; in ELT it is loaded first and transformed inside the destination, which keeps the raw data available to rerun rules.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

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