Mapping
Table and column names
Give tables and columns different names at a target, and learn when names can change and what happens after a rename.
By default a target table and its columns get automatic names. You can give any table, and any column, a different name at one target in the Configure dialog, for every source and target. Other targets of the pipeline aren't affected.
Before you begin
- On an existing pipeline, pause it first. Names can change only while the pipeline is paused.
Rename tables and columns in a new pipeline
- On the wizard's Tables step, select Configure beside Select all, or hover over a table and select its Configure link.
- Select the table in the list on the left.
- In Target table, type the target name. Leave it blank, or select Use default, for the automatic name.
- Under Column names, type a source column and its target column, then select Add. Repeat for each column to rename. Remove a rename with the × beside it.
- Select Done. The names are applied when you create the pipeline.
Unlisted columns keep their default target names.
The list on the left shows each renamed table as <source> → <target>, and counts renamed columns, for example 2 renamed columns. Configured shows only the tables with names or rules.
Rename on an existing pipeline
- Pause the pipeline.
- On the Overview tab, find the target in the Targets card and select Configure.
- Change the names as for a new pipeline, then select Save. The footer counts the tables whose names change, for example "Saves names for 1 table."
- On a database target, the renamed table must exist under its new name, with a primary key or unique key on the source key columns. If it doesn't, SQL Flow offers Create tables & keys after the save.
- Resume the pipeline. From then on, every change to the table is written under its new name.
- Copy the table's existing rows to the new name: on the Tables tab, select Resync for the renamed table. The other tables keep streaming, and nothing else is copied again. See Resync a table.
While the pipeline runs, the dialog shows "Pause the pipeline to change table and column names." and the name fields are read-only. Saving while it runs is refused with Pause the pipeline before changing target name mappings.
Until the resync completes, the renamed table holds only the rows that changes after the resume wrote. To copy every table again instead, reload the pipeline with Actions > Reload from source. See Lifecycle.
The old target table is left in place, with its rows. Drop it yourself when you no longer need it.
How names are written
- A target table name is
tableorschema.table. A table without a schema goes to the target's default schema. - Names are used exactly as you type them. They aren't recased: on PostgreSQL,
Sales.Orderscreates the case-sensitive"Sales"."Orders", and on Oracle,orderscreates the case-sensitive"orders". Type the case you want the target to have. - Quote a name part with the target's own delimiters when it contains a dot or other special characters:
"…"for PostgreSQL and Oracle,`…`for MySQL,[…]for SQL Server, Azure SQL, Fabric and Sybase ASE. - Source column names are matched exactly. SQL Flow doesn't check that a source column exists when you save; a misspelled name has no effect.
- Each name is at most 1,024 characters, with no control characters. A target can hold up to 10,000 table and column renames.
Names and in-flight processing
When a table has output columns, the rule's output names come first, and the column renames then apply to them. Key columns must keep their source names in the rule, so rename them here instead.
Conflicts and errors
| Message | Cause |
|---|---|
<table> already writes to <name>. Choose a distinct target table. | Two tables of this target would write the same target table. |
More than one source table maps to <name>. Choose distinct target names. | Two tables are renamed to the same name. |
More than one source table resolves to <name>. Choose a distinct target name. | With the same engine on both sides, a rename equals another table's unchanged name. |
More than one column is renamed to <name>. Choose distinct target columns. | Two columns of one table get the same name. |
<column> is already renamed. | The source column already has a rename. |
Enter both the source and the target column name. | One side of a column rename is empty. |
Add this column rename or clear both fields. | A column rename was typed but not added. |
The target table name is invalid., The rename of <column> is invalid. | The name is too long or holds control characters. |
<name> is not a valid SQL identifier: <reason>. | The name's quoting or dots don't parse for the target, for example a [ on a PostgreSQL target. |
'<table>' is not a tracked source table in this pipeline. | The table isn't selected in the pipeline. |
Table <t> in <target> would be written by <n> targets of this pipeline … | Two targets of the pipeline write the same table in the same database. |
SQL Flow doesn't detect two source tables whose automatic names collide, such as Orders and orders from a case-sensitive source to PostgreSQL. Rename one of them.
