简体   繁体   English

Mirth 中的数据库到数据库复制

[英]Database to Database Duplication in Mirth

I am new to Mirth COnnect software.我是 Mirth COnnect 软件的新手。 Will somebody guide me how can i populate my destination database.有人会指导我如何填充目标数据库。 I had successfully setup Oracle Database as Source Channel and Mysql as Destination.我已成功将 Oracle 数据库设置为源通道,将 Mysql 设置为目标。 But in Destination channel beside providing the basic information i failed to understand how to make Mirth do the required task.但是在目的地频道中,除了提供基本信息之外,我无法理解如何让 Mirth 完成所需的任务。

Thanks谢谢

You're asking a very broad question.你问的是一个非常广泛的问题。 It seems like you need a tutorial about Mirth Connect rather than a specific question.看起来您需要有关 Mirth Connect 的教程而不是特定问题。 I'll try to answer it here anyway.无论如何,我会在这里尝试回答。

First review the tutorials for Mirth Connect at the Mirth Connect Wiki .首先查看Mirth Connect Wiki的 Mirth Connect教程。 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您需要学习三件事: 1. 如何从 DB 读取 1. 如何将源消息中的变量映射到映射变量 1. 如何写入 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.您的源连接器将是一个数据库读取器,它向 Oracle 查询您需要的数据。 This would run a SELECT statement with an optional UPDATE statement which runs after the data is processed.这将运行带有可选UPDATE语句的SELECT语句,该语句在处理数据后运行。
  2. Your destination will be a Database Writer that runs INSERT or UPDATE statements against MySQL您的目标将是一个数据库编写器,它针对 MySQL 运行INSERTUPDATE语句
  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.如果您设置源连接器并查看消息视图,您将看到 Mirth Connect 用于数据库读取操作的 XML 表示。 Copy this message.复制此消息。
  4. Paste that message into the template for the destination transformer for your MySQL step.将该消息粘贴到 MySQL 步骤的目标转换器的模板中。 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.您应该几乎总是将它们映射为channelMap变量。
  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.从源读取器中提取数据以映射变量后,您现在可以在数据库编写器模板中使用这些变量来使用要写入的实际数据填充目标连接器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM