The file has the data. I'm not sure what Hive is doing wrong.

owen@laptop> java -jar ../tools/target/orc-tools-1.5.0-SNAPSHOT-uber.jar
> data ~/Downloads/Country.orc
> Processing data file /Users/owen/Downloads/Country.orc [length: 392]
> {"Id":1,"Name":"Singapore"}
> {"Id":2,"Name":"Malaysia"}
> {"Id":3,"Name":"India"}
> {"Id":4,"Name":"Hong Kong"}
> {"Id":5,"Name":"Macau"}
> {"Id":6,"Name":"Thailand"}
> {"Id":7,"Name":"Indonesia"}
> {"Id":8,"Name":"Philippines"}
> {"Id":9,"Name":"Dubai"}
> {"Id":10,"Name":"Vietnam"}
>
> ________________________________________________________________________________________________________________________


 .. Owen

On Tue, Oct 24, 2017 at 11:11 PM, Oleg Ruchovets <oruchov...@gmail.com>
wrote:

> I am creating hive external table ORC (ORC file located on S3).
>
> *Command*
>
> CREATE EXTERNAL TABLE Table1 (Id INT, Name STRING) STORED AS ORC LOCATION 
> 's3://bucket_name'
>
> *After running the query*:
>
> Select * from Table1;
>
> *Result is*:
>
> +-------------------------------------+---------------------------------------+
> | Table1.id  | Table1.name  |
> +-------------------------------------+---------------------------------------+
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> | NULL                                | NULL                                  
> |
> +-------------------------------------+---------------------------------------+
>
> Interesting that the number of returned records 10 and it is correct but
> all records are NULL. What is wrong, why query returns only NULLs? I am
> using EMR instances on AWS. Should I configure/check to support ORC format
> for hive?
>
> ORC file attached
>

Reply via email to