Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala was not able to query hive table with column type date

Solved Go to solution
Highlighted

Impala was not able to query hive table with column type date

New Contributor

Hi,

 

I have successfully created a table in Hive by ingesting a CSV file, but I cannot query this table with Impala which does not recognize the column with the data type "date":

Create table elections (
  id string,
  name string,
  dt date)
    row format delimited 
    fields terminated by ','
    stored as textfile;

LOAD DATA LOCAL INPATH "/home/cloudera/datasets/vox/elections.csv" overwrite INTO TABLE elections ;

I was able to successfully query that table in hive. Below the result of describe within each query editor:

HIVE

deschive.png

 

IMPALA

descimpala.png

 

Would you be able to explain that difference ? I'm using Hive version 1.1.0 and Impala version 2.3.0

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Impala was not able to query hive table with column type date

Super Collaborator

Not sure this is the latest documentation for Impala but the Hive "Date" type is not supported in Impala.

Use TIMESTAMP instead for example.

 

Check "Impala supported data types" in google. (Sorry I can't paste the url I don't know why).

 

 

1 REPLY 1

Re: Impala was not able to query hive table with column type date

Super Collaborator

Not sure this is the latest documentation for Impala but the Hive "Date" type is not supported in Impala.

Use TIMESTAMP instead for example.

 

Check "Impala supported data types" in google. (Sorry I can't paste the url I don't know why).