Member since
02-18-2016
6
Posts
3
Kudos Received
0
Solutions
02-18-2016
05:01 PM
2 Kudos
EDIT: I noticed that my REAL record schema was occasionally using integers as the name, and that violated the field name requirements for avro. So, the schema worked once I added a character before the integers. With NiFi's ConvertCSVToAvro, I have not found much guidance or example regarding the Record Schema Property. The documentation says to use an Avro schema, and it seems like a canonical Avro schema does not work. How do I set it up?? My efforts resulted in the caution symbol saying the message below, and the inability to actually use the processor. 'Record schema' validated against '<text of record schema>' Here are the properties as I set them... Record schema: {
"type": "record",
"name": "sensor_data",
"fields":
[
{ "name": "TimeStamp", "type": "string"},
{ "name": "Sensor", "type": "string"},
{ "name": "Measure", "type": "string"},
{ "name": "MeasureValue", "type": ["int","null"], "default":"null"},
{ "name": "AdditionalInfo", "type": ["string","null"], "default":"null"}
]
} CSV charset: utf8 CSV delimiter: | CSV quote character: " CSV escape character: \ Use CSV header line: false Lines to skip: 0 Here's some sample data: 2016-02-01T00:03:09Z|Temp_1|TempF|212|"WARNING|Overheating"
2016-02-01T00:05:03Z|Power|N/A||"STATE_CHANGE|Active"
2016-02-02T12:30:00Z|EmployeeCount|0|
... View more
Labels:
- Labels:
-
Apache NiFi