You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "Valluri, Sathish" <sa...@emc.com> on 2014/03/06 15:12:15 UTC

Hive unwanted location directory

We are creating external table in Hive and if the location path is not present in the HDFS say /testdata(as shown below), Hive is creating the '/testdata' dummy folder.

Is there any option in hive or any way to stop creating dummy directories if the location folder not exists.

Our use case needs many temporary tables needs to be created dynamically and we are creating many unwanted dummy directories if the data not present on the HDFS.



CREATE EXTERNAL TABLE testTable ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' WITH SERDEPROPERTIES ('avro.schema.literal'='{ <schema json literal>') STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' LOCATION '/testdata/';



Regards

Sathish Valluri