- While doing conversion of xml file to csv struck with the output.
Output of the flowfile in convertrecord - expecting output with comma separated values.
- Sample Input xml is.
<root namespace="namespace_value">
<xmlHeader attr1="9.093" attr2="ralg">
<tag1 attr3="ral2"/>
<tag2 attr4="2024-01-02"/>
</xmlHeader>
<Data>
<oneelement/>
<tag3 att5="attr5_value">
<tag4 attr6="attr6_value" attr7="attr7_value"/>
<tag5 attr8="attr8_value"/>
<tag6>tag6_value</tag6>
<tag7 attr9="attr9_value">
<tag8>tag8_value</tag8>
</tag7>
</tag3>
</Data>
<Data>
<oneelement/>
<tag3 att5="attr5_value">
<tag4 attr6="attr6_value" attr7="attr7_value"/>
<tag5 attr8="attr8_value"/>
<tag6>tag6_value</tag6>
<tag7 attr9="attr9_value">
<tag8>tag8_value</tag8>
</tag7>
</tag3>
</Data>
<tag9>
<tag10 attr10="attr10_value"/>
</tag9>
</root>
- Convertion of XML to CSV in NiFi doesn’t work.
- The version of NiFi working on is 1.27. Where convertRecord processor is used. xmlReader and csvRecordSetWriter as controlservice are used, in which infer schema.
- ALso tried with Avro schema with proper avro format, still getting the same error.
Any quick help is much appreciated.
New contributor
Viswa1980 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.