如何在 Dataweave 中执行相当于 SQL 连接的操作?我基本上是在执行查找。我在流变量中有 CSV 数据和 JSON 数据。我可以同时使用它们,但我不知道如何连接它们。假设 CSV 有两列:
Name,ExternalId
Foo,1
Bar,2
Baz,2
JSON数据是:
{
ExternalEntities: [
{ "Id": 1, "Name": "One", "Description": "Thing One" }
, { "Id": 2, "Name": "Two", "Description": "Thing Two" }
]
}
最后,我想要一个List<Hashmap>
带有以下内容的(为方便起见,此处以 JSON 格式表示。)
[
{ "Name": "Foo", "ExternalName": "One", "ExternalDescription": "Thing One" }
, { "Name": "Bar", "ExternalName": "Two", "ExternalDescription": "Thing Two" }
, { "Name": "Baz", "ExternalName": "Two", "ExternalDescription": "Thing Two" }
]