Created 10-11-2017 12:54 PM
I have multiple BYTE data type date like "00-00-8D-AC" and in hive i have tried column data type with Varchar(50)/String but after loading the data into hive the output is coming as NULL.
Please provide your suggestion which data type is suitable in hive to accept BYTE data type.
Created 10-11-2017 02:17 PM
Not sure what is the final use case, but one way to do this is:
hive> CREATE TABLE foo (bar CHAR(8)); hive> insert into foo values ("00008DAC"); hive> select * from foo; OK 00008DAC
Created 11-08-2017 12:47 PM
i don't want to change the values, The data is like "00-00-8D-AC", "00-01-8D-AK". so in this case which data type will help.
Created 11-08-2017 12:59 PM
You can use approach suggested by @Slim assuming all the data is of fixed length. You can change it as below
hive> CREATE TABLE foo (bar CHAR(11)); hive> insert into foo values ("00-00-8D-AC"); hive> select * from foo; OK 00-00-8D-AC
Thanks,
Aditya