hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Stamminger <johannes.stammin...@airbus.com>
Subject Re: Create table from orc file
Date Thu, 04 Aug 2016 12:58:31 GMT
Some progress: I could eliminate the error reported in a): the data file needs 
to be named 000000_0 and must be placed in a the directory denoted by the 
location given at table creation. This is what the error message is about? ;-)


Now the situation for a) is the same as for b):

Trying to fetch data by

select * from CFA1_Fan_Speed_DMC limit 1;

results in 

Error: java.io.IOException: java.io.IOException: ORC does not support type 
conversion from file type timestamp (1) to reader type 
struct<normalizedTime:timestamp,RAW:bigint,ENG:float> (1) (state=,code=0)



But if I create a comparable table within hive, things do work:

create table x(y struct<a:timestamp,b:bigint,c:float>);

insert into x select named_struct('a', current_timestamp, 'b', bigint(42), 
'c', float(4.2)) from dummy limit 1;

select * from x;
+-------------------------------------------------+--+
|                       x.y                       |
+-------------------------------------------------+--+
| {"a":"2016-08-04 14:49:01.636","b":42,"c":4.2}  |
+-------------------------------------------------+--+



The tables look similar:

describe CFA1_Fan_Speed_DMC;
+-----------+--------------------------------------------------------
+----------+--+
| col_name  |                       data_type                        | comment  
|
+-----------+--------------------------------------------------------
+----------+--+
| record    | struct<normalizedTime:timestamp,RAW:bigint,ENG:float>  |          
|
+-----------+--------------------------------------------------------
+----------+--+

describe x;
+-----------+---------------------------------------+----------+--+
| col_name  |               data_type               | comment  |
+-----------+---------------------------------------+----------+--+
| y         | struct<a:timestamp,b:bigint,c:float>  |          |
+-----------+---------------------------------------+----------+--+



So does anybody have an idea what might be wrong with my external table 
access? Anything that I could give a try?

This email (including any attachments) may contain confidential and/or privileged information
or information otherwise protected from disclosure. If you are not the intended recipient,
please notify the sender immediately, do not copy this message or any attachments and do not
use it for any purpose or disclose its content to any person, but delete this message and
any attachments from your system. Astrium and Airbus Group companies disclaim any and all
liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------
Airbus DS GmbH 
Vorsitzender des Aufsichtsrates: Bernhard Gerwert 
Geschäftsführung: Evert Dudok (Vorsitzender), Dr. Lars Immisch, Dr. Michael Menking, Dr.
Johannes von Thadden 
Sitz der Gesellschaft: München - Registergericht: Amtsgericht München, HRB Nr. 107 647 
Ust. Ident. Nr. /VAT reg. no. DE167015356
Mime
View raw message