<?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 Re: Best Practice - JSON to Avro, data type preserving in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Best-Practice-JSON-to-Avro-data-type-preserving/m-p/148375#M110901</link>
    <description>&lt;P&gt;My Sample JSON File is 

&lt;/P&gt;&lt;PRE&gt;{
    "timestamp": "2017-01-26T00:00:00-05:00",
    "c1": 73.0,
    "c2": 36.5,
    "c3": 43.8,
    "c4": 0.1,
    "c5": 75.4,
    "c6": 997.8,
    "c7": 0.5,
    "c8": 4.58,
    "c9": 43.8,
    "c10": 1.5,
    "c11": 40.6,
    "postal_code": "08863",
    "country": "us"
}&lt;/PRE&gt;
And the Avro schema inferred by NiFi is 

&lt;PRE&gt;{
    "type": "record",
    "name": "date",
    "fields": [
        {
            "name": "timestamp",
            "type": "string"
        },
        {
            "name": "c1",
            "type": "double",
            "doc": "Type inferred from '73'"
        },
        {
            "name": "c2",
            "type": "double",
            "doc": "Type inferred from '36.5'"
        },
        {
            "name": "c3",
            "type": "double",
            "doc": "Type inferred from '43.8'"
        },
        {
            "name": "c4",
            "type": "double",
            "doc": "Type inferred from '0'"
        },
        {
            "name": "c5",
            "type": "double",
            "doc": "Type inferred from '75.4'"
        },
        {
            "name": "c6",
            "type": "double",
            "doc": "Type inferred from '997.8'"
        },
        {
            "name": "c7",
            "type": "double",
            "doc": "Type inferred from '0'"
        },
        {
            "name": "c8",
            "type": "double",
            "doc": "Type inferred from '4.58'"
        },
        {
            "name": "c9",
            "type": "double",
            "doc": "Type inferred from '43.8'"
        },
        {
            "name": "c10",
            "type": "double",
            "doc": "Type inferred from '1.5'"
        },
        {
            "name": "c11",
            "type": "double",
            "doc": "Type inferred from '40.6'"
        },
        {
            "name": "postal_code",
            "type": "string",
            "doc": "Type inferred from '\"08863\"'"
        },
        {
            "name": "country",
            "type": "string",
            "doc": "Type inferred from '\"us\"'"
        }
    ]
}&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Jan 2017 02:31:18 GMT</pubDate>
    <dc:creator>arunak</dc:creator>
    <dc:date>2017-01-27T02:31:18Z</dc:date>
  </channel>
</rss>

