Arostik Logo
ArostikVLARCK

Micro-Technology Solutions

Relational ETL & Data Ingestion

Data Converter CSV to SQL

Convert CSV and TSV files into CREATE TABLE and INSERT INTO SQL statements with automatic data type inference 100% in your browser.

PostgreSQLMySQLSQLiteSQL Server (T-SQL)Oracle
100% local — Your CSV file is never uploaded to any server
CSV / TSV Source1 rows · 7 cols

Column Data Types Adjustment

7 columns detected

id

id

nombre_producto

nombre_producto

categoria

categoria

precio

precio

stock

stock

en_oferta

en_oferta

fecha_ingreso

fecha_ingreso

Automated Type Inference

The engine parses every column value across all rows using optimized regular expressions, discovering integers (INTEGER / BIGINT), floating point numbers (DECIMAL), booleans (true/false/1/0), ISO 8601 dates (YYYY-MM-DD), timestamps, and text.

Safety: If a single record contains non-numeric characters in an integer column, the type safely falls back to VARCHAR or TEXT.
Native Typing by RDBMS Engine

Each SQL dialect requires distinct native data types: PostgreSQL outputs TIMESTAMPTZ and BOOLEAN; MySQL emits DATETIME and TINYINT(1); SQL Server maps to DATETIME2 and BIT; SQLite uses dynamic INTEGER and TEXT; Oracle relies on NUMBER and TIMESTAMP.

Compatibility: Identifier quotes adapt automatically (double quotes in Postgres, backticks in MySQL).
Batch Chunks & Bulk Insert

Executing thousands of individual INSERT statements overwhelms network connections and WAL logs. Grouping rows into chunks of 50 or 100 records per INSERT statement accelerates ingestion by up to 900% while staying within safe payload thresholds.

Transactions: The BEGIN ... COMMIT wrapper ensures atomic ingestion: all records commit successfully or rollback completely.
Delimiters & RFC 4180 Standard

The parser automatically detects whether your file utilizes commas (,), semicolons (;), tabs (\t), or pipes (|). It gracefully handles multiline fields and escaped nested double quotes ("""), sanitizing column headers into valid SQL identifiers.

Null Safety: Blank fields or 'NULL'/'N/A' strings convert cleanly into native SQL NULLs.

1. Commas or Line Breaks in Text Misalign Columns

CSV rows split incorrectly into more columns than defined in the header.

Quick Fix

Wrap any text cell containing commas or line breaks in double quotes "my text, with comma".

Technical Insight

RFC 4180 dictates that fields containing delimiters or line breaks (CRLF) must be enclosed in double quotes. Quotes within quoted fields must be escaped by doubling them (e.g. "Monitor 27"" 144Hz").

2. Error: 'Packet Too Large' or Max Variable Limit Exceeded

The SQL server rejects the generated script due to maximum query packet size or variable limits.

Quick Fix

Switch the 'Batch Insert Chunk' selector to 'Chunks of 50 rows' or 'Chunks of 100 rows' before downloading the .sql file.

Technical Insight

MySQL enforces max_allowed_packet limits on single statements. SQLite and PostgreSQL have parameter limits on prepared queries (32,766 in SQLite). Chunking by 50-100 rows avoids packet exhaustion.

3. Dates in DD/MM/YYYY Format Inferred as VARCHAR / TEXT

Date columns are not detected as native DATE types in the CREATE TABLE statement.

Quick Fix

Use the 'Customize Column Types' panel below to switch the column type to 'DATE', or reformat CSV dates to ISO YYYY-MM-DD.

Technical Insight

Regional date formats (DD/MM/YYYY vs MM/DD/YYYY) are inherently ambiguous. To maintain data integrity, SQL engines standardize on ISO 8601 (YYYY-MM-DD).

4. Headers with Spaces, Accents or Special Characters

Column header names cause syntax errors in the database CREATE TABLE statement.

Quick Fix

The tool automatically sanitizes header names into snake_case identifiers (e.g. 'Total Price ($)' → 'total_price'). You can fine-tune names if needed.

Technical Insight

Valid SQL identifiers cannot contain unquoted spaces, hyphens, or non-alphanumeric characters without engine-specific quote delimiters.

Half a Century of History#1

The Oldest File Format Still in Daily Use

The CSV format debuted in 1972 on IBM OS/360 Fortran systems to exchange data records across mainframes. Despite the arrival of JSON, XML, YAML, and Protocol Buffers, CSV remains the universal standard for database exports and data science pipelines.

The Semicolon Paradox#2

Why Excel Exports with Semicolons (;) in Spanish?

In Spanish-speaking countries and most of continental Europe, the comma (,) is the standard decimal separator (e.g. 19,99 €). To prevent floating point numbers from splitting into separate columns, Excel automatically adopts the semicolon (;) as the list delimiter.

Extreme Ingestion Performance#3

PostgreSQL COPY vs Bulk INSERT

For small and medium datasets, multi-row INSERT INTO VALUES (...) is the most portable and transactional approach. For millions of rows in production, PostgreSQL's binary COPY FROM STDIN bypasses SQL query planning overhead, ingesting up to 100,000 rows per second.

Web Standards#4

RFC 4180: A Standard That Arrived 33 Years Late

Although billions of CSV files were shared across the internet since the 1970s, the IETF did not publish a formal specification until 2005 (RFC 4180). Even today, it remains categorized as an 'Informational Memo' rather than a strict rigid internet standard.