DBD: Data Replication System - Set up Data Replication Filters (Optional)
1: Overview of Data Replication Filters
It is possible to restrict the amount of data that Data Replication transmits to the external database. This feature can be used to improve performance by reducing the data that needs to be replicated, or to ensure that a certain portion of the DB Distributor data is never replicated to the external database for privacy reasons.
It also allows you to filter the data according to whether or not it contains specific customer codes. It can, for example, allow you to replicate data to DB Enterprise only for the specific customers that use DB Enterprise to place orders.
The Filter is a list of customer codes that can be assigned to a data replication Target. Filters are defined on a per Target (external database) basis.
Note: The filters must first be defined here using the Apply Filters utility, BEFORE you enable them on a Target using the Target Setup utility. Refer to the chapter Set up Data Replication Targets for more details.
2: How filters affect the server process
The data replication server processes queued data updates from the DB Distributor “DR2” file. When it encounters a target that has filters enabled, it checks to see if the current data record's key fields contain at least one matching filter code defined. If it does, then the record is replicated, else the record is discarded ("filtered") and a log entry is written for this action.
Currently customer codes are the only supported filters that can be defined. This means that for any file being replicated, the records will be processed if the record key contains at least one customer code defined for that target; else the record is discarded.
Exceptions to this process can occur:
If the record key has a customer code field but it happens to be blank.
e.g., the “IC0_Item” file has a blank customer code for all stock items.
If the record key does not have a customer code field at all.
e.g., the “FS1_OrderHdr” file has a primary key of ORDER_DIV and ORDER_NUM.
3: How to define filters for a Target
You define and apply a filter by executing the Apply Filters utility:
GUI: DB Distributor Optional Modules > Data Replication > Setup > Apply Filters
CHUI: D/R menu, option S4
Selecting the above option will launch the following program where the desired Data Replication target can be selected:
Select a customer using the query button or enter a customer code in the “Filter” field:
After you select a filter code (customer), click the “Apply Filter” button:
4: How to enable filters on a Target
After you have defined a list of filters for a target, you must enable the filters for that target. This is done in the Target Setup utility.
You set up a Data Replication target by executing the Target Setup utility, as follows:
GUI: DB Distributor Optional Modules > Data Replication > Setup > Target
CHUI: D/R menu, option S1