Creating a staging filter configuration XML file
You can create an XML file to configure the stagingprop utility to propagate only specific objects to the production database. When you are running the stagingprop utility, you can use the configuration file by specifying the file path as the value for the filterconfigfile parameter.
By using a staging filter configuration file, you can publish only the data that matches a custom staging filter condition. For example, you can publish only changes for a specific store, or publish changes for only the objects that are included within a specific Management Center folder or category. By using staging filters, you can promote data to production whenever you need to publish a specific set of data between regular large staging operations.
The staging filter configuration XML file defines the SQL for the utility to use to retrieve and propagate filtered data. You can use the filterconfigfile parameter when you run the utility to have the utility use the configuration file to filter the data that is being published. For more information about filtering data and using a staging filter configuration file when you run the stagingprop utility, see Filtering data for the stagingprop utility to propagate.
Procedure
-
Download the following sample configuration file into a temporary directory. You can use this
file as a base to create your own custom configuration file.
This file defines custom staging filters to filter offer-related data by a trading position container ID.
- Open the Utility server Docker container.
-
Go to the following directory, which contains the sample staging filter configuration XML file
for use in propagating data by custom filters. If the Staging directory does
not exist, create the directory.
- utilities_root/components/foundation/samples/Staging
-
Create a directory within the Staging directory to include your
configuration file.
For example, if you are creating a file to publish attribute data filter by store ID, you can name the directory, Attribtute-ext.
-
Copy the downloaded sample configuration file into the new directory and rename the file.
For example, if you are creating a file to publish attribute data filter by store ID, you can name the file attributeFilterByStore.xml.
-
Edit your new staging filter configuration file to define how the stagingprop utility is to
filter and process data.
- Save and close your file.
What to do next
For an example that uses the provided sample staging filter configuration XML file with the stagingprop utility, see Example: Propagating filtered promotion data to the production database.