Continuent Documentation

Page in Other Manuals

10.4.33. Rename Filter

The rename filter enables schemas to be renamed at the database, table and column levels, and for complex combinations of these renaming operations. Configuration is through a CSV file that defines the rename parameters. A single CSV file can contain multiple rename definitions. The rename operations occur only on ROW based events.

Version Support: 2.2.1 and later

The rename filter also performs schema renames on statement data only in Tungsten Replicator 2.2.1.

Pre-configured filter name rename
Classname com.continuent.tungsten.replicator.filter.RenameFilter
Property prefix replicator.filter.rename
Stage compatibility  
tpm Option compatibility  
Data compatibility Row events; Schema names of Statement events in 2.2.1 and later.
Parameter Type Default Description
definitionsFile string {replicator.home.dir}/samples/extensions/java/rename.csv Location of the CSV file that contains the rename definitions.

The CSV file is only read when an explicit reconfigure operation is triggered. If the file is changed, a configure operation (using tpm update) must be initiated to force reconfiguration.

To enable using the default CSV file:

shell> ./tools/tpm update alpha --svc-applier-filters=rename

The CSV consists of multiple lines, one line for each rename specification. Comments are supposed using the # character.

The format of each line of the CSV is:



  • originalSchema, originalTable, originalColumn define the original schema, table and column.

    Definition can either be:

    • Explicit schema, table or column name

    • * character, which indicates that all entries should match.

  • newSchema, newTable, newColumn define the new schema, table and column for the corresponding original specification.

    Definition can either be:

    • Explicit schema, table or column name

    • - character, which indicates that the corresponding object should not be updated.

For example, the specification:


Would rename the table chicago in every database schema to newyork. The schema and column names are not modified.

The specification:


Would match all schemas, but update the column destination in the table chicago to the column name source, without changing the schema or table name.

Processing of the individual rules is executed in a specific order to allow for complex matching and application of the rename changes.

  • Rules are case sensitive.

  • Schema names are looked up in the following order:

    1. schema.table (explicit schema/table)

    2. schema.* (explicit schema, wildcard table)

  • Table names are looked up in the following order:

    1. schema.table (explicit schema/table)

    2. *.table (wildcard schema, explicit table)

  • Column names are looked up in the following order:

    1. schema.table (explicit schema/table)

    2. schema.* (explicit schema, wildcard table)

    3. *.table (wildcard schema, explicit table)

    4. *.* (wildcard schema, wildcard table)

  • Rename operations match the first specification according to the above rules, and only one matching rule is executed. Rename Filter Examples

When processing multiple entries that would match the same definition, the above ordering rules are applied. For example, the definition:


Would rename asia.shanghai to europe.shanghai, while renaming all other tables in the schema asia to the schema america. This is because the explicit schema.table rule is matched first and then executed.

Complex renames involving multiple schemas, tables and columns can be achieved by writing multiple rules into the same CSV file. For example given a schema where all the tables currently reside in a single schema, but must be renamed to specific continents, or to a 'miscellaneous' schema, while also updating the column names to be more neutral would require a detailed rename definition.

Existing tables are in the schema sales:


Need to be renamed to:


Meanwhile, the table definition needs to be updated to support more complex structure:


The area is being updated to contain the region within the country, while the value should be renamed to the three-letter currency code, for example, the london table would rename the value column to gbp.

The definition can be divided up into simple definitions at each object level, relying on the processing order to handle the individual exceptions. Starting with the table renames for the continents:


A single rule to handle the renaming of any table not explicitly mentioned in the list above into the misc schema:


Now a rule to change the area column for all tables to region. This requires a wildcard match against the schema and table names:


And finally the explicit changes for the value column to the corresponding currency: