Data & BI

Verified against ChatGPT · 2026-08-13

Draft a source-to-target ETL mapping that names every transformation instead of leaving it implicit

Produces a field-by-field mapping between a source system and a target schema, including the exact transformation logic and the edge cases that would silently break a naive one-to-one copy.

ChatGPT (GPT-5.1)4 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

Draft a source-to-target mapping document for an ETL job, at the level of specificity an engineer could actually implement from without asking follow-up questions.

SOURCE SCHEMA
legacy_users table: id (int), full_name (varchar), signup_date (varchar, format MM/DD/YYYY), status_code (int, 1-4), country (varchar, free text)

TARGET SCHEMA
users table: user_id (uuid), first_name (varchar not null), last_name (varchar not null), created_at (timestamp UTC not null), account_status (enum: active/paused/cancelled/pending), country_code (char(2), ISO 3166-1)

KNOWN BUSINESS RULES THAT AFFECT THE MAPPING
status_code 1 and 2 both map to "active" historically, but the business wants status_code 2 (trial) split out as its own state going forward

LOAD PATTERN
Nightly incremental load, upserting on legacy id mapped to a new surrogate user_id

For every target field, state which source field(s) it comes from and the exact transformation applied — not just "maps to," but the actual logic: a data type cast, a unit conversion, a concatenation, a lookup against a reference table, or a conditional (if X then Y else Z). Where a target field has no obvious single-source mapping — it's derived from a calculation across multiple source fields, or it doesn't exist in the source at all and needs a default or an external lookup — say so explicitly and state what the default or derivation rule should be, asking me to confirm it rather than inventing a plausible-sounding default silently. Flag every place where a naive direct copy would silently produce wrong data: a source field that can be null where the target requires not-null, a source date in a different timezone than the target expects, a source enum whose value set doesn't fully match the target enum's allowed values, or a source field that can contain duplicates where the target has a uniqueness constraint. For Nightly incremental load, upserting on legacy id mapped to a new surrogate user_id, state how the mapping handles updates to existing rows versus new rows — specifically whether this is a full overwrite, an upsert keyed on a stated field, or an append-only load, since the transformation logic for a field can differ between an initial load and an incremental one.

WHAT NOT TO DO
Do not write "direct mapping" for any field without checking whether type, nullability, or value-set actually align between source and target — check each of those three before calling anything a "direct" pass-through. Do not invent a default value for a required target field without flagging it as a decision that needs sign-off.

OUTPUT FORMAT
Table: target field | source field(s) | transformation logic | edge cases/flags | confirmed or needs sign-off.
Followed by: a short list of fields that need a business-rule decision before this mapping can be implemented as-is.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

The most common way an ETL mapping document fails in practice isn't a wrong mapping, it's an implicit one — a field labeled "direct mapping" that turns out to hide a type mismatch or a nullability conflict that only surfaces as a production error weeks later, and a model asked generically to "map these fields" has no structural reason to check type, nullability, and value-set alignment unless told to check exactly those three things for every field, which is why the prompt names them explicitly rather than leaving "check for edge cases" as a vague instruction the model could satisfy superficially. Requiring the transformation logic to be stated as actual executable logic (a cast, a lookup, a conditional) rather than the word "maps to" forces GPT-5.1 to think through what the transformation function would actually need to do, which surfaces gaps — like a free-text country field needing a lookup table to become an ISO country code — that a vaguer instruction would let slide past as an assumed detail. The instruction to flag rather than silently invent a default for fields with no clear source is a direct application of the general rule that a model shouldn't assert an unverifiable business decision as fact — a default value for a required field is a business decision, not a technical one, and treating it as a technical detail the model can just fill in is how ETL jobs end up encoding an accidental policy nobody actually approved. Separating the load-pattern-specific logic (how upserts versus initial loads treat the same field differently) matters because the same transformation can be correct on day one and wrong on every incremental run after it if, for instance, a field should only be set on insert and never overwritten on update — a mapping that doesn't distinguish the two will get implemented as one static rule that's actually two different rules pretending to be one.

What you get back

account_status | status_code | Lookup: 1→active, 2→trial (per updated rule, previously bundled into active), 3→paused, 4→cancelled | Business rule change flagged: confirm whether historical rows with status_code=2 should be backfilled as "trial" or left as "active" for continuity | Needs sign-off country_code | country | Requires lookup against ISO 3166-1 reference table; free-text source values ("USA", "United States", "U.S.") will need fuzzy-matching or a manual mapping table before load | Edge case: unmapped free-text values need a fallback rule | Needs sign-off

Verified against

ChatGPT GPT-5.1 · 2026-08-13

Changelog

  • 2026-08-13 Initial publish, verified against ChatGPT GPT-5.1.

Need this built into your business?

If a prompt isn't enough — what Scult builds, built and maintained for you — that's Scult's day job.

EXPLORE WHAT SCULT BUILDS
All Data & BI prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY