di-preprocess utility
The di-preprocess utility extracts and flattens WebSphere Commerce data and then outputs the data into a set of temporary tables inside the WebSphere Commerce database. The data in the temporary tables is then used by the index building utility to populate the data into search indexes with the Data Import Handler (DIH).
The preprocess utility picks the wc-dataimport-preprocess-fullbuild.xml file or wc-dataimport-preprocess-deltabuild.xml file first, and then transforms the results of the SQL statements defined in those files into temporary tables. Next, the utility handles each configuration XML file in a random order.
Parameter values
- full-path
- Required: The full directory location of the preprocessing configuration files, for example: WC_installdir/instances/instance name/search/pre-processConfig/MC_masterCatalogId/target_db.
- instance
- The name of the WebSphere Commerce instance with which you are working (for example, demo).
- dbuser
-
The name of the user who is connecting to the database.
The user ID connecting to the database. If you are using workspaces, the database user must be granted cross-schema privileges to create and drop tables. Otherwise, you cannot preview changes made in workspaces.
- dbuserpwd
- The password for the user who is connecting to the database.
- fullbuild
- Optional: A flag that indicates whether it is a full index build. The accepted values are either true or false. The default value is true.
- localename
- Optional: The locale that should be indexed. The accepted values are either:
- All
de_DE
en_US
es_ES
fr_FR
it_IT
ja_JP
ko_KR
pl_PL
pt_BR
ro_RO
ru_RU
zh_CN
zh_TW
- onelevel
- Optional: A flag you can use to save time when setting up preprocessing for the catalog entry
index (CatalogEntry indextype) and the category index (CatalogGroup indextype) at the same time. If
you set the onelevel flag to true, then for the full-path
value, you only need to specify the path to the preprocessing configuration files for the catalog
entry index. The utility will automatically look for the category index files in the
CatalogGroup directory one level down.
Example:
- Instead of specifying both paths for your full-path value, as shown
here:
C:/Program Files/IBM/WebSphere/CommerceServer80/instances/demo/search/pre-processConfig/MC_10001/DB2, C:/Program Files/IBM/WebSphere/CommerceServer80/instances/demo/search/pre-processConfig/MC_10001/DB2/CatalogGroup
- Specify only the first path, as shown
here:
C:/Program Files/IBM/WebSphere/CommerceServer80/instances/demo/search/pre-processConfig/MC_10001/DB2
The default value of the onelevel flag is true.
- Instead of specifying both paths for your full-path value, as shown
here:
- multithread
- Optional: Preprocesses data by using multiple threads.
- workspace
- The workspace index to preprocess. This value is case-sensitive. If specified, the specified
workspace index is preprocessed. If not specified, the base schema index is preprocessed. The
default value is to preprocess the base schema index. To get the workspace ID, either:
- Open the workspace in the Workspace Management tool in the Management Center. The workspace
code
is the workspace ID; or - If the workspace has an active task group, run the following SQL query:
select * from cmwsschema
, where the workspace ID is listed under theworkspace
column.
- Open the workspace in the Workspace Management tool in the Management Center. The workspace
- dbURL
- The database URL the utility uses to connect to the database. If not provided, the utility constructs a database URL based on the default database value.
- skipDeltaNoEntry
- Optional: When delta preprocessing (fullbuild set to false), the utility checks if there are any delta updates to perform. The utility ends if there are no delta updates to perform. Otherwise, the preprocessing is performed as expected.
- publishedOnly
- Optional: Allows only products from published categories to be displayed in the keyword search results when deep category unpublish is enabled.
- deepUnpublish
- Optional: Enables preprocessing for the deep category unpublish feature.
- deepSequence
- Optional: Enables preprocessing for the deep search sequencing feature.
- passwordFile
- Optional: The full path to the password.properties file that contains the password for the user who is connecting to the database. For example, C:\password.properties.
- nonLangTables
- Optional: Preprocesses only language-insensitive tables.
- langTables
- Optional: Preprocesses only language-sensitive tables.
- dropTempTable
- Indicates whether to drop tables when preprocessing the search index.
- propFile
- The full path to the properties file to pass in to the utility.
- force
- When set to true, forces the utility to run, even if other processes are in progress. Ensure
that this parameter value matches for both the di-preprocess and
di-buildindex utilities, otherwise the utility encounters errors and fail to
run.Note: The index build fails when two or more users or automated processes simultaneously run a preprocess with this parameter. This caution applies to both delta builds and complete index rebuilds. Unexpected results include but are not limited to inconsistent or incomplete indexes.
- grouping
- If you have enabled the product grouping feature, then set -grouping to
true
when running the di-preprocess command. Grouping disables the rolling-up of defining attribute dictionary attribute values, from ItemBean to ProductBean, and will enable rolling down of descriptive attributes values from ProductBean to ItemBean. Please refer to Product grouping.
Example
- WC_installdir/bin
- WCDE_installdir\bin
di-preprocess.bat full-path -instance instance_name -dbuser dbuser -dbuserpwd dbuserpwd
[-fullbuild true | false] [-localename localename] [-onelevel true | false] [-multithread true | false] [-workspace workspaceId] [-dbURL dbURL] [-skipDeltaNoEntry skipDeltaNoEntry] [-passwordFile passwordFile] [-nonLangTables nonLangTables] [-langTables langTables] [-publishedOnly true | false] [-deepUnpublish true | false] [-deepSequence true | false] [-dropTempTable true | false] [-propFile propFile] [-force true | false] [-grouping true | false]
di-preprocess.sh full-path -instance instance_name -dbuser dbuser -dbuserpwd dbuserpwd
[-fullbuild true | false] [-localename localename] [-onelevel true | false] [-multithread true | false] [-workspace workspaceId] [-dbURL dbURL] [-skipDeltaNoEntry skipDeltaNoEntry] [-passwordFile passwordFile] [-nonLangTables nonLangTables] [-langTables langTables] [-publishedOnly true | false] [-deepUnpublish true | false] [-deepSequence true | false] [-dropTempTable true | false] [-propFile propFile]
-masterCatalogId masterCatalogId
[-fullbuild true | false] [-localename localename] [-onelevel true | false] [-multithread true | false] [-dbURL dbURL] [-skipDeltaNoEntry skipDeltaNoEntry] [-passwordFile passwordFile] [-nonLangTables nonLangTables] [-langTables langTables] [-publishedOnly true | false] [-deepUnpublish true | false] [-deepSequence true | false]
"Program exiting with exit code: 0. Data import preprocessing completed successfully with no errors."Also, inspect the following file for errors:
- WCDE_installdir\logs\wc-dataimport-preprocess.log
- WC_installdir\logs\wc-dataimport-preprocess.log
INFO
to FINEST
in the following file: - WCDE_installdir\workspace\WC\xml\config\dataimport\logging.properties
- WC_installdir/instances/instance_name/xml/config/dataimport/logging.properties
- WC_instance_root/xml/config/dataimport/logging.properties
# Default global logging level, INFO
com.ibm.commerce.level=FINEST