Overview
When a source schema changes — a column grows, appears, disappears, or is renamed — an ETL destination has to keep up. This guide is the complete reference for how Etlworks handles destination schema changes in ETL, bulk loads, and CDC: the table creation and matching modes, the add-column option, copying source keys and indexes, the automatic type, drop and rename controls introduced in Etlworks 10.1.3, explicit per-table rules, and exactly which flows and destination databases support each operation.
It is written for someone who knows which source, destination and flow they use and wants to know exactly what a run will change. For the basics of creating and altering tables, see Automatically create or alter a destination table. A video walkthrough of the automatic schema change controls is available: Handle schema drift with Etlworks.
Note: the three automatic schema change checkboxes and the Copy source primary key and indexes setting are available in Etlworks 10.1.3 and newer. All automatic schema change options are off by default; existing configurations remain valid with the options off.
Where the settings live
Open a flow with a SQL destination and select Configure on its transformation. The settings in this guide are under Mapping > Parameters > Handling schema changes. Dedicated bulk-load and CDC flows expose the corresponding settings panel on the flow or transformation.
- In Composer, configure the inline transformation, or edit the referenced flow if the step references one.
- In a classic nested flow, edit the child flow's transformation.
Target Table Creation & Matching
The Target Table Creation & Matching mode decides whether a run can create a missing table, how it adapts the load to an existing table, and when it fails instead.
| Mode | Creates a missing table | Behavior with an existing table |
|---|---|---|
| Auto-Create & Match Target Table | Yes | Adjusts incoming values to the destination column types and excludes source columns the destination doesn't have. With the add-column option enabled, missing columns are added instead of excluded. |
| Auto-Create Target Table, Fail on Mismatch | Yes | Fails when the source (including the mapping) has extra columns the destination doesn't have. Extra destination columns are allowed. |
| Match Existing Target Table, Do Not Create | No | Adjusts incoming values to the existing table. Extra destination columns are allowed. |
| Use Existing Target Table Without Modifications | No | Loads as-is with no creation or matching. |
| Auto-Create & Strict Schema Match, Fail on Mismatch | Yes | Fails unless source and destination have identical column names and counts. Order and data types don't matter. |
| Strict Schema Match, Fail on Mismatch, Do Not Create | No — fails | Same strict rules; fails immediately if the table doesn't exist. |
| true (legacy) | Equivalent to Auto-Create & Match Target Table. | |
| false (legacy) | Disables automatic creation and matching. | |
Matching incoming values to existing column types, excluding unmatched source fields, and loading NULL into target columns that have no incoming field are ordinary load behavior in the matching modes — they never change the destination schema. Changing an existing SQL column definition requires the schema change features described below.
Add new columns: the independent add-column option
Alter target table if the source has columns that the target table doesn't have is the established add-column feature, independent of everything else in this guide. When enabled, and the selected creation mode supports altering, Etlworks generates and runs an ALTER TABLE … ADD statement for each mapped source column missing from the destination. When it is off, extra source columns are excluded (or fail the load, depending on the mode above). Some loaders spell the option slightly differently — for example, streaming CDC flows title it the same way but store it as a required per-flow setting — the behavior is the same.
Related existing options in the same panel, all unchanged in 10.1.3:
- Create temporary table — creates the destination as a temporary or staging table; staging options affect the staging schema, not the final table.
- Recreate target table if the source has columns that the target table doesn't have — drops and recreates the table instead of altering it. Important: recreate rebuilds the table and can discard its data.
- Ignore Errors on Table Creation — continues past "table already exists" errors when parallel threads race to create the same table.
- Log DDL SQL statements — logs every generated CREATE, ALTER and index statement; turn this on when testing any schema change behavior.
- Create table SQL and the CREATE/ALTER SQL hook — programmatic overrides of the generated DDL where the flow offers them.
- Connection-wide data type overrides and mapping-level type overrides — explicit types that Etlworks always preserves; no automatic feature in this guide overrides an explicit type.
Copy the source primary key and indexes
Starting with 10.1.3, the ETL templates that previously had a Create Indexes checkbox have a Copy source primary key and indexes setting with three choices:
- Do not copy (default) — the created table gets no copied key or indexes.
- Primary key only — copies the source table's primary key where the destination and the eligible mapped fields support it.
- Primary key and indexes — copies the primary key where supported, plus the supported source indexes.
The setting applies when Etlworks generates a destination CREATE TABLE or recreates the table, and the source is a database that exposes key and index metadata. A destination may support a different set of keys and indexes than the source; only eligible destination fields are included. Existing flows that had Create Indexes enabled map to Primary key and indexes; flows that had it disabled continue with Do not copy. Older Integration Agents apply the legacy index-copy behavior for either copy choice.
Note: copying the source primary key is unrelated to the Lookup Fields used by MERGE actions and to selecting a key for automatic source partitioning — those control how rows are matched and split, not what the created table looks like.
Automatic schema changes for existing columns (10.1.3+)
Three independent checkboxes let a flow follow source schema changes on an existing destination table. They appear next to the add-column option in every add-column-capable configuration surface, each defaults to off, and each works on its own:
| Setting | Effect on an existing destination |
|---|---|
| Alter target table if the source has columns that the target table doesn't have | Adds new mapped fields where the chosen loader and table mode support it (the established option above). |
| Automatically update destination column types | Widens supported existing types from trustworthy incoming field definitions. This is a bounded set of safe changes — never narrowing, and never a conversion that requires rewriting data outside the destination's native support. |
| Automatically drop removed columns | Follows a verified removal on the eligible direct PostgreSQL batch and Modern MySQL CDC paths. A drop permanently removes the column and its stored values. |
| Automatically rename columns | Follows a tracked PostgreSQL source column identity or a verified MySQL CDC rename event on eligible paths. Existing values stay in the renamed column. |
Saving the flow checks the effective destination connector, selected operations, load mode and source configuration, and rejects unsupported combinations with a message. A valid configuration can still encounter a dependency, permission, type or metadata condition at runtime — an inferred change that cannot safely run is skipped with a warning, and the ordinary load can still fail if it needed that change. Wildcard flows evaluate each resolved destination table separately.
How automatic type updates decide
Type updates require trusted source or mapped field metadata and a widening the destination natively allows: for example, a supported PostgreSQL load can increase the size of an existing bounded VARCHAR. Source definitions must supply usable type information — schema-less files or untyped records cannot request a widening. Explicit mapping or connection type overrides are always preserved, and unknown maximum widths are excluded as evidence. See the destination matrix for exactly which type families each database supports.
How automatic drops and renames decide
Drops and renames never guess from names alone. There are exactly two eligible paths:
- Direct PostgreSQL batch ETL (PostgreSQL to PostgreSQL). The engine records the matching source and destination column identities on a successful baseline run — including when the flow creates the target or adds a column. An existing destination column is not adopted merely because its name matches. On a later run, a tracked source rename follows to the destination, and a tracked removal drops the destination column only when it has no stored values and passes dependency checks; a populated column is preserved. Use a direct table read with original column names and generated SQL — source queries, custom SQL, custom mappings and automatic source partitioning are outside this path.
- Modern MySQL CDC. With one exact source table, one destination table, generated direct relational load SQL, auto-commit and original column names, a verified single-column MySQL DDL event (such as ALTER TABLE … RENAME COLUMN or DROP COLUMN, including CHANGE COLUMN forms) follows to a PostgreSQL, MySQL 8+ or native SQL Server destination. Complex combined DDL, table renames and online-schema-change tool cutovers are outside the automatic contract. A verified CDC drop deletes the data in the destination column.
Type selection for new tables and new columns
Independently of the checkboxes, when Etlworks generates DDL for a new table or a new column, a known character width beyond the destination driver's limit can use a suitable larger destination type. Valid widths remain bounded — PostgreSQL VARCHAR(2000) stays VARCHAR(2000) — while an eligible width exceeding the driver limit can fall back, for example, to PostgreSQL TEXT, SQL Server VARCHAR(MAX) or NVARCHAR(MAX), Oracle CLOB or NCLOB, Redshift VARCHAR(MAX), Snowflake VARCHAR within its supported limit, or Vertica LONG VARCHAR. Explicit overrides and key/index restrictions are preserved. This automatic fallback does not widen a column that already exists.
Destination database matrix for existing columns
This matrix describes the new 10.1.3 operations on existing columns. Read it together with the flow matrix — both the destination row and the flow row must support an operation. "Unavailable" means the operation is outside that Etlworks path even if the database supports similar SQL. The existing column definition, native server version, dependencies, permissions and table features still govern each individual change. The lack of a new ALTER operation does not imply absence of the older create, match and add-column support — see loader coverage below.
| Destination connector and engine | Automatic type widening | Automatic drop | Automatic rename | Explicit per-table JSON |
|---|---|---|---|---|
| Native PostgreSQL | Eligible bounded VARCHAR and same-scale NUMERIC precision increases | Tracked direct PostgreSQL batch, or verified Modern MySQL CDC | Tracked direct PostgreSQL batch, or verified Modern MySQL CDC | Widen, guarded drop and rename. Eligible integer widening (SMALLINT to INTEGER or BIGINT, INTEGER to BIGINT) is explicit-only. Retains the exact MySQL CDC source-table rename rule. |
| Native MySQL 8+ with InnoDB | Eligible in-place bounded VARCHAR widening within character and byte-width limits | Verified Modern MySQL CDC | Verified Modern MySQL CDC | Widen, guarded drop and rename |
| Native Microsoft SQL Server and eligible Azure SQL (Microsoft JDBC connector) | Eligible same-family bounded VARCHAR, NVARCHAR and VARBINARY widening | Verified Modern MySQL CDC | Verified Modern MySQL CDC | Widen, guarded drop and rename |
| Oracle | Eligible VARCHAR2, NVARCHAR2, RAW, or same-scale NUMBER precision increases. May require the DBMS_LOCK permission. | Unavailable | Unavailable | Widen only |
| Amazon Redshift | Eligible bounded VARCHAR to VARCHAR(MAX) | Unavailable | Unavailable | Widen only |
| Google BigQuery | Eligible top-level INT64 to NUMERIC or BIGNUMERIC, and NUMERIC to BIGNUMERIC, with sufficient numeric metadata | Unavailable | Unavailable | Widen only |
| Databricks Delta | Eligible integer and floating-point promotions, compatible decimal widening, and DATE to TIMESTAMP_NTZ. Requires Delta type widening enabled on the table and a compatible runtime. | Unavailable | Unavailable | Widen only |
| Snowflake | Eligible text widening and compatible numeric precision increases to NUMBER(38,s) at the existing scale | Unavailable | Unavailable | Widen only |
| Vertica | Eligible same-family bounded VARCHAR and VARBINARY widening | Unavailable | Unavailable | Widen only |
| MariaDB; Greenplum; Azure Synapse and Microsoft Fabric using the Synapse driver; SQL Server through jTDS or CData; Db2 and IBM i; Informix; Sybase ASE; ClickHouse; SQLite; Derby; other generic JDBC; and all remaining destinations outside the supported native connectors above | Unavailable | Unavailable | Unavailable | Unavailable |
Note: for Amazon Aurora PostgreSQL or Aurora MySQL, use the corresponding native PostgreSQL or MySQL connector; the same native engine, connector and version checks apply. A generic JDBC connection aimed at the same database does not qualify, and a similarly named connector (for example, SQL Server through jTDS) is not interchangeable with the supported native connector. The full list of connectors is in the database connectors catalog.
Flow and destination compatibility matrix
Read this with the destination matrix. A checkbox being visible in Configure does not by itself mean the selected runtime route can accept it — saving validates the combination.
| Flow path | Automatic type widening | Automatic drop or rename | Explicit rules and load notes |
|---|---|---|---|
| Regular ETL with generated SQL into a supported database — database to database, eligible any-source/database templates, batch Change Replication, and file, API/web service, application, email, NoSQL and queue batch sources with typed metadata | Supported destination row above; single table or eligible wildcard, each resolved table evaluated separately | Direct native PostgreSQL table to native PostgreSQL only, with tracked ownership | Exact destination rules on supported generated paths. A metadata preview or an alias inherited from a different destination does not qualify a load. |
| Client-side bulk ETL and native COPY | Eligible built-in loader matching the native destination, with reliable typed metadata. Includes the built-in Vertica COPY template. | Unavailable | Where supported by the selected direct or bulk path. Ordinary key and match settings are not schema changes. |
| Warehouse ETL staging files for the database load | Eligible generated modes for Oracle, Redshift, BigQuery, Databricks Delta and Snowflake when the selected load has suitable typed metadata | Unavailable | Widening only for these warehouses. A SQL-only COPY can use explicit widening only on a specifically supported route. |
| Dedicated bulk load from files | Eligible generated warehouse paths above, including the supported column-oriented Snowflake CSV path, and eligible native COPY and file routes. Verify the input format and loader mode for each. | Unavailable | SQL-only imports without typed metadata cannot infer widening. The Etlworks Bulk Load Files into Snowflake flow (COPY/MERGE) is distinct from native Snowflake Snowpipe ingestion. |
| Modern direct relational CDC with generated load SQL and auto-commit | Native supported target with typed relational Debezium records and eligible source metadata, operation and destination | Verified one-table Modern MySQL CDC into PostgreSQL, MySQL 8+ or native SQL Server | The separate exact MySQL-source-to-PostgreSQL cdcRenameFrom rule has its own contract — see explicit rules. DDL event handling is separate from row mapping. |
| Direct queue-to-database streaming | Supported target with typed Etlworks or Debezium CDC messages, generated SQL, auto-commit and no preprocessing script | Unavailable | Ordinary untyped JSON cannot provide type evidence. Only validated rule paths are supported. |
| Legacy CDC, MongoDB CDC, file CDC, staged CDC and staged queue streams, native Snowflake Snowpipe ingestion, and other indirect or externally applied paths | Outside the automatic contract — the direct typed input or an authoritative schema for the loaded batch is absent | Unavailable | Each loader keeps its documented legacy schema behavior. Check any explicit widening route individually. |
| Composer and classic nested flows | Inherits the applicable inline transformation or child flow and destination row | Same as the applicable child path | There is no pipeline-wide inferred schema policy. |
| File output, object storage output, non-SQL connections and any unsupported or custom load mode | Unavailable for destination SQL schema changes | Unavailable | Distinct from format evolution, staged files and mapping. |
Loader-specific creation and bulk coverage
The older create, match, add-column and recreate options vary by flow family and loader, and are unchanged by 10.1.3. The new operations additionally require generated load SQL and a mode that preserves the existing table.
| Path | Creation and schema change coverage |
|---|---|
| Standard SQL row loads | All creation and matching modes. Adding columns requires the independent add-column option and a mode that allows it. The new automatic operations require generated load SQL and a table-preserving mode. Database-specific create and add restrictions still apply per connector, including destinations without a new ALTER planner. |
| Client-side native bulk load | Separate methods for PostgreSQL, MySQL and SQL Server, plus the built-in Vertica COPY template. The selected Bulk Load SQL method must match the native destination; a custom command is not interchangeable with a supported built-in method. See client-side bulk load. |
| Oracle file and warehouse loaders | Schema changes use the generated SQL*Loader control file. The documented create and add settings for the particular flow are retained. |
| Redshift | Generated warehouse loads are distinct from direct COPY. Direct COPY requires a single COPY statement with a schema-qualified target for explicit widening, and a COPY without typed input metadata cannot infer a new type. See Redshift file bulk load. |
| Snowflake | Four distinct paths: ETL into Snowflake, direct COPY, Bulk Load Files into Snowflake (the Etlworks COPY/MERGE flow), and native Snowpipe. The Etlworks file loader supports schema changes only with a format that loads individual columns, such as CSV; the single aggregate-column JSON/Parquet modes and dynamic format do not qualify. See Snowflake file loading. |
| BigQuery | Generated warehouse and file loads are distinct from direct relational row paths. Only supported generated SQL participates; verify the final target and the top-level column restriction for numeric widening. |
| Databricks | Staging types are distinct from the types on the Delta target. Destination type widening requires the Delta prerequisites above and is separate from the existing text-only staging and add-column options. See Databricks file loading. |
| Greenplum and Synapse/Fabric loaders | Existing creation and additive behavior as documented for each loader. These destinations are outside the new widening, drop and rename contract. |
| CDC and queue streams | Target creation, add-column and key settings depend on the exact flow variant. Direct relational CDC and direct typed queue streaming have different eligibility from a staged warehouse stream. See CDC to a relational database and queue streaming. |
Explicit per-table rules: Destination schema changes
For exact, per-target control, the Destination schema changes advanced option (titled Destination schema drift rules in CDC flows) accepts JSON rules keyed by the exact qualified destination table. Normal automatic operation needs only the checkboxes — use explicit rules when you need a specific change the automatic inference would not make.
{
"public.orders": {
"types": { "notes": "VARCHAR(512)" }
}
}Rule elements, each valid only on its verified routes in the matrices above:
- types — maps a column to the exact wider destination type. PostgreSQL, MySQL 8+, SQL Server, Oracle, Redshift, Snowflake, BigQuery, Databricks and Vertica support selected widenings; eligible PostgreSQL integer widening is available here.
- drop — lists columns to remove, on PostgreSQL, MySQL 8+ or SQL Server. Important: an explicit drop permanently deletes the stored data in those columns.
- rename — maps an old column name to the name used by the destination mapping, on PostgreSQL. After a rename, the load mapping must use the new names.
- cdcRenameFrom — a separate rule for Modern MySQL CDC into PostgreSQL only: {"public.orders":{"cdcRenameFrom":"sales.orders"}} follows MySQL RENAME COLUMN DDL from exactly that source table. Select exactly that source table, keep the original event schema and column names, enable destination auto-commit, use generated SQL, and omit column filters, mapping, preprocessing scripts, explicit keys and other schema drift rules on the same table.
An invalid explicit rule reports an error at save or run time rather than being skipped.
Integration Agent compatibility
When runs are delegated to an Integration Agent, the Agent's engine applies the schema changes. An older Agent silently ignores the new automatic schema change instructions and the explicit rules, and continues with its existing load behavior — it can still fail with its ordinary load error if the incoming data needs a destination change it does not perform. Use an Agent with the 10.1.3 or newer engine to apply them. For Copy source primary key and indexes, older Agents apply the legacy index-copy behavior for either copy choice.
Worked examples
Widen an existing column (PostgreSQL to PostgreSQL)
Run this fixture in an empty disposable PostgreSQL database and point a native PostgreSQL source and destination connection at it. Use drift_source.orders as the From and drift_target.orders as the To of a Database to Database flow.
CREATE SCHEMA drift_source;
CREATE SCHEMA drift_target;
CREATE TABLE drift_source.orders (
id integer PRIMARY KEY,
description varchar(16)
);
CREATE TABLE drift_target.orders (
id integer PRIMARY KEY,
description varchar(16)
);
INSERT INTO drift_target.orders VALUES (1, 'Original order');Select Auto-Create & Match Target Table, keep generated SQL and the normal by-name mapping, and enable only Automatically update destination column types. Save, then change the source and run the flow:
ALTER TABLE drift_source.orders ALTER COLUMN description TYPE varchar(128);
INSERT INTO drift_source.orders VALUES (2, 'Replacement parts for the east warehouse');Verify the widened destination column and both rows:
SELECT column_name, character_maximum_length
FROM information_schema.columns
WHERE table_schema = 'drift_target'
AND table_name = 'orders'
AND column_name = 'description';
SELECT id, description FROM drift_target.orders ORDER BY id;The expected width is 128, with the original and the new row both present.
Add a column
Add a nullable field to the source and enable only Alter target table if the source has columns that the target table doesn't have. The next run adds the mapped column to the destination. Loading a new source field this way is different from preserving a target-only column: a destination column with no incoming field simply receives NULL (or keeps its values on UPDATE/MERGE actions) — no schema change is involved.
Follow a PostgreSQL batch rename or removal
Use a direct PostgreSQL table read with original names and generated SQL — no source query, custom SQL, custom mapping or automatic source partitioning. Start with a target the flow creates (or a column it adds) and a successful run: that run records ownership. Existing matching names alone do not establish ownership. Then rename or remove the source column and run again. For a drop test, use a separate fixture with a nullable, all-NULL column — a populated destination column is preserved when Etlworks infers a removal from batch metadata. Check dependencies and inspect the execution log for the planned and executed DDL.
Follow a MySQL CDC event
Use Modern MySQL CDC with one exact source table and target, a direct generated relational load with auto-commit, original column names, and no filters, extra fields or preprocessing. Apply one simple column operation on the source, for example:
ALTER TABLE sales.orders RENAME COLUMN old_code TO code;The stream verifies the change against the Debezium table-change metadata before applying it to the destination. A verified CDC drop deletes the data in the destination column. Combined multi-operation DDL, table renames and online-schema-change cutovers are outside the documented automatic contract.
Resolve an unavailable configuration
Saving an unsupported combination fails with a message naming the requirement, for example:
Automatically rename columns requires a direct PostgreSQL-to-PostgreSQL ETL flow,
or one MySQL CDC source table and one PostgreSQL, MySQL 8+ or SQL Server destination
with auto-commit. Use generated SQL and unchanged source column names.Common causes: an unsupported connector or load mode, strict or unmodified table modes, recreate, a temporary-only target, custom load SQL, automatic source partitioning combined with drop or rename, or a conflicting Before SQL on the same connection with auto-commit off. Dedicated bulk loads run their own typed-metadata preflight. For a runtime skip or failure, check the execution log (enable Log DDL SQL statements), the source type evidence, the named target, the native connector, database permissions, table features and dependencies.
Verify and troubleshoot
- Test on a disposable flow first. Run it, then check the execution log and the actual destination schema — the information_schema queries above work for most databases.
- Test Transformation omits the schema change options. Use a normal run to see them applied.
- Skips are not errors. Where an inferred change cannot safely run, it is skipped with a warning; the ordinary load can still fail afterward if it needed that change. An invalid explicit rule reports an error.
- DDL can take database locks. For example, PostgreSQL holds the exclusive table lock of a successful transactional widening until the load commits or rolls back, so concurrent readers may wait for the load to finish. A no-op or refused change releases its lock. On Oracle, eligible DDL can require the DBMS_LOCK permission; an inferred change is skipped without it, while an explicit rule needs the grant.
- Older Integration Agents ignore the new instructions entirely — see Agent compatibility.
Related guides: Get started with databases · Automatically create or alter a destination table · Field mapping · Bulk ETL · Database-specific CDC