Jegan, It looks like the problem is that your zipcode type can't be a String. An empty string isn't a valid value for int. You probably want to use null or string for that field.
rb On Mon, Mar 21, 2016 at 7:42 PM, Jegan <[email protected]> wrote: > Hi All, > > I am using avro file format to load the data in to hive and source system > is Teradata. In the source i have a both NULL and empty string. But when > it landed in the hive its storing both as NULL only. For example > > { > "type" : "record", > "name" : "Personal", > "fields" : [ { > "name" : "Id", > "type" : [ "null", "int" ] > }, { > "name" : "name", > "type" : [ "null", "string" ] > }, { > "name" : "age", > "type" : [ "null", "int" ] > }, { > "name" : "zipcode", > "type" : [ "null", "int" ] --> have tried as "type" :int, > "default" : "" > }] > } > > Since integer value is empty in source, by above one comes as null as > defined i tried give "type" : int as well and comes as NULL. > > Is there any way where i can get the empty string as it is in source. > Because in my landing hive table should contain both NULL and emptystring > and it has a different meaning for us . Your help would be appreciable. > > Thank you > > Regards, > Jegan > -- Ryan Blue Software Engineer Netflix
