Defining a database source in the Map Designer

About this task

When you generate the type tree from a query, one of the types in the tree is a group representing the results from executing the query (for example, DBSelect). Select this type as the input card type when defining an input card for the executable map.

After you have defined the query and have generated the type tree, using a database as an input is very similar to using a file as input.

Using the Map Designer, specify Database as the GET > Source setting in the input card and supply the name of the MDQ file containing the definition of the database and query you want to use. see the following procedure and example.

To define a database as a data source:

Note: For more information about the map settings in this procedure, see the Map Designer documentation. This procedure specifically addresses database-specific parameters and settings.

Procedure

  1. In the Map Designer, when defining the settings for SourceRule, select Database as the GET > Source setting.
    The settings displayed in the Input Card dialog change to display the database adapter settings for a source.
  2. From the Card menu, select New.
    The Add Input Card dialog appears.
  3. For the CardName setting, enter a name for the card that describes the data object represented by this card.
  4. For the TypeTree setting, select the type tree containing the group type that defines the desired query.
  5. For the TypeName setting, select the group type from the type tree that defines the desired query (for example, DBSelect).
  6. Specify the FetchAs, WorkArea, FetchUnit, and all Backup settings as desired. For detailed information about these settings, see the Map Designer documentation. For database adapter-specific information about source settings, see the adapter-specific reference guide.
  7. For the GET > Source setting, select Database from the list.
    The SourceRule settings change to display the database adapter settings.
  8. Specify the values as desired in the adapter settings and click OK.