Import into MySQL — CSV, Excel & PDF
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Goal: your users bring the file they have — CSV, Excel, even a PDF or a scan — and clean records land in MySQL without leaving your product, and without you writing a mapping/validation UI. The pattern is the same every time: embed → validate → deliver. Mildport handles the first two; your webhook handler owns the MySQL API call.
1. Embed the importer
Section titled “1. Embed the importer”<mildport-import api-base-url="https://imports.your-infra.example" license-key="SIGNED_TENANT_KEY" catalog-key="contacts"></mildport-import>2. Publish a catalog that mirrors MySQL
Section titled “2. Publish a catalog that mirrors MySQL”The schema lives in a target catalog, not in host code.
Create it in the catalog editor (/admin/catalogs on your engine, or embed
<mildport-catalog-editor>), match the table you will insert into, and publish. The
widget loads that published catalog by catalog-key.
Align field keys with column names (first_name, last_name, email, phone). Mark
every NOT NULL column required so the review step guarantees insertability.
Users then upload anything — renamed headers, six languages, XLSX/ODS, even PDF tables — and Mildport’s deterministic matcher plus the review step produce typed, validated rows.
Need the schema computed per user at runtime, or versioned with your app? That’s the
schema-as-code path — pass targets
from host code instead of catalog-key.
3. Deliver from your webhook
Section titled “3. Deliver from your webhook”Clean rows arrive on your signed apply webhook; your handler feeds MySQL:
INSERT … ON DUPLICATE KEY UPDATE, or LOAD DATA LOCAL INFILE for large clean batchesMySQL-specific gotchas
Section titled “MySQL-specific gotchas”- utf8mb4 everywhere — the classic ‘ü broke my import’ is a utf8(3-byte) table meeting real UTF-8; see our encoding guide.
- LOAD DATA has no per-row error reporting worth debugging — validate BEFORE the database, not after.
- strict SQL mode + typed importer columns = errors surface in review, not as truncation warnings.
Why not MySQL’s own CSV import?
Section titled “Why not MySQL’s own CSV import?”LOAD DATA INFILE assumes a clean file. Customers don’t send clean files. Put mapping + validation + review in front, and the database only ever sees rows that fit.
Try the flow first: the playground (no signup), then the Quickstart and target catalogs. Prices are published — hosted and flat-annual self-host — at mildport.com/#pricing.