The starting point
FileMaker solutions grow with their business departments over the years, until a single file has become a landscape of dozens of files and hundreds of tables. In my current project for a biotechnology company it is 28 files with about 430 GB, more than 100 million records and about 19,500 fields in some 600 tables. The targets are MySQL 8.4 and Microsoft SQL Server 2022, both in parallel.
The real work is not the copying. It is understanding FileMaker's peculiarities, translating them into a relational model and, at the end, being able to prove that nothing was lost or silently changed. That is what this article is about – whatever tool you use.
Why read the .fmp12 file directly?
The obvious route goes through the FileMaker server: ODBC or JDBC, scripted exports, the Data API. For large data sets the route has three weaknesses.
- Load on the production system. A full export over xDBC queries every table row by row. For large tables that takes hours and competes with the users working on the same server during the day.
- No reproducibility. The data changes while the export runs. Two runs never deliver the same state.
- Dependence on settings. Accounts, privileges, drivers and time limits are often outside the migration team's control. Some drivers truncate long texts or binary data without reporting an error.
The alternative is to read the .fmp12 file itself – more precisely, a copy from the nightly backup. That requires a reader that understands the file format – sectors, records, repetitions, global values, embedded files. Building one is a substantial effort, but it changes the way you work.
A backup copy is a frozen, consistent state. A run on that copy can be repeated as often as needed and gives the same result every time. The production server does not notice, and no accounts with read access to production data are needed. And every night a new backup appears – the basis for daily delta loads.
The schema: from the DDR and from the file
The Database Design Report (DDR) is the XML that FileMaker produces about its own solution: tables, fields, field types, options, formulas, table occurrences, relationships, scripts and layouts. It is the best starting point because it also holds the business logic.
But the DDR has one weakness: it is a snapshot. If it is produced in March and the file is migrated in June, it lacks every field created in between. So I reconcile it with the catalog that the .fmp12 file itself contains. The file knows which tables and fields it has; the DDR adds the formulas and relationships.
Field IDs instead of field names
FileMaker assigns an internal ID to every field and every table. When a field is renamed, the ID stays the same. For a migration that is a gift: if the target model is keyed by IDs rather than names, a rename is recognised as a rename – not as a deleted field plus a new one. Formulas, relationships and decisions attached to the field follow the ID and remain valid.
Everything else is generated from this model: DDL, data dictionary, ERDs and a searchable schema atlas. What matters is that the model stays the single source – a decision not recorded in it is lost on the next run.
Data types and their traps
FileMaker has only a few field types: text, number, date, time, timestamp, container, plus calculation and summary. Their contents are far more tolerant than in a relational database. A number field accepts letters, a date field is interpreted differently depending on input. The field type from the DDR is therefore a hint, not a guarantee. I choose the target type per field from the measured contents.
Text in number fields
In almost every grown solution, number fields contain values like "approx. 50", "n/a", "12.5 %" or a dash. FileMaker stores them, calculates with the numeric part and displays them. A DECIMAL in the target will not take them. The worst reaction is the silent one: the value becomes NULL or 0 during the load and nobody notices. The right reaction is to count such values, show them in the report and decide – adjust the target type, keep the value as text alongside, or empty it on purpose.
-- MySQL: check raw staging values against a simple number pattern
SELECT COUNT(*) AS filled,
SUM(TRIM(amount_raw) NOT REGEXP '^-?[0-9]+([.,][0-9]+)?$') AS not_a_number
FROM stage_invoice
WHERE TRIM(amount_raw) <> '';Dates: day first or month first?
FileMaker files carry date formats taken over when the file was created or from the operating system. Depending on the export path and settings, the same date appears as "03.04.2021" or "04/03/2021". For days up to the twelfth the two cannot be told apart – 3 April and 4 March look the same. The only remedy is to determine the format per field from the data – from the unambiguous values beyond the twelfth – and to present mixed fields as a finding instead of guessing.
Repeating fields
A repeating field holds several values in one field, say ten measurements or five phone numbers. Relationally there are two clean answers: one column per repetition when the number is small and the meaning fixed, or a child table with a position number when the repetitions are alike. The only wrong answers are gluing the repetitions into one text or losing all but the first.
Global fields
A global field has one value for the whole file, not one per record. In a hosted solution it behaves like a session variable. Global fields usually belong in a small configuration table or not in the target at all.
Summary fields and unstored calculations
Summary fields calculate over the current found set; unstored calculations are evaluated only when displayed. Neither is stored data – there is simply nothing in the file for them. In SQL, summaries belong in views or in reporting; unstored calculations must be translated, and then the translation is the only source of the value.
Calculated fields: translate, then check
Calculated fields hold much of the business logic: status values, labels, deadlines, key figures. So that nobody rebuilds hundreds of formulas by hand, you need an automatic translation of the FileMaker calculation language into SQL: as a generated column when the formula only uses fields of the same record, as a view when relationships or aggregations are involved.
Harder than the translation are the differences in meaning that only show up on real data:
- Empty is not NULL. FileMaker treats an empty field as empty text or as 0 depending on context. SQL has
NULL, which propagates through almost every expression. - Date arithmetic. In FileMaker a date plus a number is a date, counted in days. SQL needs its own functions for that, and they differ between MySQL and SQL Server.
- Text and formatting. Functions for words and value lists have no direct SQL counterpart, numbers are formatted by their own rules when turned into text, comparisons depend on the collation.
- Context functions. Formulas that refer to the session, the layout or the logged-in user have no counterpart in the target. They are listed and decided.
That is why a translated formula only counts as migrated once it has been checked against the values FileMaker itself stored. For stored calculations the file holds a result for every record. The SQL version is compared with that result across all records. Every difference is assigned a cause – rounding, whitespace, empty versus NULL, date format – and the translation is improved until it yields the same for the existing data.
What cannot sensibly be translated is not silently dropped but decided with the business: take it over as a fixed value, rebuild it in the application, or let it go.
Container fields: files with checksums
Container fields hold files – images, PDFs, Office documents, measurement data. FileMaker can keep them in two ways: embedded in the .fmp12 file, or stored externally in a folder next to the database, with only a reference in the file. On top of that there are containers that only store a path to a file somewhere on the network.
For the migration this means, first of all: the backup copy must include the externally stored folders, or part of the data is missing before the first row is read.
Containers are where data gets lost unnoticed: a driver truncates, an export delivers only the file name – without an error message. That is why every file is carried over with file name, size and SHA-256 checksum from the source, and hashed and compared again in the target after the load.
Keys that are not unique in the data
FileMaker does not enforce much of what a relational database takes for granted. A serial number may have been reset, an import created records twice, a uniqueness validation applied only during data entry and not on import. Relationships point to records deleted long ago. And some fields everyone takes for a key are only unique within a group – a document number that starts again at 1 every year, for example.
A primary key created without checking first leads to an aborted load – or to the silent loss of duplicate rows. So the key check comes early:
- Every intended key is checked for uniqueness and empty values in the real data.
- Where a business key does not hold, the table gets a surrogate key, and the business key stays as a normal indexed column.
- Foreign keys are created only where the data supports them. Orphaned references are counted and reported.
- Comparison rules are chosen deliberately: whether "ABC" and "abc", or a value with a trailing space, are the same key depends on the target's collation – and may have been different in FileMaker.
Which key applies is the client's decision; the migration supplies findings, numbers and the consequences of each option.
Verification as the core
A load without an error message proves little; databases and drivers truncate, round and convert silently. The real proof of a migration is therefore a verification that checks the result in the target against the source – not against an intermediate state.
- Rows: count per table and row hashes, checked against the source.
- Texts: content character by character, including accented letters, special characters, emojis and line breaks, which FileMaker stores as carriage returns.
- Scalar values: numbers, dates, times and timestamps after typing, compared with the source text read by the same rules. Values that cannot be represented are counted and flagged.
- Keys: uniqueness and references after the load.
- Containers: size and SHA-256 of every file.
-- Source rows that are missing in the target or whose hash differs
SELECT s.invoice_id, s.row_hash AS source_hash, t.row_hash AS target_hash
FROM stage_invoice AS s
LEFT JOIN invoice AS t ON t.invoice_id = s.invoice_id
WHERE t.invoice_id IS NULL
OR t.row_hash <> s.row_hash;The result of every check is a number, not a feeling. Only when these numbers match, or every difference has been decided, is the new database published. A generation switch has proved its worth here: the new generation is built next to the current one and switched over in one step only after the checks have passed. The previous generation is kept as a fallback, and readers of the database see no downtime.
In the reference project the full loads now run with 0 errors – not because the data is flawless, but because every finding has a named way of handling it.
Daily delta loads during the transition
Hardly any FileMaker solution can be switched off on a set date. The business keeps working, and reports or new applications need current data before the cutover. So the new database has to keep pace every day.
A full load every night is too expensive for large data sets. In the reference project I cut it from more than six hours to about three, but even three hours is too much for every night. The delta load therefore works so that its cost follows the change, not the size of the data:
- Read only what changed. Fingerprints of each file's regions are kept. The next night only the regions that changed since the previous night are read.
- Find changed rows by hash. The hash of every row is compared with the previous night's. New and changed rows follow from that, whether or not a modification timestamp is maintained.
- Delete plus insert per table. Changed rows are deleted and inserted again. That is simple and traceable.
The schema does not stand still during this time either. New fields and tables extend the target automatically, renames are followed by field ID. Only changes to keys force a full load. In the reference project the delta runs fully automated after the nightly backup and takes about 30 to 75 minutes; every morning the previous night's state is available in SQL.
What this means for a project
The pitfalls lead to an approach that works in any FileMaker migration project, whatever its size:
- Clarity first, then code. An inventory with a schema atlas and data dictionary makes visible what the project is talking about.
- Early proof on a real file. A first full load of a representative file into a test environment, with verification and report, shows more than any concept paper: which types hold, how many formulas match straight away, where the keys break.
- Record the decisions. Target types, keys, how to handle repeating fields, untranslatable formulas and containers – every decision is recorded and feeds into every subsequent run.
- Iterate until verification is clean. Load, clarify findings, decide, load again. Because the source is a backup copy, each run costs only compute time, no coordination with operations.
- Parallel operation with a daily delta. The new database runs next to FileMaker with the previous night's state. Reports and applications are built against real data.
- Cut over when the business is ready. The timing of the switch follows from the project, not from the technology.
Add to this documentation that keeps pace with the solution: for users, for operations and for development.
How I help
I migrate FileMaker solutions to SQL Server, MySQL or MariaDB – complete, verified and with a daily sync until the cutover. From the first analysis with a schema atlas to the nightly delta and the handover to your operations team. The details of what I offer are on the page FileMaker migration to SQL Server and MySQL. If you are facing such a migration, get in touch – a first conversation usually shows quickly where the pitfalls in your data are.