Filtering Data
Follow the following recommendations when creating a new data set:
Follow general
XML
formatting rules.Use
&
to get ampersands&
.Follow the same rule for other special characters.
Avoid using angle brackets or
<element>
tags as placeholder values.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
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.
Optional: Add the default value for the place holder to the
filtering.properties
file.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:
Environment | Value | Notes |
---|---|---|
local | ep.smtp.host=${ep.smtp.host} | Uses the value of ep.smtp.host defined in the .m2/settings.xml file. |
qa | ep.smtp.host=smtp-test.company.com | Uses the test SMTP server URL. |
prod-live | ep.smtp.host=smtp.company.com | Use the production SMTP server URL. |