对象到csv转换dataweave组件mule

时间:2015-09-18 18:23:17

标签: csv mule mule-studio dataweave

我对dataWeave的输入:

收集(即'订单'对象列表)

    1st Order Object
    ----SampleObject1    (SampleObject is also a List of Objects that is getting repeated)
          --- SampleValue1    (some 'String' attribute of 'Order' object)
          --- SampleValue2    
    ---SampleObject2
          --- SampleValue3    (some 'String' attribute of 'Order' object)
          --- SampleValue4     .
    ------SampleObject3
        --- SampleValue5     .
        --- SampleValue6
    ------SampleObject4
         --- SampleValue7
          --- SampleValue8

2nd Order Object
    ----SampleObject1    (SampleObject is also a List of Objects that is getting repeated)
          --- SampleValue1    (some 'String' attribute of 'Order' object)
          --- SampleValue2    
    ---SampleObject2
          --- SampleValue3    (some 'String' attribute of 'Order' object)
          --- SampleValue4     .
    ------SampleObject3
        --- SampleValue5     .
        --- SampleValue6
    ------SampleObject4
         --- SampleValue7
          --- SampleValue8

对于每个订单'在集合中的对象,我需要一个CSV记录。

OutputCSV:

SampleValue1      SampleValue3    SampleValue5 .....   (For 1st'Order' object)
SampleValue1      SampleValue3    SampleValue5 ....   (For 2st'Order' object)
SampleValue1      SampleValue3    SampleValue5 .....  (For 3rd'Order' object)
.
.
.
.

我需要以下输出。我在 DataWeave 组件中尝试了多种组合。但无法解决它。我面临的问题是,我需要每个对象的CSV记录。但我得到的是每个' SampleValue'的记录。请帮我解决这个问题。在此先感谢!!

0 个答案:

没有答案