Filtering data for the stagingprop utility to propagate
You can filter the data that the stagingprop utility propagates to publish updates for only specific objects to your production database. You can filter data by tables, by change records, by custom filters, or by a combination of the filter options.
When you filter the data to propagate, you reduce the impact to site performance from the stagingprop process by reducing the amount of data that is being propagated. To filter the data, you can configure the utility to filter by table or by change record. When you run you run the utility, you can use command-line parameters to identify the filtering method and any required configuration file or value to use. You can filter data by using custom filters.
When you use a custom filter, the stagingprop utility propagates data that matches the filter. You can use multiple custom filters at a time to filter the data that you want to propagate, but the filters must be defined within the same configuration file. A custom filter can filter data by criteria such as the store, locale, or object ID (for example promotion ID, category ID, or folder ID). Custom filters apply to only the objects and tables that are defined in the specified configuration file. If a table is not included in any filter definition within the configuration file, the contents of that table are propagated normally. For example, if you have catalog and promotion data that is flagged for propagation and you configure custom filters for promotions, the stagingprop utility propagates the specific promotion data that matches the custom filters and propagates all of the catalog data that is flagged for propagation.
You can use more than one filtering method at a time. For example, if you have catalog and promotion data that is flagged for propagation, you can use custom filters to filter the promotion data and include a custom list that configures the stagingprop utility to propagate only the data within promotion-related database tables. With these filtering methods combined, the stagingprop utility propagates only the promotion data that matches the custom filters, not the catalog data.
For INSERT and UPDATE operations that use custom filters, the staging process uses the custom filter configuration and the primary key values in the STAGLOG table to associate records with the appropriate tables in the staging database and fetch the filtered records for propagation.
For DELETE operations that use custom filters, the staging process cannot fetch or query the records in the staging database. The records are already deleted in the staging database so the staging process cannot determine whether a custom filter applies, such as whether a deleted record was associated with a particular store ID. The only way to identify that a record primary key is associated with a custom filter value is to record the association before you delete the record. You must continue to use the AFTER DELETE trigger that is associated with the STAGLOG table to determine this association for DELETE operations.
Procedure
-
To use a custom filter to filter data:
-
To use a custom list to filter data by database table:
-
To use a change record to filter data: