Setting up the database

The Graphical Data Mapping Loyalty Data Warehousing sample requires an external database for the message flow, which is updated by one of the graphical data maps whilst the transformation runs.

Before you can use the Graphical Data Mapping Loyalty Data Warehousing sample, you must do the following:

  1. Set up the Graphical Data Mapping Retail sample as the base. For more information, see the Graphical Data Mapping Retail sample.
  2. Set up the database in advance so that it can be accessed in the "Loyalty Data to Database" Mapping node.
  3. Have a JDBCProviders configurable service to resolve the data source name RETAILDB when creating the "Loyalty Data to Database" graphical data map, so that it is available to the database instance in the integration node when running the sample.
  4. Configure the integration node with a valid JDBC service identifier and a password to access the database.

Creating and populating the table

The data that the map updates is stored in one table, the LOYALTY table.

You must populate the LOYALTY table before running the sample.

  1. Create the table using the SQL createLoyaltyTables.sql script provided in the sample under the GraphicalDataMappingLoyaltySampleDatabase project. The createLoyaltyTables.sql script is under the Other Resources category in the Application. From a DB2 command prompt, change to the directory that contains the createLoyaltyTables.sql script, and run the following command:
    db2 -vf createLoyaltyTables.sql
  2. Populate the tables with data using the SQL script provided in the GraphicalDataMappingLoyaltySampleDatabase sample project. From the DB2 command prompt, change to the directory that contains the insertLoyaltyDbData.sql script, and run the following command:
    db2 -vf insertLoyaltyDbData.sql

Back to sample home