Ryan Melvin / Salesforce consultant

Case 02 Demo Illustrative rebuild with made-up data: the pattern and the decisions, not client code.

Moving a decade of history out of a legacy database intact

People, churches, staff history and families moved from a legacy SQL Server database into NPSP, with every ambiguity sent to a person instead of guessed.

From the interactive demo, with made-up data.

Problem

Everything the organization knew about itself lived in one legacy church-management database on SQL Server: people, churches, staff statuses and assignments, addresses, families, education records and benefit details. Getting it out was not a table-to-table copy.

Years of custom attributes sat in generic catch-all tables. Categories were stored as free text. Relationships were implied rather than recorded: a surviving spouse was a code on one person, not a link between two people. A simple export would have moved the data and lost what it meant.

Constraints

  • History had to survive. Years of assignments, tenure and family relationships are the organization's memory. Keeping only the current state would have thrown away the part that cannot be rebuilt.
  • Incomplete records could not be dropped. A person with no address is still a person. Every join had to tolerate a missing half (LEFT JOIN everywhere), with a decision each time about what a blank means.
  • One-to-many everywhere. Several addresses, phones, education entries and assignments per person. Each needed an explicit rule: keep one preferred value, turn them into child records, or deduplicate before loading.
  • Nothing to check against. The legacy database was the only record, so validation had to come from inside: counts, exception lists and reconciliation against the source itself.

Options considered

A migration vendor or packaged tool. These exist for common church-management systems. I passed because the hard part was not moving rows. It was interpreting a decade of one organization's habits, and no vendor would know that one program appeared under four spellings, or which of two birth dates to trust.

Export the current state only. The fast option. Rejected for the reason above: current state without history is a directory, not a record.

Staged SQL extraction with every rule written down. Chosen. Slower, but every transformation is a recorded decision that can be reviewed and re-run.

Decision

Load in dependency order, key everything on stable legacy IDs, and send every ambiguity to a person instead of guessing.

Exports ran in groups, not one big dump: organizations before people, people before the records that depend on them, affiliations and child records last, once their parents existed in Salesforce. Every record carried its legacy ID through the whole pipeline, so any migrated value can be traced back to its source row. The raw exports were kept for audit and rollback.

Transformation happened in SQL, not by hand. CASE and COALESCE chains translated legacy codes into fixed picklist values, addresses were normalized, and the one-to-many rules were written once and applied everywhere. When two source rows disagreed about a fact, the pipeline flagged the record for review instead of picking one. A migration that guesses buries its errors; one that flags them creates a work list.

The most important mapping choice: implied relationships became dated NPSP affiliations and real relationship records. A staff assignment became an affiliation with a start date, not a single field that next year's reassignments would overwrite.

Build

The extraction layer was a set of large SQL Server queries across the person, attribute, lookup, address, family and position data, refined each time an import pass exposed a new edge case. Families were rebuilt as NPSP households. Spouses, surviving spouses and parents became relationship records with the right type and status, instead of text codes.

Free-text categories were turned into real records. The clearest example was training and leadership classes: one legacy category held hundreds of entries that resolved to a much smaller set of actual classes once spelling drift and local labels were reconciled.

NPSP pushed back in places. Organization addresses failed to load at first; the fix was an NPSP setting plus loading them through the correct relationship, rather than working around NPSP's address handling.

Evidence

Open the demo with the Try the demo button at the top of this page, or from Selected work on the home page. It walks the pipeline's stages on made-up rows, including the case that matters most: a conflict the pipeline refuses to resolve on its own.

In the real project, every import pass ended with a count reconciliation and an exception list (rows exported, records created, duplicates merged, records flagged) before the next group loaded. Because of the stable-ID keying, "this record came from that source row" can be checked for any record. Traceability was built in, not claimed afterward.

Outcome

The migrated data became the core of the Salesforce org: the churches, staff, members and relationships that every later system reads from. History survived the move, with assignments and family relationships arriving as dated records rather than a snapshot of migration day.

The migration also surfaced years of hidden data-quality issues and turned them from unknowns into planned clean-up work, which is what data governance actually looks like at the start.

What I'd do differently

Build the review workflow before the first import. The flag-for-review queue grew as the passes exposed conflicts. Designing it up front would have made the early passes faster and easier to explain. The review process should exist before the thing that creates review work.

Put the transformation SQL under version control from day one. The queries changed a lot between passes, and early versions lived in editor tabs longer than they should have. Those scripts are the migration's real documentation, so they belong in files from the start.

← All work

Need Salesforce, data or AI help that lasts after launch?

Fixed-price, phased projects for nonprofits, churches and small businesses.