Skip to main content
Common Reference

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 nametosingledb
JavaScript Filter Filetungsten-replicator/support/filters-javascript/tosingledb.js
Property prefixreplicator.filter.ansiquotes
Stage compatibilityq-to-dbms
tpm Option compatibilitysvc-applier-filters
Data compatibilityAny event

Parameters

ParameterTypeDefaultDescription
dbstring(none)Database name into which to replicate all tables
skipstring(none)Comma-separated list of databases to be ignored

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

property=replicator.filter.tosingledb.db=centraldb
property=replicator.filter.tosingledb.skip=tungsten

The above configures all data to be written into centraldb, but skips the database 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);
}