Skip to main content
Common Reference

dropddl.js Filter

note

Note that this filter is only intended for use with MySQL<>MySQL replication and will not have any benefit at this time for heterogeneous replication.

There may be occasions where you do not require specific DDL statements to be replicated. For example, you may NOT want to allow TRIGGERS or VIEWS to be replicated, but you do want TABLES, INDEXES, FUNCTIONS and PROCEDURES. The dropddl filter is intended for this purpose.

The dropddl filter allows you to configure which, if any, ddl statements to drop from THL and not be replicated.

Pre-configured filter namedropddl
JavaScript Filter Filetungsten-replicator/support/filters-javascript/dropddl.js
Property prefixreplicator.filter.dropddl
Stage compatibilitybinlog-to-q, q-to-dbms
tpm Option compatibilitysvc-extractor-filters, svc-applier-filters
Data compatibilityAny event

Parameters

ParameterTypeDefaultDescription
dropTableDDLbooleanfalseDrop CREATE TABLE and DROP TABLE statements
dropViewDDLbooleanfalseDrop CREATE VIEW and DROP VIEWS statements
dropIndexDDLbooleanfalseDrop CREATE INDEX and DROP INDEX statements
dropTriggerDDLbooleanfalseDrop CREATE TRIGGER and DROP TRIGGER statements
dropFunctionDDLbooleanfalseDrop CREATE FUNCTION and DROP FUNCTION statements
dropProcedureDDLbooleanfalseDrop CREATE PROCEDURE and DROP PROCEDURE statements
dropUserDDLbooleanfalseDrop CREATE USER and ALTER USER statements
dropGrantDDLbooleanfalseDrop GRANT and REVOKE statements
Example:

If you wish to drop VIEW and TRIGGER DDL on the applier, the following options need to be added to your configuration:

svc-applier-filters=dropddl
property=replicator.filter.dropddl.dropViewDDL=true
property=replicator.filter.dropddl.dropTriggerDDL=true