<?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 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/148372#M110898</link>
    <description>&lt;P&gt;Hi All, 
What is the best approach to convert a JSON to AVRO preserving the source datatypes. 
My source JSON has a field with timestamp (value would look like 2017-01-26T00:00:00-05:00)  which I need to eventually insert to a hive table with column type timestamp.  
When I infer the schema, I get String for the timestamp field. Is there some pre-formatting that I can do on the timestamp field so that it gets inferred as timestamp field. 
Current flow is as below - 
JSON&amp;gt;&amp;gt;AVRO(infer/manually add schema)&amp;gt;&amp;gt;Streaming Insert to hive&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 01:37:10 GMT</pubDate>
    <dc:creator>arunak</dc:creator>
    <dc:date>2017-01-27T01:37:10Z</dc:date>
  </channel>
</rss>

