Adding a query template file to extract non-attribute-dictionary attributes

The data extraction utility for IBM Product Recommendations, formerly known as Coremetrics Intelligent Offer invokes the Catalog services to retrieve service data objects for the CatalogEntry noun. When you make a service call, you must specify an access profile to define the amount of data that you want the server to return. The data extraction utility uses a default access profile, IBM_Admin_DataExtract. To return non-attribute-dictionary attributes, you must create an access profile in a query template file.

Before you begin

Review the following topics to learn more about query template files and access profiles:

You can also review the default query template file that the data extraction utility uses at the following path:
  • workspace_dir\WC\xml\config\com.ibm.commerce.catalog-fep\wc-query-CatalogEntry-admin-get-fep.tpl

About this task

The code for the custom query template file is provided for you in the steps of the procedure.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Create a custom Get query template file to extract the non-attribute-dictionary attributes:
    1. Create a workspace_dir\WC\xml\config\com.ibm.commerce.catalog-ext folder, if one does not exist.
    2. Right-click the com.ibm.commerce.catalog-ext folder.
    3. Click New > File.
    4. Name the custom query template file by using this syntax:
      wc-query-name_of_your_custom_template.tpl

      For example:

      wc-query-DataExtract-ABCcompany-NonAttrDict-get.tpl
    5. Click Finish.
  3. Paste the following query template file contents into the empty custom query template you created in the previous step:
    BEGIN_PROFILE
    	name=MyCompany_Admin_DataExtract_Nonattributedictionary_Attributes
    	extends = IBM_Admin_DataExtract
    	BEGIN_ENTITY
    		className=com.ibm.commerce.catalog.facade.server.services.dataaccess.graphbuilderservice.CatalogEntryGraphComposer
          		associated_sql_statement=IBM_CatalogEntryAttributeSchema
          		associated_sql_statement=IBM_AttributeAllowedValue
          		associated_sql_statement=IBM_CatalogEntryAttributeValue
          		associated_sql_statement=IBM_AttributeSchema
    	END_ENTITY
    END_PROFILE
    This query template file defines a new MyCompany_Admin_DataExtract_Nonattributedictionary_Attributes access profile that extends the default IBM_Admin_DataExtract access profile that is provided with the data extraction utility. The associated SQL statements that are defined in the file retrieve the non-attribute-dictionary attributes from the respective database tables. These associated SQL statements exist in the default query template file that the data extraction utility uses (wc-query-CatalogEntry-admin-get-fep.tpl), but the statements must be redefined in this custom query template file.
  4. Save and close the new query template file.
  5. Deploy the query template file to the WebSphere Application Server.