External Table in Hive - Location -
the below table returns no data while running select statement
create external table foo ( ) row format delimited fields terminated '\073' lines terminated '\n' location '/user/data/csv/2016/1/27/*/part-*';
i need hive point dynamic folder mapreduce job puts part file in folder , hive loads table.
is there way location made dynamic
/user/data/csv/*/*/*/*/part-*
or /user/data/csv/*
fine ?
(the same code works fine when created internal table , loaded file path - hence there no issues due formatting)
first of, table definition missing columns. second, external table location points folder, not particular files. hive consider files in folder data table.
if have data generated e.g. on daily basis external process should consider partitioning table date. need add new partition table when data available.
Comments
Post a Comment