SQL Import
Smart data import from CSV, Excel, JSON, and external databases with automatic schema detection, validation, and transformation.
Import Workflow
┌─────────────────────────────────────────────────────────────────┐ │ SQL IMPORT WORKFLOW │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ SOURCE │ → │ DETECT │ → │ VALIDATE │ → │ IMPORT │ │ │ │ DATA │ │ SCHEMA │ │ DATA │ │ TO DB │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ │ • CSV, Excel • Column types • Type checks • Bulk or │ │ • JSON, XML • Nullable • FK validation incremental│ │ • Parquet • Constraints • Duplicate • Logging │ │ • External DB • FK relations detection • Rollback │ │ │ ├─────────────────────────────────────────────────────────────────┤ │ EXAMPLE: Import customers.csv │ │ ──────────────────────────────────────────────────────────────│ │ │ │ Source: customers.csv (15,000 rows) │ │ │ │ Detected Schema: │ │ ┌─────────────┬──────────────┬──────────┬───────────────┐ │ │ │ Column │ Detected Type│ Nullable │ Sample │ │ │ ├─────────────┼──────────────┼──────────┼───────────────┤ │ │ │ customer_id │ INT │ No │ 1001 │ │ │ │ email │ VARCHAR(255) │ No │ john@acme.com │ │ │ │ name │ NVARCHAR(100)│ No │ John Smith │ │ │ │ created_at │ DATETIME │ No │ 2024-01-15 │ │ │ │ tier │ VARCHAR(20) │ Yes │ premium │ │ │ └─────────────┴──────────────┴──────────┴───────────────┘ │ │ │ │ Validation Results: │ │ ✓ 14,987 rows valid │ │ ⚠ 13 rows with invalid email format → Quarantine │ │ ✓ 0 duplicate customer_ids │ │ ✓ FK check passed (tier → tiers.name) │ │ │ │ [Import Valid Rows] [Review Quarantine] [Edit Mappings] │ └─────────────────────────────────────────────────────────────────┘
Supported Data Sources
Key Features
Auto Schema Detection
AI-powered column type detection from file contents. Automatically infers data types, nullability, and constraints.
Data Validation
Validate data types, check foreign key relationships, detect duplicates, and enforce business rules before import.
Transformation Rules
Apply transformations during import: trim whitespace, normalize case, parse dates, map values, and more.
Incremental Import
Import only new or changed records. Track last import position for efficient delta processing.
Error Quarantine
Invalid rows are quarantined for review rather than failing the entire import. Fix and retry problematic records.
Audit Trail
Full logging of import operations. Track who imported what, when, and from where.
CLI Usage
# Detect schema from CSV file sql2ai import detect customers.csv # Import with auto-detected schema sql2ai import run customers.csv --table Customers # Import with validation and error handling sql2ai import run orders.xlsx \ --table Orders \ --validate-fk \ --quarantine-errors \ --on-duplicate update # Import from external database sql2ai import database \ --source "postgres://legacy-db/customers" \ --target "sqlserver://new-db/Customers" \ --incremental # Schedule recurring import sql2ai import schedule \ --source s3://bucket/daily-export.csv \ --table DailyImport \ --cron "0 2 * * *"
Streamline Your Data Imports
Stop wrestling with data imports. Let SQL Import handle detection, validation, and transformation.
Request Demo