hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tucker, Matt" <>
Subject RE: External table point of clarification
Date Mon, 12 Mar 2012 20:23:35 GMT
Hi Keith,

That's correct.  Any files that are in a directory that's referenced by Hive are assumed to
be in the same table.

You'll need to make a directory for each table and then load each CSV file into the appropriate

Matt Tucker

-----Original Message-----
From: Keith Wiley [] 
Sent: Monday, March 12, 2012 3:47 PM
Subject: External table point of clarification

It appears as if the syntax for creating an external table takes a column description and
a directory where the table (a .csv file) should be found.  Notably, it doesn't take the path
to the file, rather it takes the path to the directory containing the file.

...which means that if I have multiple .csv files, each a unique table with a unique column
description, it is not sufficient to put them in one hdfs directory, since the columns must
be described when creating the hive table.  Rather, each .csv file conforming to a unique
column description must be placed in its own separate hdfs directory, right?

Just this correct?  Can I not put a set of .csv files comprising multiple
tables of a heterogenous database in a single directory and then have hive build a set of
tables around those files?

Thank you.

Keith Wiley

"It's a fine line between meticulous and obsessive-compulsive and a slippery rope between
obsessive-compulsive and debilitatingly slow."
                                           --  Keith Wiley ________________________________________________________________________________

View raw message