PowerExchange for MongoDB JDBC User Guide for PowerCenter

PowerExchange for MongoDB JDBC User Guide for PowerCenter

MongoDB JDBC Mapping Example

MongoDB JDBC Mapping Example

You work for an organization that stores purchase order details, such as customer ID, item codes, and item quantity in a relational database like Oracle. You need to analyze purchase order details and move data from the Oracle database to MongoDB.
Create a mapping to read all the purchase records from Oracle, process the data, and write them to a MongoDB target.
Perform the following tasks to move data from Oracle to MongoDB:
  1. Import the Oracle source.
  2. Import a MongoDB target.
  3. Create a mapping with a Oracle source and a MongoDB target.
    The following image shows the example mapping in the Mapping Designer:
  4. Create a session and configure the session properties to load the data to the MongoDB target.
    The mapping contains the following objects:
    Source Definition
    The mapping source definition is a relational database object. In the
    Source Analyzer
    , import the Oracle source. The PowerCenter Integration Service reads the customer transaction details from the Oracle source.
    The following table describes the structure of the source definition called CUSTOMER_SRC:
    Field
    Data Type
    CUSTOMER_ID
    Varchar
    CUSTOMER_NAME
    Varchar
    ITEM_PURCHASED
    Varchar
    PRICE
    Float
    Mapping Target
    The mapping contains a MongoDB target definition.
    In the
    Target Designer
    , import a MongoDB target definition.
    The following table describes the structure of the target definition called CUSTOMER_TGT:
    Field
    Data Type
    CUSTOMER_ID
    Varchar
    _ID
    Varchar
    CUSTOMER_NAME
    Varchar
    ITEM_PURCHASED
    Varchar
    PRICE
    Double

0 COMMENTS

We’d like to hear from you!