Overview of the Data Extract utility

The Data Extract utility is a command-line utility that you can use to extract data from the Commerce+ database into an output file.

You can run the utility in the staging and production environments, but you are recommended to run the utility in an environment that has the information that you need to extract. For example, the staging environment might not have inventory or pricing information for a catalog entry. In this case, run the utility on the production environment.

This utility uses the Data Load utility framework and follows a similar interaction process:
  1. The configured data reader for the utility reads the data that is to be extracted from the database and returns the data to the business object builder.
  2. The business object builder populates a business object that is based on the data that is passed from the data reader. The business object builder passes the object to the business object mediator.
  3. The business object mediator transforms the business object into a list of map objects that is then passed to the data writer.
  4. The data writer then generates the configured output file and writes the list of CSV or XML objects into the output file.
There are two methods for extracting data that you can use with the Data Extract utility, an SQL-based extraction and a business logic-based extraction. The extraction method that you must configure the utility to use depends on the type of data that you want to extract.
  • If you want to extract promotions and marketing, you must use the SQL-based extraction.
  • If you want to extract catalog data to generate Enterprise Product Report (EPR) data for use with IBM Product Recommendations, you must use the logic-based extraction.

SQL-based extraction

This SQL-based extraction uses a direct database connection and SQL statements to extract data. Unless you are extracting data for use with IBM Product Recommendations or are extracting data that cannot be directly retrieved from the database, you are recommended to use this SQL-based approach. This SQL-based extract process improves the performance and flexibility of the utility in comparison to the business logic-based extraction method.

The SQL-based process can also reduce the implementation cost for customizing the utility to extract data that is not supported for extracting with the utility by default. By default, the utility supports extracting the following types of data with the SQL-based extraction process:
  • Promotions
  • Marketing objects, such as activities. e-Marketing Spots, content, campaigns, attachments, and customer segments

Business logic-based extraction

This approach uses business logic to fetch the data, similar to the behavior of existing web service. The configured data reader class for the utility uses catalog web service to retrieve data in the catalog business object (noun) format. The business object builder class does not populate any data in this process. Instead, the builder class passes the noun objects from the data reader class to the business object mediator class. The mediator class is then used to extract the data from the business object to build a map object. The data writer then converts the map object into CSV formatted output files, such as EPCMF and ECDF files for use with .

This business logic approach is useful when data cannot be directly retrieved from the database. For example, when complicated business logic is needed to compute the data, such as for extracting pricing data that uses price rules. To extract this pricing data, logic is needed to apply the price rules before the catalog entry prices can be determined, extracted, and written to an output file. When complicated business logic is needed, you do not need to reimplement the logic that is used to load or create the data to support extracting the data.

This approach, however has a few disadvantages:
  • The approach can cause the performance of the extraction process to be slow. The logic-based services for retrieving data is intended to retrieve a single business object or a list of business objects. If any of the business objects are large, however, the performance can be slow.
  • Customizing the extraction process requires significant effort to retrieve custom data or data that is not supported for extracting by default. If you need to extract custom data or data that is not supported for extracting with the utility, you must implement your own custom services to extract the data.

For more information on Data Extraction, see Data extract and load utilty.

Best Practices

When you use the Data Extract utility, there are general configuration recommendations that you can use to ensure that you take advantage of the full capability of the utility. For more information, see Data Extract utility best practices.