<?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/148373#M110899</link>
    <description>&lt;P&gt;What are you using for your AVRO Schema?   If you specify that the field as timestamp.&lt;/P&gt;&lt;P&gt;&lt;A href="https://avro.apache.org/docs/1.8.0/spec.html#Timestamp+%28millisecond+precision%29" target="_blank"&gt;https://avro.apache.org/docs/1.8.0/spec.html#Timestamp+%28millisecond+precision%29&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-TimestampstimestampTimestamps" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-TimestampstimestampTimestamps&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you post an example JSON file, AVRO Schema, data provenance of the run, Hive DDL&lt;/P&gt;&lt;P&gt;Standard Format "&lt;CODE&gt;YYYY-MM-DD HH:MM:SS.fffffffff&lt;/CODE&gt;"&lt;/P&gt;&lt;P&gt;For the schema, copy the inferred one from a data provenance run and then change the type from string to timestamp and save that schema and use that for the next run.&lt;/P&gt;&lt;P&gt;If there's empty strings or null in the first 20 records, I am thinking you will get String as a type.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 01:56:09 GMT</pubDate>
    <dc:creator>TimothySpann</dc:creator>
    <dc:date>2017-01-27T01:56:09Z</dc:date>
  </channel>
</rss>

