Zum Inhalt springen
Loslegen

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.

<mildport-import
api-base-url="https://imports.your-infra.example"
license-key="SIGNED_TENANT_KEY"
catalog-key="contacts"
></mildport-import>

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.

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 batches
  • 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.

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.