Chapter 4

Transforming files

Three tools change data: Transform Data runs a file through a template and mapping, Quick Transform applies ready-made clean-ups with no setup, and the Expression Builder lets you try expressions on a sample row. Files are read in your browser and nothing is uploaded.

Transform Data

Open Transform Data and work down the three steps:

  1. Source file. Choose a CSV, TSV or Excel file (up to 10 MB; Excel up to 5 MB). The first five rows are shown as parsed, so you can check the delimiter and header were read correctly.
  2. Template and mapping. Both are optional. Pick a template, or leave No template (auto-detect) to detect the delimiter and header from the file itself. Pick a mapping, or leave No mapping (pass through) to keep every column under its own name.
  3. Output. Choose CSV, TSV or JSON, and whether to write the target column names as the first line. JSON output ignores the header setting.

Then use the command bar:

A few things to know about how the file is read:

TipIf a column comes out empty, compare its Source field in the mapping with the header in the file. With no source template, names must match the file's header exactly.

Quick Transform

Quick Transform applies common clean-ups straight to a file, with no template and no mapping. It takes CSV or TSV files up to 10 MB and 100,000 rows.

  1. Choose the file.
  2. From Available transforms, add the clean-ups you want. They join the Queue and run in the order listed.
  3. Click Execute to apply the queue to every row, then Download Result. Clear Queue starts again.
GroupAvailable transforms
Case ConversionUPPERCASE All Text · lowercase All Text · Title Case All Text · PascalCase Headers · camelCase Headers · snake_case Headers
CleanupTrim All Whitespace · Normalize Whitespace · Remove Empty Rows · Remove Duplicate Rows · Lowercase Email Addresses · Uppercase State Codes
FormattingFormat US Phone Numbers · Strip Phone Formatting · Convert Dates to ISO Format · Convert Dates to US Format · Format ZIP Codes · Strip Currency Symbols
Data TransformationSplit Full Name · Combine First + Last Name

For the full layout change (renaming, reordering, choosing an output format), use Transform Data instead.

Expression Builder

The Expression Builder evaluates an expression against a sample row you type in. It never reads a file and nothing on the page is saved, so it is a safe place to work out logic.

  1. Under Sample row, use Add Column to create the columns your expression refers to and type a value into each.
  2. Type the expression. Refer to a column by putting its name in braces, like {FirstName}.
  3. Click Evaluate to see the result. Clear resets the page.

Some examples from the page:

ExpressionWhat it does
upper({Email})The email address in capitals.
title({FirstName})The first name in title case.
if({Amount} > 100, Premium, Standard)Premium when the amount is over 100, otherwise Standard.
round({Amount}, 2)The amount rounded to two decimal places.
year({OrderDate})The year of the order date.
dateadd({OrderDate}, days, 30)The date 30 days after the order date.
contains({Email}, @)Whether the email contains @.

The Functions panel on the page lists every function with its syntax.