CDFGenerator utility
For proper product and content classification, 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.
Utility command
The CDFGenerator utility has the following file name:
- cm_cdfgen.sh
Parameter values
- -dbtype
- This is the database type, DB2 or Oracle.
- -dbname
- Name of the target database.
- -dbuser
Name of the user that is connecting to the database.
- -dbpw
- Password for the user that is connecting to the database.
- -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 examples 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.bat -dbtype oracle -dbname oracle_hostname:port:orcl -dbuser wcsuser -dbpw passw0rd -clientid 12345 -langid -1 -catalogid 10001 -output catalogCDF.csv