Ask Your Question
1

XML_GENERATOR_05 - Record root field cannot be a List

asked 2018-08-31 12:12:45 -0500

deep gravatar image

updated 2018-08-31 13:01:56 -0500

metadaddy gravatar image

Hi All - New to StreamSets. Need help. I am pulling XML data from one stream (JMS) and posting the same XML data on to another stream (Kafka) using StreamSets. Some of the fields in XML have data and some are empty (just has the tags). StreamSets throws an error when I select the data format as XML for the two streams. It says,

XML_GENERATOR_05 - Record root field cannot be a List

Though what I am trying to achieve is straightforward, I am still having issues with it. Can you help me with it? Below is sample XML data which has three fields with data (OrderId, OrderType, OrderDate). But ParentOrderId, OrderClassCode, ReferenceField1, ReferenceField2, ReferenceField3 are empty. I have to send entire xml just like it is from one stream to another, including the empty fields. How can I do that on StreamSets?

<tXML>
   <Message>
       <Order>
           <OrderId>12345</OrderId>
           <OrderType>Like Order</OrderType>
            <OrderDate>8/30/18 02:28</OrderDate>
            <ParentOrderId/>
            <OrderClassCode/>
            <ReferenceField1/>
           <ReferenceField2/>
           <ReferenceField3/>
        </Order>
    </Message>
</tXML>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-08-31 13:31:33 -0500

metadaddy gravatar image

If you just want to pull the message from JMS and send it to Kafka unchanged, you can select Binary data format in both the JMS origin and the Kafka destination.

edit flag offensive delete link more

Comments

1

I was able to select the text as data format for both JMS origin and Kafka destination and add a specific symbol (ß) in JMS config. for Custom Delimiter to get it working. Thanks

deep gravatar imagedeep ( 2018-09-04 13:08:44 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-08-31 12:12:45 -0500

Seen: 26 times

Last updated: Aug 31