CDFGenerator utility
For proper product and content classification, IBM Digital Analytics, formerly known as Coremetrics Analytics requires a Category Definition File (CDF). When you run the CDFGenerator utility, it generates a CSV file in the IBM Digital Analytics defined CDF format. The CDFGenerator is the command-line utility that generates the product data as a CSV file.
The utility is found at the following location:
- WC_installdir/bin
WCDE_installdir/bin
Run this utility as the non-root WebSphere Commerce user ID. Do not
run this command as root.
Utility command
The CDFGenerator utility has the following file name:
cm_cdfgen.sh
cm_cdfgen.bat
Parameter values
- -dbtype
- This is the database type. Valid values include "DB2", "Oracle", "Cloudscape", "OS400", and "OS400Toolbox".
- -dbname
Enter the file path to the database.
Name of the target database.
Enter the database name using the following format: hostname: port: database_name
Enter the following:
- If the -dbtype parameter is
DB2/OS400
, specify the name of the database on the staging server, as displayed in the relational database directory. - If the -dbtype parameter is
DB2/OS400ToolBox
, specify the host name of the server on which the production-ready data resides.
- If the -dbtype parameter is
- -dbuser
Do not specify this parameter.
Name of the user that is connecting to the database.
Name of the user that is connecting to the database.
This is usually the same as the instance user name.
- -dbpw
Do not specify this parameter.
- Password for the user that is connecting to the database.
-schema
Optional schema name to use. If omitted, the dbuser parameter is used for this value.
- -clientid
- The client ID assigned by IBM Digital Analytics.
- -langid
- The ID of the language to use (from the LANGUAGE_ID column in the LANGUAGE table).
- -catalogid
- The ID of the catalog to use (from the CATALOG_ID column in the CATALOG table).Note: If the catalogid value you specify is for a sales catalog, there might be more than one record in the CDF file with the same category ID. In a sales catalog, a unique category ID can have multiple parent categories, as shown in the last two lines of this CDF file excerpt:
99999999,101,MENS, 99999999,102,SALE, 99999999,123,MENS SALE,101 99999999,123,MENS SALE,102
In the CDF file, however, a unique category ID can have only one parent category. When you upload a CDF file that contains records with duplicate category IDs, will issue warnings and reject the additional duplicate records. You have three options:
- Ignore the warnings from ; the additional duplicate records will be rejected by automatically.
- Remove the additional duplicate records manually from the CDF file before uploading.
- Consult for other implementation alternatives.
- -output
- Name of the file in which to save the output. You can specify either a full path, or a relative path by using this parameter if you would like to save the file to a different directory.
Example
The following example command generates a CDF file to send to IBM Digital Analytics.
cm_cdfgen.bat -dbtype DB2 -dbname mall -dbuser wcsuser -dbpw passw0rd -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv
cm_cdfgen.sh -dbtype Oracle -dbname localhost:1521:mall -dbuser wcsuser -dbpw passw0rd -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv
cm_cdfgen.bat -dbtype Cloudscape -dbname ..\db\mall -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv