HeatWave on AWS  /  ...  /  Channel Filter Rules for Inbound Replication

8.5.1 Channel Filter Rules for Inbound Replication

Each filter rule can contain only one filter type and value. However, you can add multiple filter rules and the result is the logical addition of all the rules. For example, if you create a filter rule with type, REPLICATE_DO_DB, and filter value, mysql1, and another filter rule, with type, REPLICATE_DO_DB, and filter value, mysql2, then both mysql1 and mysql2 databases are replicated.

Table 8-1 Channel Filter Rules

Filter Type Filter Value Details
REPLICATE_DO_DB database Replicates the specified database.
REPLICATE_IGNORE_DB database Restricts the replication of the specified database.
REPLICATE_DO_TABLE database.table Replicates the specified table in the database.
REPLICATE_IGNORE_TABLE database.table Restricts the replication of the specified table in the database.
REPLICATE_WILD_DO_TABLE database.table Replicates the table that matches the specified wildcard pattern.
REPLICATE_WILD_IGNORE_TABLE database.table Restricts the replication of any table that matches the specified wildcard pattern.
REPLICATE_REWRITE_DB from_database->to_database Translates from_database on the source to to_database.

Wildcard Patterns: REPLICATE_WILD_DO_TABLE and REPLICATE_WILD_IGNORE_TABLE support wildcards. Wildcard patterns can contain the % and _ wildcard characters. % represents 0 or more characters and _ represents any single character. For example:

  • A filter value of db%.table% in filter type REPLICATE_WILD_DO_TABLE replicates only those tables where the database name starts with db and the table name starts with table.
  • A filter value of db%.% in filter type REPLICATE_WILD_DO_TABLE replicates all tables where the database name starts with db%.
  • A filter value of db_.table_ in filter type REPLICATE_WILD_IGNORE_TABLE ignores those tables where the database name contains three characters and starts with db and the table name contains six character and starts with table.

If you want to use the two wildcard characters literally in the database or table names in your rule, escape them with backslashes (\). For example, my\_db.top\_90\%.

Mandatory Filter Rules for replicating from MySQL databases running on Amazon RDS:

WARNING:

Your inbound replication will fail with errors unless these filter rules are in place.

Note:

These rules can be selected using the per-configured filter templates. See Creating a Channel for details.

Table 8-2 Mandatory Filter Rules for replicating from MySQL databases running on Amazon RDS

Filter Type Filter Value
REPLICATE_IGNORE_TABLE mysql.rds_heartbeat2
REPLICATE_IGNORE_TABLE mysql.rds_sysinfo