Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


This articles explains the basics on how to use MongoDB in Stambia DI.

Please refer to this article to find all the necessary material.

 

Prerequisites:
  • Stambia DI Runtime S17.3.0 or higher
  • Stambia DI Designer S18.2.0 or higher

 

Metadata

Creation

Create a new MongoDB Metadata:

1.metadata

Configure the root node:

2.serverNode

Property Description
Name Alias/label of the Mongodb server.
MongoDB URL

MongoDB server URL.

mongodb://[<user>:<password>@]<host>:<port>

Some examples:

mongodb://localhost:27017

mongodb://myUser:myPassword@localhost:27017

MongoDB home

Path to the MongoDB server installation directory.

It is used by the templates importing data through the mongoimport utility.

 

Reverse

Each node of the MongoDB metadata offers the possibility to reverse its structure.

Simply right click on the desired node and choose: Actions > Reverse [All]

  • On the server node: All databases and collections are reversed
  • On a database node: All the collections of the database are reversed
  • On a collection: The collection is reversed

 

Manual configuration

Database

Add a database by right clicking on the server node and choosing New > Database.

Property Description
 Name  Alias/label of the database
 Database Physical Name

 Physical Name of the database.

It will be used during data and reverse operations.

You can reverse all the collections of the database with right click > Actions > Reverse.

 

Collection

Add a collection by right clicking on a database node and choosing New > Collection.

Property Description
 Name  Alias/label of the collection
 Collection Physical Name

 Physical Name of the collection.

It will be used during data and reverse operations.

You can then reverse the collection with right click > Actions > Reverse.

You can alternatively create the collection structure manually by adding its content with right click > New > [...].

 

MongoDB data Integration

MongoDB collections can be loaded from any database through the 'INTEGRATION Rdbms to MongoDB (crud)' template.

  1. Create a Mapping
  2. Drag and drop the target MongoDB collection and the source tables.
  3. Map your fields as usual.
  4. Set the 'MongoDB Operation' parameter to the wanted operation.

 

3.RDBMS To MongoDB

 

Note: Please refer to the template's internal documentation for more detailed information.

 

Read data from MongoDB

MongoDB collections can be accessed through the 'INTEGRATION Rdbms to MongoDB (crud)' template to load any database.

To read MongoDB data, you'll need to invoke it from a source to have a repetition key, like you would do for XML files or Web Services.

  1. Create a Mapping
  2. Drag and drop:
    • The source table that will invoke MongoDB
    • The MongoDB collection
    • The target table
  3. Map the root node of the MongoDB collection from the source
  4. Map your fields to the target table as usual
  5. Set the 'MongoDB Operation' parameter to the 'get' operation.

 

4.MongoDB To Rdbms

 

Tip: The source invoking MongoDB here is just used for the repetition key. We are using in our case a temporary in memory table to avoid using a 'real' table just for that. See this article to learn how to accomplish this.

 

Note: Please refer to the template's internal documentation for more detailed information.

 

 

Articles

Suggest a new Article!