Talend tBufferInput and tBufferOutput

Talend tBufferInput 有助于检索 tBufferOutput 缓冲的数据或记录。而 Talend tBufferOutput 将数据收集或存储在缓冲区中,以便其他组件(如 tBufferInput 或 Web 服务)可以访问这些数据。我们通常使用 tBufferOutput 概念通过 Web 服务将数据导出到 Web 应用程序。第二个场景是将数据从一个作业(父作业)传递到另一个作业(子作业)。

在此示例中,我们使用 tBufferOutput 将数据存储在缓冲区中。然后,我们使用 tBufferInput 访问相同的数据。

Talend tBufferInput 和 tBufferOutput 示例

为了演示 Talend tBufferInput 和 tBufferOutput,我们使用了 tDBInput 数据。在 tDBInput 数据中,我们从存储库中选择了客户表元数据。

tDbInput for two database inputs

接下来,我们添加了 tBufferOutput 并将其连接到 tDBInput。在这里,tBufferOutput 将在客户表中缓冲数据。从下面的 tBufferOutput 可以看到,它没有需要配置的属性;您需要做的就是检查架构。

Add Talend tBufferInput and tBufferOutput to Workflow

请点击“编辑架构”按钮,并检查“主输入”和“缓冲区输出”列。如果找不到这些列,请手动添加它们或点击“同步列”按钮。

Edit Schema of the Talend tBufferInput and tBufferOutput

拖放 Talend tBufferInput 以获取缓冲数据。接下来,右键单击并选择“tDBInput 触发器”,然后选择“On Subjob OK”触发器。

Talend tBufferInput and tBufferOutput 4

默认情况下,Talend tBufferInput 没有列,因此请点击“编辑架构”按钮并添加列。或者,从存储库中选择元数据(如果存在)。

Checkmark the required Columns

接下来,我们使用 Talend tLogRow 来显示缓冲数据。

Check the Components Tab to view output in Table

让我们运行这个 Talend tBufferInput 和 tBufferOutput 作业。

Run the Talend tBufferInput and tBufferOutput Job

您可以看到上面缓冲区输入和输出图像中的输出。