Skip to content
Ospivia StudioITEN
Back to the studioSynthetic data

ImportGuard · Python · CSV

Check a CSV before importing it

Turn an incoming CSV into the agreed format: map columns, preserve identifiers and separate conflicting records. The report shows where every record went.

source_dirty.csv → CSV

Every record accounted for.

Recorded decisions on the synthetic dataset. Source record numbers exclude the header.

#IDResult
010001Ready
020002Conflicting duplicate
030003Missing email
040004Invalid email format
050005Ready
060001Exact duplicate
070002Conflicting duplicate
08—Blank row
090006Ready
100007Missing full name
11—Missing identifier
120008Ready
130009Ready
140010Ready

14 records shown. No record is unaccounted for.

Inspect the evidence.

A documented example schema. The demonstration does not include an import into a commercial CRM or verify whether email addresses can receive messages.

What to check in a CSV file

  1. Format and columns

    Check the delimiter, encoding and headers required by the destination system. This demo reads a semicolon-separated source file, then writes a comma-separated result with columns renamed to a documented schema.

  2. Identifiers as text

    Customer codes and phone numbers may start with zero. Treat them as text before opening or transforming a file: if a spreadsheet has already removed leading zeros, the remaining value cannot reliably tell you what was lost.

  3. Required fields

    Agree which fields must be present. ImportGuard checks ID, name and email, distinguishing a missing email from an invalid format. A format check does not prove that a mailbox exists.

  4. Duplicates and conflicts

    Identical rows and rows sharing an ID but containing different information need different decisions. The demo retains one copy of an exact duplicate and sends both rows for review when their values conflict.

A traceable example: 14 rows, none lost

The code “ 0001 ” becomes “0001”, preserving its leading zeros; the first row’s email is converted to lowercase. Code 0002 appears with two different emails: both rows are isolated without deciding which is correct. The result reconciles 14 source rows with 6 validated rows and 8 for review. The files above let you follow each record and its reason for inclusion or review.

When a dedicated workflow is useful

For a one-off import, the destination system’s CSV template and built-in validation may be enough. A dedicated check is useful for recurring exports, changing column names or rules that need consistent application. Calling a file ready for your CRM requires checking its actual schema and testing an import in an agreed environment.

What to include in your enquiry

Describe the destination software, column names, export frequency and required rules. Headers and invented example rows are enough for an initial assessment; customer data is unnecessary.

Scope, price and acceptance terms

From the example to your workflow: scope and acceptance

Want something like this?

Describe your process