Ask Your Question

How to parse XML file using StreamSets?

asked 2019-05-14 23:42:05 -0500

Jeyakumar gravatar image

updated 2019-05-20 18:21:24 -0500

metadaddy gravatar image

I have a simple xml file that need to be parsed using StreamSets. Created a pipeline with Origin as directory and process component as XML Parser, destination as local directory.

The validation of the pipeline was successful and there is no output in the XML parser component,configured the delimiter element as xml element.

Please share /direct me what are the configuration parameters need to set for the successful parsing?

C:\fakepath\xmlparser.png C:\fakepath\xml.png

edit retag flag offensive close merge delete


Can you provide an example of the XML and the XML parser configuration?

metadaddy gravatar imagemetadaddy ( 2019-05-16 10:41:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-20 18:20:53 -0500

metadaddy gravatar image

You should parse the XML in the Directory origin rather than in a separate XML Parser processor.

image description

Set Data Format to XML, and Delimiter Element to msg:

image description

Now the origin will emit a record for each <msg> element in the input file:

image description

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-14 23:42:05 -0500

Seen: 503 times

Last updated: May 20 '19