Skip to main content
Version: 8.2.x

Filtering Data

Follow the following recommendations when creating a new data set:

  1. Follow general XML formatting rules.

  2. Use &amp to get ampersands &.

    Follow the same rule for other special characters.

  3. Avoid using angle brackets or <element> tags as placeholder values.

  4. Use \\ instead of backslashes (\).

Placeholder values in data sets are filtered by data population before the database update occurs. This provides a consistent way to define environment-specific values for both SQL (Structured Query Language) and import/export files.

Placeholders values are configured in the database/ext-data module in the following files:

  • resources/config/filtering.properties

    Specifies the default values that are shared by all environments. You can override these values in environment-specific property files.

  • resources/environments/*/filtering.properties

    Specifies environment specific property values. Each environment has its own filtering.properties file. For example, environments/local/filtering.properties

  1. To create a new placeholder in a data sets, add the placeholder to data using the spring-style placeholder.

    For more information, see Data filtering property placeholders.

  2. Optional: Add the default value for the place holder to the filtering.properties file.

  3. Add environment-specific values to filtering.properties files in each environment directory if the values differ from the default values.

note

Elastic Path recommends does not recommend using default values and to add environment-specific values for all environments. If you do not define an environment-specific value, the default value, localhost, is used.

In this example, the placeholder ${ep.smtp.host} is defined in an import/export data file with a default value as localhost.

<configuration_setting>
<name_space>COMMERCE/SYSTEM/EMAIL/mailHost</name_space>
<default_value type="String">${ep.smtp.host:localhost}</default_value>
...
</configuration_setting>

You can replace the default value with the following environment-specific values. For example:

EnvironmentValueNotes
localep.smtp.host=${ep.smtp.host}Uses the value of ep.smtp.host defined in the .m2/settings.xml file.
qaep.smtp.host=smtp-test.company.comUses the test SMTP server URL.
prod-liveep.smtp.host=smtp.company.comUse the production SMTP server URL.