Adding table filters to a publication (addfilter) v7

The addfilter command adds the definition of table filter rules to the specified publication. This addition makes the filter rules available to enable later on target subscriptions or non-MDN nodes.

Enabling a filter rule on a specified, target subscription or non-MDN node results in the filtering of data from the source table to the target table during replication.

If the filter rule isn't enabled on a target subscription or non-MDN node, then it has no impact on that subscription or non-MDN node during replication. See Enabling filters on a subscription or non-MDN node for information on enabling table filter rules.

Synopsis

-addfilter pubname
  –repsvrfile pubsvrfile
[ -tables schema_t1.table_1 [ schema_t2.table_2 ] ...]
[ -views schema_v1.view_1 [ schema_v2.view_2 ] ...]
[ -tablesfilterclause
    "ordinal_t1:filtername_t1:filterclause_t1"
  [ "ordinal_t2:filtername_t2:filterclause_t2" ] ...]
[ -viewsfilterclause
    "ordinal_v1:filtername_v1:filterclause_v1"
  [ "ordinal_v2:filtername_v2:filterclause_v2" ] ...]

See Table filters for more information.

Note

The schema names and table or view names that you supply as values for the tables or views parameters are case sensitive. Unless quoted identifiers were used to build the database objects, you must enter Oracle names using uppercase letters (for example, EDB.DEPT) and EDB Postgres Advanced Server names in lowercase letters (for example edb.dept). See Quoted identifiers and default case translation for more information.

Parameters

pubname

The name of the publication in which to add table filters.

pubsvrfile

The file containing the publication server login information.

schema_tn

The name of the schema containing the nth table of the tables parameter list. This value is case sensitive.

table_n

The name of the nth table in the tables parameter list. This value is case sensitive.

schema_vn

For SMR only: The name of the schema containing the nth view of the views parameter list. This value is case sensitive.

view_n

For SMR only: The name of the nth view in the views parameter list. This value is case sensitive.

ordinal_tn

The ordinal number (that is, the position in the list counting from left to right starting with 1) of a table in the tables parameter list to which to apply an attribute.

filtername_tn

The filter name to assign to the filter rule on the table.

filterclause_tn

The filter clause to applied to the table in the tables parameter list at the position indicated by ordinal_tn.

ordinal_vn

For SMR only: The ordinal number (that is, the position in the list counting from left to right starting with 1) of a view in the views parameter list to which to apply an attribute.

filtername_vn

The filter name to assign to the filter rule on the view.

filterclause_vn

For SMR only: The filter clause to apply to the view in the views parameter list at the position indicated by ordinal_vn.

Examples

This example adds a table filter to the table edb.emp in the publication analysts_managers.

$ java -jar edb-repcli.jar -addfilter analysts_managers \
>   -repsvrfile ~/pubsvrfile.prop \
>   -tables edb.emp \
>   -tablesfilterclause "1:jobgrade_9:job = 'SALESMAN'"
Creating Filter(s)
Tables:[[edb.emp, TABLE]]
Filter clause:[FilterName:jobgrade_9    FilterClause:job = 'SALESMAN'   ]
Filter(s) created successfully.