Synchronization Server Help


Filtering data in the subscription

When you create a subscription to a particular table (the PATIENTS table for your group of visiting nurses, for example), performance considerations might force you to replicate only a subset of the data in the table. You specify this subset by choosing individual rows to be replicated for each table in the subscription.

For example, you might decide that the only columns relevant for visiting nurses using the PATIENTS table are the PATIENT_NAME, ADDRESS, PHONE, and DOCTOR fields. You might then decide to further filter the data by defining a WHERE clause that filters data for nurses working for a particular doctor.

You can combine data filters for the subscription with filters set for the group or for individual users to pare down the data even further.

The Sync Server supports only a subset of the replication options allowed by DB2 DataPropagator. Thus, on the Target Type page of the Advanced Subscription Definition notebook, the Target table is replica radio button is selected by default and cannot be changed.

These steps are part of the larger task of creating a DataPropagator subscription or editing a DataPropagator subscription. When you complete the steps for filtering data, return to the main task.


Figure dsyh016 not displayed.

To filter the data that will be replicated during synchronization:

  1. From the Define Replication Subscription window, click Advanced. The Advanced Subscription Definition notebook opens.

  2. Optional: Define a WHERE clause that selects individual rows to be included in the subscription. You might decide that you want only certain rows to be part of the subscription even if you chose all columns to appear in the replica.

    1. Go to the Rows page of the Advanced Subscription Definition notebook.

    2. In the All rows needed field, type a WHERE clause that defines the subset of rows that you want to appear in the subscription. For example, suppose that you want your visiting nurses to see only the rows of data in the PATIENTS table where the value of the JOBCODE column is VNURSE. You could type the following WHERE clause:
      WHERE JOBCODE='VNURSE'
      

      Click Examples to display sample WHERE clauses.

    3. Optional: In the Subset of rows for individual users field, type a WHERE clause for individual users that overrides the WHERE clause for the subscription. For example, suppose that you want users to see data related to their own jobcodes. Instead of hard-coding a value for the JOBCODE parameter for the entire subscription, define a variable that references the data filter value defined for each individual user:

      WHERE JOBCODE=':JOB'
      

      Later you could go to the Data Filter page of the Edit User notebook and set the JOB parameter to each user's job code. See Filtering the data available to the user for more information on filtering data for individual users.

  3. Click OK to return to the Define Replication Subscription window.

[Return to creating a DataPropagator subscription or editing a DataPropagator subscription]


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]