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
| Type | What it does | Example |
|---|---|---|
| Cleaning | Removes or fixes bad records | Drop test events; delete a row with an impossible date |
| Standardising | Makes values follow one convention | Signup and signup become signup |
| Parsing | Splits one field into several | A URL becomes page path, source and medium |
| Type conversion | Changes the data type | "$1,200.00" becomes the number 1200.00 |
| Deduplicating | Keeps one copy of repeated records | Two identical signup events become one |
| Filtering | Removes records that are out of scope | Remove search-engine crawler requests |
| Enriching | Adds data from another source | Add country from an address lookup |
| Deriving | Computes a new field | Revenue = price × quantity |
| Aggregating | Summarises many rows | Daily 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):
| User | Time as received | Event | Page | Amount | Agent |
|---|---|---|---|---|---|
| u1 | 03/01/2026 23:30:05 -0800 | Signup | /pricing?utm_source=Google&utm_medium=CPC | Browser | |
| u1 | 2026-03-02T07:30:05Z | signup | /pricing/?utm_source=google&utm_medium=cpc | Browser | |
| u2 | 2026-03-02T09:15:00+01:00 | Purchase | /checkout | $1,200.00 | Browser |
| u3 | 2026-03-02T10:00:00Z | purchase | /checkout | 49.5 | Browser |
| u4 | 2026-03-02T10:05:00Z | page_view | /pricing | Browser | |
| bot | 2026-03-02T10:06:00Z | page_view | /pricing | Search 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:
- 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. - Standardise names: event names to lower case.
- Parse the page: split the query string into
sourceandmedium, lower-case both, remove the trailing slash from the path. - Convert the amount to a number:
$1,200.00becomes 1200.00 and49.5becomes 49.50 (assuming a single currency, USD). - Deduplicate: after steps 1 to 3, rows 1 and 2 are identical, so keep one.
- Filter: remove the crawler row.
After (clean rows):
| Date (UTC) | User | Event | Page | Source | Medium | Revenue |
|---|---|---|---|---|---|---|
| 2026-03-02 | u1 | signup | /pricing | cpc | ||
| 2026-03-02 | u2 | purchase | /checkout | 1200.00 | ||
| 2026-03-02 | u3 | purchase | /checkout | 49.50 | ||
| 2026-03-02 | u4 | page_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.
| Where | Example | Strength | Weakness |
|---|---|---|---|
| At collection | A tracking script lower-cases names and drops oversized values | Bad data never enters | You cannot redo it on old data |
| At ingestion | The server filters crawlers and deduplicates | One shared rule for every report | A rule change affects only new data |
| In the warehouse (ELT) | SQL views clean and aggregate | Raw data is kept and rules can be rerun | Costs storage, and someone must maintain the SQL |
| At report time | A chart applies a filter or calculated field | Fast to try | Every 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
- 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.
- Make each step repeatable. Running the same input twice must give the same output, with no duplicates added.
- Reconcile counts at every step. Rows in − rows dropped = rows out, and every drop has a reason.
- 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.
- 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,
Tbetween date and time, and eitherZor a numeric offset. - 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- The Kimball Group, ETL Architecture: 34 Subsystems (three subsystems for extracting, five for cleaning and conforming, thirteen for delivering, thirteen for managing). Checked 2026-11-23.
- IETF, RFC 3339: Date and Time on the Internet: Timestamps (date-time format; offset or Z). Checked 2026-11-23.
- Apache Software Foundation, Log Files, Apache HTTP Server 2.4 documentation (Common Log Format: time with zone, request line, status code). Checked 2026-11-23.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

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