<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Convert Json to Avro processor -- Failed to Parse Record Schema in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171121#M133418</link>
    <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;Needed a help here.&lt;/P&gt;&lt;P&gt;I have picked up one of the xmls lying in the trafficLocs_data_for_simulator.zip. &lt;/P&gt;&lt;P&gt;My objective is to convert XML to Avro format.  The tutorials has shown us how to convert XML to JSON format by using AttributesToJSON processor. &lt;/P&gt;&lt;P&gt;I am facing issue while configuring ConvertJSONToAvro processor. &lt;/P&gt;&lt;P&gt;I have used the Record Schema as mentioned below - &lt;/P&gt;&lt;P&gt;{
     "type": "record",
     "name" : "first",
     "namespace" : "xml",  
     "fields" : [{"name" : "Direction_of_Travel", "type" : "string" },
       { "name" : "Latitude", "type" : "float" },
       { "name" : "Longitude", "type" : "float" },
       { "name" : "Vehicle_ID", "type" : "integer" },
       { "name" : "Vehicle_Speed"," type" : "integer" }]
} 
&lt;/P&gt;&lt;P&gt;I am getting red alert symbol mentioning it as Failed to Parse Record Schema. &lt;/P&gt;&lt;P&gt;Any pointers will help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ankur K&lt;/P&gt;</description>
    <pubDate>Sat, 11 Feb 2017 21:18:12 GMT</pubDate>
    <dc:creator>ankurkapoor_wor</dc:creator>
    <dc:date>2017-02-11T21:18:12Z</dc:date>
    <item>
      <title>Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171121#M133418</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;Needed a help here.&lt;/P&gt;&lt;P&gt;I have picked up one of the xmls lying in the trafficLocs_data_for_simulator.zip. &lt;/P&gt;&lt;P&gt;My objective is to convert XML to Avro format.  The tutorials has shown us how to convert XML to JSON format by using AttributesToJSON processor. &lt;/P&gt;&lt;P&gt;I am facing issue while configuring ConvertJSONToAvro processor. &lt;/P&gt;&lt;P&gt;I have used the Record Schema as mentioned below - &lt;/P&gt;&lt;P&gt;{
     "type": "record",
     "name" : "first",
     "namespace" : "xml",  
     "fields" : [{"name" : "Direction_of_Travel", "type" : "string" },
       { "name" : "Latitude", "type" : "float" },
       { "name" : "Longitude", "type" : "float" },
       { "name" : "Vehicle_ID", "type" : "integer" },
       { "name" : "Vehicle_Speed"," type" : "integer" }]
} 
&lt;/P&gt;&lt;P&gt;I am getting red alert symbol mentioning it as Failed to Parse Record Schema. &lt;/P&gt;&lt;P&gt;Any pointers will help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ankur K&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 21:18:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171121#M133418</guid>
      <dc:creator>ankurkapoor_wor</dc:creator>
      <dc:date>2017-02-11T21:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171122#M133419</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/15898/ankurkapoorwork.html" nodeid="15898"&gt;@Ankur Kapoor&lt;/A&gt;&lt;P&gt;In the last "type" after "Vehicle Speed", there is a space. Please remove that space and it will work.&lt;/P&gt;&lt;PRE&gt; { "name" : "Vehicle_Speed"," type" : "integer" } --&amp;gt; wrong

 { "name" : "Vehicle_Speed", "type" : "integer" } --&amp;gt; right&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Feb 2017 23:36:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171122#M133419</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2017-02-11T23:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171123#M133420</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Many thanks for the reply. I have removed space but it is still showing the same issue Failed to Parse Record Schema.&lt;/P&gt;&lt;P&gt;The Record schema is mentioned below -&lt;/P&gt;&lt;P&gt;{
     "type" : "record",
     "name" : "first",
     "namespace" : "xml",  
     "fields" : [{"name" : "Direction_of_Travel", "type" : "string" },
       { "name" : "Latitude", "type" : "float" },
       { "name" : "Longitude", "type" : "float" },
       { "name" : "Vehicle_ID", "type" : "integer" },
       { "name" : "Vehicle_Speed","type" : "integer" }]
} &lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 01:47:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171123#M133420</guid>
      <dc:creator>ankurkapoor_wor</dc:creator>
      <dc:date>2017-02-12T01:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171124#M133421</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15898/ankurkapoorwork.html" nodeid="15898"&gt;@Ankur Kapoor&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I used your record and it works. Do you have a inferavroschema before calling convertJsontoAvro? Look at my screen shot. My second screen shot shows details of convertjsontoavro processor details. Third screenshot shows details of InferAvroSchema details.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12310-screen-shot-2017-02-11-at-13434-pm.png"&gt;screen-shot-2017-02-11-at-13434-pm.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12307-screen-shot-2017-02-11-at-13242-pm.png"&gt;screen-shot-2017-02-11-at-13242-pm.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12308-screen-shot-2017-02-11-at-13302-pm.png"&gt;screen-shot-2017-02-11-at-13302-pm.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 03:35:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171124#M133421</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2017-02-12T03:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171125#M133422</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Many thanks for your reply.&lt;/P&gt;&lt;P&gt;I had actually tried this option of using infer avro schema before but did not work. I wanted to check whether you have used XML file as a source or CSV file. My requirement is to convert the XML file into Avro format.&lt;/P&gt;&lt;P&gt;If you see tutorials on Nifi , I had picked up one xml file lying in the zip - trafficLocs_data_for_simulator.zip.&lt;/P&gt;&lt;P&gt;I am attaching some snapshots  also warning message which is coming. Please have a look.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12352-1-entire-flow.gif"&gt;1-entire-flow.gif&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12353-2-getfile.gif"&gt;2-getfile.gif&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12354-4-evaluatexpath.gif"&gt;4-evaluatexpath.gif&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12355-7-inferavroschema.gif"&gt;7-inferavroschema.gif&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12356-warning-message.png"&gt;warning-message.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:52:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171125#M133422</guid>
      <dc:creator>ankurkapoor_wor</dc:creator>
      <dc:date>2017-02-12T07:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171126#M133423</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15898/ankurkapoorwork.html" nodeid="15898"&gt;@Ankur Kapoor&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just did the same thing and it still works. Where do you write your output of "AttributesToJson"? I am creating a new flow file because this gives me a clean json record.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12362-entireflow.png"&gt;entireflow.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12363-evaluate-xpath.png"&gt;evaluate-xpath.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12364-attributestojson.png"&gt;attributestojson.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12365-inferavroschema.png"&gt;inferavroschema.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12366-convertjsontoavro.png"&gt;convertjsontoavro.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can see the file being created on my machine.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 12:47:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171126#M133423</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2017-02-12T12:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171127#M133424</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15898/ankurkapoorwork.html" nodeid="15898"&gt;@Ankur Kapoor&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Also attaching the template of my workflow.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12367-hcc.xml"&gt;hcc.xml&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 12:48:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171127#M133424</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2017-02-12T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171128#M133425</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Many thanks brother. I am pleased to say it is working now. &lt;/P&gt;&lt;P&gt;You have really been helpful.&lt;/P&gt;&lt;P&gt;Now , I want to solve some bigger questions , the xml file lying in the zip - trafficLocs_data_for_simulator.zip was a small xml.&lt;/P&gt;&lt;P&gt;Hence we are able to define its structure in EvaluteXPath  , suppose we are having bigger xml&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/12368-xmls.zip"&gt;xmls.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;How we process these big xml's which really exist in the real life. Please advise.&lt;/P&gt;&lt;P&gt;Attached some xmls for your reference.&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 17:25:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171128#M133425</guid>
      <dc:creator>ankurkapoor_wor</dc:creator>
      <dc:date>2017-02-12T17:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171129#M133426</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Can you please tell me how to conver JSON to csv in nifi..?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 01:45:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171129#M133426</guid>
      <dc:creator>rajatpuchnanda1</dc:creator>
      <dc:date>2018-06-26T01:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171130#M133427</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3268/jmedel.html" nodeid="3268"&gt;@jmedel&lt;/A&gt;&lt;P&gt; Any thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 23:57:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171130#M133427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-29T23:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171131#M133428</link>
      <description>&lt;P&gt;Hey &lt;A rel="user" href="https://community.cloudera.com/users/84157/rajatpuchnanda15.html" nodeid="84157"&gt;@rajat puchnanda&lt;/A&gt;&lt;/P&gt;&lt;P&gt;First I would recommend extracting the attributes from JSON using EvaluateJSONPath processor, then utilize AttributesToCSV processor to represent the FlowFile attributes as CSV format. &lt;/P&gt;&lt;P&gt;For seeing how to use evaluateJSONPath processor, check out this part of the tutorial series:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/5/" target="_blank"&gt;https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/5/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;AttributesToCSV processor is similar to AttributesToJSON processor, the following tutorial shows how to use AttributesToJSON, apply the similar idea to using AttributesToCSV processor:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/6/" target="_blank"&gt;https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/6/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For info on AttributesToCSV processor:&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.7.0/org.apache.nifi.processors.standard.AttributesToCSV/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.7.0/org.apache.nifi.processors.standard.AttributesToCSV/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:46:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/171131#M133428</guid>
      <dc:creator>jmedel</dc:creator>
      <dc:date>2018-06-30T03:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Json to Avro processor -- Failed to Parse Record Schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/268590#M206286</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/39717"&gt;@ankurkapoor_wor&lt;/a&gt;&amp;nbsp;Hi, Even I am facing the same issue as&amp;nbsp;&lt;A href="https://community.cloudera.com/users/10969/mqureshi.html" rel="user" target="_blank"&gt;@mqureshi&lt;/A&gt;. I am trying to fetch data from SQL server in Avro fomat through NiFi and load it to Redshift through copy command. But the generated Avro file is&amp;nbsp;converting the date and timestamp datatypes to string because of which copy command is loading all NULL values in the target table. So I tried to follow your approach, In my case I'm using ExecuteSQLRecord processor to fetch the data from SQL server and writing it to json format and then trying to convert it to Avro format using ConvertJsonToAvro processor but then I am unable to parse Record Schema. Could you please help me also to resolve this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 17:39:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-Json-to-Avro-processor-Failed-to-Parse-Record-Schema/m-p/268590#M206286</guid>
      <dc:creator>bhide</dc:creator>
      <dc:date>2019-08-21T17:39:17Z</dc:date>
    </item>
  </channel>
</rss>

