- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Convert Json to Avro processor -- Failed to Parse Record Schema
- Labels:
-
Cloudera DataFlow (CDF)
Created ‎02-11-2017 01:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Friends,
Needed a help here.
I have picked up one of the xmls lying in the trafficLocs_data_for_simulator.zip.
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.
I am facing issue while configuring ConvertJSONToAvro processor.
I have used the Record Schema as mentioned below -
{ "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" }] }
I am getting red alert symbol mentioning it as Failed to Parse Record Schema.
Any pointers will help.
Thanks,
Ankur K
Created ‎02-12-2017 04:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎06-29-2018 08:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @rajat puchnanda
First I would recommend extracting the attributes from JSON using EvaluateJSONPath processor, then utilize AttributesToCSV processor to represent the FlowFile attributes as CSV format.
For seeing how to use evaluateJSONPath processor, check out this part of the tutorial series:
https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/5/
AttributesToCSV processor is similar to AttributesToJSON processor, the following tutorial shows how to use AttributesToJSON, apply the similar idea to using AttributesToCSV processor:
https://hortonworks.com/tutorial/analyze-transit-patterns-with-apache-nifi/section/6/
For info on AttributesToCSV processor:
Created ‎06-29-2018 04:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any thoughts?

- « Previous
-
- 1
- 2
- Next »