How to map an external database table to a class

Summary

Using the Connector and Metadata Accelerator, you can create a class that is mapped to an external database table, and properties for selected columns from that table. You can then create a connect activity using Obj-* methods to interact with the contents of the database table.

In this example, a connection is created to a product inventory database.

 

Suggested Approach

To map a class to an external database table:

  1. If it does not exist already, create a Database Name (Data-Admin-DB-Name) record for the database to which you will connect.


  2. Start the Connector and Metadata Accelerator by selecting > Integration > Overview. Click the Connector and Metadata Accelerator link.

  3. On the first page of the accelerator, select the SQL Metadata Type and the Base Class for the generated class, properties, and model to be built on. The Activity Class must be present, but will not be used. Click Next>>.


  4. Select the Database Name created in step 1, and a Table Name from that database. Click Next>>.


  5. Select the columns you wish to create properties for. Select the Generate Data Model only option to generate only the class, properties, and database table (Data-Admin-DB-Table) record. Click Next>>.


  6. Review the rules to be created and click Finish.

  7. The wizard creates the class and properties. The class name is a combination of the Base Class value from step 3 and the Table Name value from step 4 (Ecorp-FW-ESupply-Int-Products in this example).

    You can now create an activity to interact with the database table using Obj-* methods.

66% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.