Source-to-target mapping studio
Map source fields to target columns, document transformations and joins, and review coverage and declared lineage. Generate a SELECT skeleton and mapping specification without connecting to a database.
Prepared export
Use each form’s Save button. Saving or selecting another item restores other forms to saved values. Exports pause during unsaved edits. Undo keeps 20 revisions; reload clears the studio unless you export JSON.
Select a row to edit its mapping. Custom expression/lookup inputs are declared manually; dashed lines do not imply parsed or complete SQL lineage. Five target fields are shown per page; the full specification stays in JSON.
Coverage and mapping review
Source-field usage for this job
Review findings
Job definition
Source bindings
Bind the same source table more than once with distinct aliases for a self-join. All bindings must be connected by explicit ordered joins.
Ordered join plan
Field mapping
Ordered input fields
Declared primary key
Columns
New column
Import a model-designer inventory
Append tables from pg-architect-model-v1 JSON to either inventory. IDs are remapped so the same design can be imported on both sides. Existing mappings stay intact. Identity metadata is retained; non-identity default/generated behavior is marked unknown because the physical subset does not describe it.
Open studio JSON
Open a saved pg-mapping-v1 document up to 1 MB. Undo restores the previous studio. Input files are read locally.
Scope and SQL preview rules
Source/target schemas, key metadata, output grain, cardinality and lineage completeness are declarations. The studio does not connect to PostgreSQL or inspect real data. A SELECT preview assumes the bound sources are available in one PostgreSQL query context; remote access or staging is a separate design. LEFT joins conservatively propagate possible NULLs. Key metadata can support a cardinality declaration but does not prove row counts, uniqueness, join compatibility or the grain.
Copy, cast, literals, coalesce and concatenation generate SELECT expressions. Coalesce casts each argument to the target hint; concat uses concat_ws, which skips NULL input values. Conversion failures, formats, precision, collations and time zones require PostgreSQL validation. Numeric constants remain strings to avoid JavaScript precision loss. Unknown/custom type text is never emitted as SQL syntax.
Expressions/lookups, filtering, grouping and other row rules are documentation only. Complex mappings and unmapped fields become explicit NULL TODOs in the skeleton. Unknown target types also prevent automatic conversion SQL. Omitted and unmapped server-generated columns are excluded. A SELECT preview is not an INSERT/load plan, migration, complete ETL program or guarantee of safe aggregation. No supplied SQL is parsed or executed.
Exports include full studio JSON, a mapping CSV, Markdown specification, selected lineage SVG and a SELECT skeleton. Source usage distinguishes declared mapped inputs, join-only fields and unused columns. Lineage for expressions/lookups is manually declared, not inferred from their text. Unique-key metadata can be imported from the model designer or edited in studio JSON; the forms edit primary keys.
Identifiers and aliases use the standard 63-byte limit and are quoted. Limits: 1 MB; 30 source tables, 30 target tables, 800 inventory columns total, 100 columns/table, 30 jobs, 16 bindings/job, 15 ordered equality joins, 16 column pairs/join, 100 mappings/job and 32 ordered inputs/mapping. Lineage pages show five target columns and limited text previews. Full inventories and mappings remain in JSON. Undo/redo keeps 20 revisions in memory. No inputs are stored or transmitted.