Data Transformation Engine Resource Adapter Reference Guide

Chapter 2 - Resource Adapters Use On the Command Line
Resource Adapters Reference Guide
27
not using an .mdq file
Use a command string that includes all of the database adapter commands
necessary to specify the desired settings for a map. An .mdq file is not used.
Command Line Examples
The following examples show various ways to use the database-specific adapter
commands on the command line.
Note The following examples for data sources and targets are for Oracle database
adapters using UNIX-specific syntax. For the Windows platform, adapter
commands are enclosed in single quotation marks. In addition, if you are running
the Command Server on a 32-bit Windows platform, the command is mercnt; not
mercator as shown.
Specify adapter commands using an .mdq file as follows:
mercator parts -ID1 "'-MDQ crib1.mdq -DBNAME Inventory
-QUERY 003A'"
This example shows a data source override. The data for input card 1 for the
parts map will come from the Inventory database using the query named
003A, all of which are defined in the crib1.mdq database/query file.
Override individual adapter commands as follows:
mercator XlatLgcy -ID3 "'-STMT SELECT CustID, Name,
Addr FROM Cust_Table'"
This example shows how a SELECT statement may be specified on the
command line. Note that the SQL statement consists of all of the input
following
–STMT until the next adapter command or until the single quotation
mark ending the adapter command is reached. In this example, the remaining
database information from the values compiled into the map file XlatLgcy is
used (for example, the .mdq file, database, user ID, and other non-overridden
values).
Specify and override the settings in an .mdq file:
mercator CvtApps -OD6 "'-MDQ /test/new.mdq -DBNAME Purchases
-USER John -PASSWORD sds34u -TABLE NewerTable -UPDATE'"
This example shows that the target for output card 6 in a map named CvtApps.
This map is first overridden by the database definition Purchases in
/test/new.mdq by using the Database/Query File adapter command (
-MDQ)
and the Database Name adapter command (
-DBNAME). The new.mdq
database/query file is first read to override the data target that is compiled into
the CvtApps map. Subsequently, the User ID adapter command (
-USER), the