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
  • WebSphere Commerce Developer WCDE_installdir/bin

SolarisLinuxAIXRun this utility as the non-root WebSphere Commerce user ID. Do not run this command as root.

cdfgenerator utility syntax diagram. See the list that is called Parameter values for the applicable parameters.

Utility command

The CDFGenerator utility has the following file name:

  • For IBM i OS operating systemSolarisLinuxAIX cm_cdfgen.sh
  • Windows cm_cdfgen.bat

Parameter values

-dbtype
This is the database type. Valid values include "DB2", "Oracle", "Cloudscape", "OS400", and "OS400Toolbox".
-dbname
  • Apache DerbyEnter the file path to the database.
  • DB2Name of the target database.
  • OracleEnter the database name using the following format: hostname: port: database_name
  • For IBM i OS operating systemEnter 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.
-dbuser
  • Apache DerbyDo not specify this parameter.
  • DB2Name of the user that is connecting to the database.
  • OracleName of the user that is connecting to the database.
  • For IBM i OS operating systemThis is usually the same as the instance user name.
-dbpw
  • Apache DerbyDo not specify this parameter.
  • Password for the user that is connecting to the database.
For IBM i OS operating systemDB2Oracle-schema
For IBM i OS operating systemDB2OracleOptional 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, IBM Digital Analytics will issue warnings and reject the additional duplicate records. You have three options:

  • Ignore the warnings from IBM Digital Analytics; the additional duplicate records will be rejected by IBM Digital Analytics automatically.
  • Remove the additional duplicate records manually from the CDF file before uploading.
  • Consult IBM Digital Analytics 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.

  • DB2cm_cdfgen.bat -dbtype DB2 -dbname mall -dbuser wcsuser -dbpw passw0rd -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv
  • Oraclecm_cdfgen.sh -dbtype Oracle -dbname localhost:1521:mall -dbuser wcsuser -dbpw passw0rd -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv
  • Apache Derbycm_cdfgen.bat -dbtype Cloudscape -dbname ..\db\mall -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv