Adding a database mapping input

Before you start:

Before you use any mappings that you create, ensure that any databases that you have defined are registered with ODBC correctly on your computer.

There are two ways to add a database mapping input (source) from the Resource Navigator view, depending on whether you are adding the database to the workspace for the first time, or the database has been imported previously and is already in the workspace.

If you cannot import the database definition, ask your database administrator to export the database schema files for you to use.

Importing database schema files using the Data perspective

You can also import database schema files using the Data perspective.

  1. Use the Data perspective to connect to the database.
  2. In the DB Servers view of the Data perspective, expand the database connection that you have created to display the database table.
  3. Right-click the database table and click Import to folder.
  4. Provide the name of a folder that exists in the message flow project.
  5. Return to the Broker Application Development perspective and reopen the mapping file in the Message Flow Mapping editor.
  6. Right-click anywhere in the white space of the Source pane and click Add RDB Table Mapping Input.
  7. Click Add database table schemas from workspace and select the appropriate table from the list.

Database table names

By default in mappings, database table names are identified by the broker default schema and are in the format:
Database.table_name.
However, if you define a broker schema for your application and define tables within the broker schema, prefix the table names with the broker schema name to produce the following format:
Database.schema_name.table_name.
To do this:
  1. Right-click the database table in the Source pane and click Set RDB Schema Name.
  2. Select one of the three options:
    • Use default runtime schema for this data source produces the format:
      Database.table_name.
    • Use schema name in table definition produces the format:
      Database.schema_name.table_name
      where schema name is obtained from the database table .xmi file.
    • Use name specified produces the format:
      Database.user_specified_schema_name.table_name.
  3. Click OK to save your changes.

Defining the database schema name for an individual table, as described above, overrides the global definition in the Preferences dialog.

Note: Do not rename the .tblxmi file, or you will need to re-map everything.
Related reference
Mappings