Skip to content
← Back to Journal
Guides
7 min read

Validate your catalog CSV before importing thousands of rows

Check ten catalog rows for duplicate SKUs, incomplete variants, prices and damaged text before importing. A practical example with verifiable results.

By Frihet Team
Validate your catalog CSV before importing thousands of rows

TL;DR: To validate a catalog CSV, first establish how the destination interprets it, then check columns, identifiers, variants and values. Try a sample with known errors and validate the entire file before uploading. Ten passing rows do not prove the rest are correct or that an update preserves every existing value.

Contents

Validating a catalog CSV starts with understanding what the import will change. Columns, identifiers and values come next. A spreadsheet that opens without warnings can still contain two products sharing a SKU or a size option with no value. Even an accepted file can update the wrong product.

The exercise below helps you distinguish those failures. It contains ten invented rows with verifiable findings. It is neither a real store’s sample nor a file ready to upload to Shopify or Frihet: it uses an independent teaching schema that you must replace with the destination’s own format.

Start with the destination, not the supplier’s file

Download a current template or export a representative product from the receiving tool. Record whether you intend to create, update or combine both operations; what identifies a record; which fields are required; and what an empty cell means. Keep that definition beside your working file.

In Shopify, for instance, overwriting uses the URL identifier known as the handle. Its documentation also requires attention to dependencies between variant fields and options. Our SKU rule does not describe how that importer identifies products. Shopify’s product CSV format.

When moving data between systems, keep this review distinct from connecting a store to business operations. An available connector does not establish that it accepts your supplier’s columns.

Write rules you can actually check

Each exercise row represents one sellable item. product_key groups variants; sku must be present and unique. name is required. A variant needs both option_name and option_value; leaving both empty means no option is declared. When both are populated, their combination with product_key must not repeat.

The file uses UTF-8, comma-separated fields and eight columns in the displayed order. price allows non-negative numbers with a decimal point and two decimal places, without thousands separators. For this exercise, currency must be EUR. These are conditions chosen for this exercise, not universal requirements or commercial prices. No currency conversion or tax calculation is involved.

Keep SKUs as text: 001 must not become 1. Microsoft explains how to prevent automatic conversions when loading identifiers into Excel. Set the column type before transforming the data; changing its appearance afterwards does not reconstruct the original. Preserving leading zeros in Excel.

Ten rows, including one that looks fine

Copy the block as text to inspect it. The final row deliberately has one fewer column. row_id identifies an exercise record; R01 appears on the file’s second line because the first holds the headers. The Spanish product names are fixed sample values shared across editions, so the results remain reproducible.

row_id,product_key,sku,name,option_name,option_value,price,currency
R01,P01,001,Taza,Color,Natural,19.90,EUR
R02,P01,002,Taza,Color,Ink,19.90,EUR
R03,P02,001,Bolsa,,,29.00,EUR
R04,P03,,Cuaderno,,,8.50,EUR
R05,P04,005,Café,,,6.00,EUR
R06,P05,006,Vaso,,,"12,50",EUR
R07,P06,007,Camiseta,Size,,24.00,EUR
R08,P01,008,Taza,Color,Natural,19.90,EUR
R09,P07,009,,,,15.00,EUR
R10,P08,010,Bandeja,,,25.00
RowExpected resultWhat to investigate
R01Block: duplicate SKU and variantCompare with R03 and R08; this row does not pass either.
R02Passes the exercise rulesKeep as a control; it does not prove destination compatibility.
R03Block: duplicate SKU001 also identifies the mug in R01.
R04Block: missing SKUAsk for the reference; do not invent one from the name.
R05Review textCompare Café with the supplier’s original.
R06Block: price formatThe decimal comma breaks the chosen field rule.
R07Block: incomplete variantSize has no value.
R08Block: duplicate variantP01 + Color + Natural already appears in R01, despite a different SKU.
R09Block: missing nameIdentify the product before proceeding.
R10Block: incomplete structureSeven fields are present; the currency column is also expected.

The result is eight blocked rows, one requiring review and one passing. These are row states, not eight independent errors: R01 has two conflicts. You can check each result by comparing keys across rows and fields against the preceding rules.

Do not settle a duplicate by keeping the first row

R01 looks complete when read alone. Its conflicts emerge across the whole set: it shares a SKU with a bag and a variant combination with another mug. The check must therefore flag every member of the group, rather than approving the first and rejecting the last.

Ask the catalog owner to confirm whether the reference is wrong, the product is repeated or the variant is described incorrectly. Record the previous value, replacement and reason. Do not remove R08 simply because its name matches: a real catalog might distinguish material, size or other options absent from this simplified worksheet.

For a real batch, also compare against references already present at the destination. A SKU that is unique inside the CSV can still match another product outside it. Decide how to treat spaces and letter case before normalizing anything: cleaning an identifier can merge references that need to stay separate.

Separate format, text and meaning

R06 contains "12,50": the quotes keep the price inside one field. Counting commas manually produces the wrong diagnosis; use a CSV reader. RFC 4180 describes this quoting convention but does not define catalog columns or price interpretation. R06 has valid CSV syntax; it fails our field rule.

Do not globally replace commas with decimal points. That would alter delimiters as well as content. Identify the field, confirm the source format and convert its value in a controlled step. An empty value is not zero either; recording a zero price would be a commercial decision nobody has confirmed.

R05 needs a different check. The text Café is stored as valid UTF-8 bytes; that does not establish that the name is correct. This exercise’s warning is designed for that specific value, not as a universal encoding detector. Compare it with the source and investigate where it became distorted. Saving already damaged text as UTF-8 does not automatically recover its characters.

Before updating, check what will be preserved

An absent column and an empty cell can have different effects. Shopify documents that, when overwriting, an included but empty optional field can clear its existing value; omitting the column can preserve it. It also warns that an import cannot be canceled once started and recommends a backup. Shopify’s import conditions.

A variant’s identity can change too: Shopify warns that changing option values deletes its previous identifiers and creates new ones. Review any connections that depend on those identifiers before correcting an option through CSV. Variant options and identifiers.

Prepare a comparison of previous state, intended change and observed result. Include fields that should remain unchanged. Test in an available test environment and keep a product’s related rows together; ten consecutive lines do not necessarily represent ten complete products.

For a real operation, choose varied cases: a simple product, several options, accented characters, an empty price and an update to an existing reference. That sample tests the process. Then apply the rules to the entire file: duplicates may be thousands of rows apart. Use the integrations directory to identify the tools in your workflow, and establish each tool’s own data contract.

Leave a decision somebody else can review

Before uploading, record the file version, destination, owner, rules applied, resolved findings and test comparison. Keep the batch pending if a confirmation is missing. An “imported” message does not replace that review.

Frihet supports product imports from CSV as part of its business management features. This article’s schema and manual checks are independent: they do not prove Frihet’s accepted fields or automatic validations. Use your importer’s template and start by resolving the rows you still cannot explain.

Share

Was this article helpful?

FAQ

Do these checks replace the importer's rules?

No: the schema and manual checks are an independent exercise. Use the destination's current template and verify its rules for creation, updates and empty fields.

Does validating ten rows guarantee the rest of the catalog is correct?

No. The sample helps you rehearse the workflow; then apply the rules to the entire file and compare it with existing references in the destination, because duplicates may occur outside the sample.

Compare with

Frihet — Business without drama

Start Free