Continuent Documentation

Search:

11.4.39. tosingledb.js Filter

This filter updates the replicated information so that it goes to an explicit schema, as defined by the user. The filter can be used to combine multiple tables to a single schema.

Pre-configured filter name tosingledb
JavaScript Filter File tungsten-replicator/support/filters-javascript/tosingledb.js
Property prefix replicator.filter.ansiquotes
Stage compatibility q-to-dbms
tpm Option compatibility --svc-applier-filters
Data compatibility Any event
Parameters
Parameter Type Default Description
db string (none) Database name into which to replicate all tables
skip string (none) Comma-separated list of databases to be ignored

A database can be optionally ignored through the skip parameter within the configuration:

replicator.filter.tosingledb=com.continuent.tungsten.replicator.filter.JavaScriptFilter
replicator.filter.tosingledb.script=${replicator.home.dir}/samples/extensions/javascript/tosingledb.js
replicator.filter.tosingledb.db=dbtoreplicateto
replicator.filter.tosingledb.skip=tungsten

Similar to other filters, the filter operates by explicitly changing the schema name to the configured schema, unless the skipped schema is in the event data. For example, at a statement level:

if(oldDb!=null && oldDb.compareTo(skip)!=0)
{
  d.setDefaultSchema(db);
}