Configure your Lookup Manager to use data from CSV files and database

Most telecommunication projects store history and master data in a database, but the required business logic uses only a subset of the data. Because Streams processing requests look up information for every tuple that passes the business logic composites, a huge performance load is put on the system and database to handle database queries continuously during file processing. You should create a lookup repository for this subset of data in shared memory, because the system rarely updates this data (for example, once a day).

Here the application control composite sends the command request to the ByPassCheck operator to check the type of source that is defined in the command type attribute. If files are the source, the composite forwards the tuples to the command splitter composite. If a database is the source, the database status decides where the command request is forwarded to by using the Switch operator, which the DBStatusChecker operator triggers.


Lookup Manager application – CSV files and database as input

Before you begin

As the lookup repository uses CSV files and a database as the data source, this use case requires an installed and configured database.

About this task

Configure the Lookup Manager application to use a database as input.

Procedure

  1. In the file <PathToYourApplication>/config/config.cfg, find the lm.file parameter
  2. Enable CSV file input by setting the parameter to on as follows: lm.file=on

  3. In the file <PathToYourApplication>/config/config.cfg, find the lm.db parameter

  4. Enable database input by setting the parameter to on as follows: lm.db=on

  5. In the file <PathToYourApplication>/config/config.cfg, find the lm.db.vendor parameter

  6. To use the DB2 database, set the parameter as follows: lm.db.vendor=DB2

  7. In the file <PathToYourApplication>/config/config.cfg, find the lm.db.connectionName parameter

  8. To use one of the connections that are defined in connections.xml, set the parameter to the wanted connection name, for example: lm.db.connectionName=SAMPLE

  9. In the file <PathToYourApplication>/config/config.cfg, find the lm.db.name parameter

  10. To specify the data source name (DSN) of the target database, set the parameter to the wanted value, for example: lm.db.name=DBName

  11. In the file <PathToYourApplication>/config/config.cfg, find the lm.db.user parameter

  12. To define the database user, set the parameter to the wanted value, for example: lm.db.user=dbUser

  13. In the file <PathToYourApplication>/config/config.cfg, find the lm.db.password parameter

  14. To set the database name, set the parameter to the wanted value, for example: lm.db.password=dbUserPassword

  15. Open the <PathToYourApplication>/LookupMgrCustomizing.xml configuration file for editing

  16. Define your repository segment schemas

  17. When you finished adapting the configuration files, compile your Lookup Manager to create an application that uses a database as input

CAUTION: If the parameters lm.db.name, lm.db.user, and lm.db.password are provided as compile-time parameters, their values are contained in the SPL files that are compiled from the mixed-mode SPLMM files. You can provide all database access information as submission-time parameters only, so you do not have to recompile your application whenever your database credentials change.