Is it possible to instruct hive to get only specific files from a
partitioned external table?
For example I have the following directory structure
data/dd=2012-12-31/a1.txt
data/dd=2012-12-31/a2.txt
data/dd=2012-12-31/a3.txt
data/dd=2012-12-31/a4.txt
data/dd=2012-12-31/b1.txt
If all files are in same partition then they satisfy condition of same
value as partion column .
You cannot do with hive but can have one intermediate table and then to
move required files using glob pattern
---
Sent from Mobile , short and crisp.
On 07-Jan-2013 1:07 AM, Oded Poncz
only on the required partitions.
Hope this helps.
Regards
Bejoy KS
Sent from remote device, Please excuse typos
-Original Message-
From: Oded Poncz o...@ubimo.com
Date: Sun, 6 Jan 2013 16:07:26
To: user@hive.apache.org
Reply-To: user@hive.apache.org
Subject: External table
: External table with partitions
Hi Oded
If you have created the directories manually that would come visible to the
hive table only if the partitions/ sub dirs are added to the meta data using
'ALTER TABLE ... ADD PARTITION' .
Partitions are not retrieved implicitly into hive tabe even if you have
Met a problem that data in an external table didn't get read by hive.
Here's how the table was created and data loaded.
- Created an external table w/ a partition, pointing to an existing location
in hdfs as follows :
create external table order_external (item string, quantity int) partitioned
solved.
uh, thought that hive will by default look into the table folder in hdfs and
match sub-folders with partition column names to recognize partitions
automatically. But realized partition addition has to be done explicitly by
giving partition name and location. So, by doing alter table add