如何使用Talend OS for Big Data将参数从tMongoDBInput传递到tRestClient

时间:2018-09-07 09:15:58

标签: mongodb talend rest-client

我正在使用Talend OS处理大数据,并从HP ALM中提取数据。一切正常。 这是我的工作流程,

tFileInputProperties-->tContextLoad-->tMongoDBConnection-->tLibraryLoad-->tJava-->tRestClient-->tExtractXMLField-->tXMLMap-->tMongoDBOutput

现在,我正尝试从mongoDB而不是属性文件组件中动态获取列详细信息,例如ALM URL,凭据,请求或缺陷,或测试列详细信息。

是否可以通过talend将值从mongoDBInput传递给tRestClient?

实际结果:

"string" : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
   <Entities TotalResults=\"518\">
   <Entity Type=\"defect\">
   <ChildrenCount>
   <Value>0</Value>
   </ChildrenCount>
   <Fields>
   <Field Name=\"detection-version\">
   <Value></Value>
   </Field>
   <Field Name=\"subject\"/>
   <Field Name=\"description\">
   <Value>&lt;html&gt;&lt;body&gt;\ndescription9483\n&lt;/body&gt;&lt;/html&gt;</Value>
   </Field>
   <Field Name=\"priority\">
   <Value></Value></Field>
   <Field Name=\"project\">
   <Value></Value></Field>
   <Field Name=\"last-modified\"><Value>2018-08-31 13:05:59</Value></Field>
   </Entity><singleElementCollection>false</singleElementCollection>
   </Entities>"

预期结果:

"_id" : ObjectId("596e69f9a2e6f23e28ba0d58"), 
    "summary" : "test duregesh", 
    "severity" : "2-Medium", 
    "priority" : "", 
    "status" : "", 
    "creation-time" : ISODate("2018-01-08T00:00:00.000+0000"), 
    "closing-date" : null, 
    "description" : "", 
    "owner" : "", 
    "id" : NumberInt(339)
}

0 个答案:

没有答案