Hammad Moeen
Hammad Moeen

Reputation: 11

Database to Database Duplication in Mirth

I am new to Mirth COnnect software. Will somebody guide me how can i populate my destination database. I had successfully setup Oracle Database as Source Channel and Mysql as Destination. But in Destination channel beside providing the basic information i failed to understand how to make Mirth do the required task.

Thanks

Upvotes: 1

Views: 611

Answers (1)

Freiheit
Freiheit

Reputation: 8757

You're asking a very broad question. It seems like you need a tutorial about Mirth Connect rather than a specific question. I'll try to answer it here anyway.

First review the tutorials for Mirth Connect at the Mirth Connect Wiki. You will not find an exact example for your use case. You need to learn three things: 1. How to read from a DB 1. How to map variables from source messages to map variables 1. How to write to a DB

Review those examples and pick out the ones that cover the three items listed above.

You will need to create a channel that works like this:

  1. Your source connector will be a Database Reader which queries Oracle for the data you need. This would run a SELECT statement with an optional UPDATE statement which runs after the data is processed.
  2. Your destination will be a Database Writer that runs INSERT or UPDATE statements against MySQL
  3. The hard part is writing the mappings. If you set up your source connector and look at the message view you will see the XML representation Mirth Connect uses for database read operations. Copy this message.
  4. Paste that message into the template for the destination transformer for your MySQL step. You can now use the mapper to choose elements from that source message and map them to variables. You should almost always map them as channelMap variables.
  5. After you have pulled the data from your source reader to map variables you can now use those variables in the database writer template to populate the destination connector with the actual data to write.

Upvotes: 2

Related Questions