Support Questions
Find answers, ask questions, and share your expertise

converting extended schema xml to avro


Use case Description:

We are receiving the xml from the source and the expected xmls per day is around 1lakh. we thought is merge all the xmls of a day and convert to avro.

sample data: extended schema xml xsd:

<?xml version="1.0"?>

<xs:schema xmlns:xs="">

<xs:element name="employee" type="fullpersoninfo"/>

<xs:complexType name="personinfo">


<xs:element name="firstname" type="xs:string"/>

<xs:element name="lastname" type="xs:string"/>

</xs:sequence> </xs:complexType>

<xs:complexType name="fullpersoninfo">


<xs:extension base="personinfo">


<xs:element name="address" type="xs:string"/>

<xs:element name="city" type="xs:string"/>

<xs:element name="country" type="xs:string"/>






Issue: i have used databricks jar to convert xml to avro it worked for simple xml, but it didnt work for schema extended xml. Is there any workaround to convert this type of xml to avro


Re: converting extended schema xml to avro


also another issue we have :

we need to get back the xmls from the avro, whenever we required.

Is there any solution for this.Please let me know.

Thanks in Advance.

Re: converting extended schema xml to avro


Last week I wrote a version of my XML2CSV but for AVRO

It is still under improvement but you can check it out here

Git Repo xml2avro

Article XML2Avro NiFi processor