Tabular mock data as CSV text
Spreadsheets, ETL jobs, and BI tools usually ingest comma-separated tables: one header line naming columns, then one record per line. Synthetic CSV lets you stress column width, delimiter parsing, and import pipelines without exporting real customer rows.
Same column picker as the Random JSON generator—switch output to CSV here, reshape existing data with JSON to CSV, open in Excel via CSV to Excel, or chart columns with CSV chart.
CSV structure and spreadsheet semantics
Header row and record lines in CSV
- Row 1 is typically field names—downstream mappers bind header text to schema keys.
- Each following row is one observation; column count should match the header unless a parser allows ragged rows.
- Line breaks inside a cell require wrapping the cell in double quotes per RFC 4180-style rules.
- Empty lines at file end are often ignored but can break strict row-count assertions in tests.
UTF-8, BOM, and Excel on Windows
- UTF-8 encodes international text in one byte stream—preferred for modern ETL and web uploads.
- A UTF-8 BOM (byte order mark) at file start helps Excel recognize encoding when double-clicking .csv on Windows.
- Excel may still infer types—leading zeros on id-like columns can disappear unless the column is text-formatted.
- Saving as .xlsx via CSV to Excel preserves Sheet1 layout without retyping delimiters.
Why CSV drops JSON types
- CSV stores characters only—booleans and numbers re-import as strings unless a schema step casts them.
- Quoted "true" in CSV is indistinguishable from a string literal without a type map.
- Null is usually an empty field—distinct from the word null unless your pipeline treats it specially.
- Mock generators should still use realistic patterns (emails, dates) even when types flatten on import.
Mock CSV in ETL and QA workflows
- Pipeline smoke tests: feed 10–500 rows through ingest, assert row counts and header names before joins.
- Spreadsheet QA: wide columns (company, url) reveal wrap and filter bugs faster than numeric-only grids.
- Chart sanity checks: paste into CSV chart to confirm category vs measure columns before dashboards.
- Regenerated rows change values—assert headers and parse success, not fixed cell literals, unless seeded.
When random CSV helps
Import and ETL demos
Hand partners a headered sample file before production extracts exist.
Excel and database loaders
Download UTF-8 CSV, convert to xlsx, or load into staging tables for constraint tests.