0
votes

I have Created one Hive Managed table and the using hadoop commnad copying data at managed table location. after doing this, whenever i m doing select * from table its showing no data. I have also tried msck repair command.

    MSCK REPAIR TABLE table_name;

but still i am not able to see any data using select commadn i have check at managed table location files are available there but using select command i m not able to the data.

Can someone please guide me why i m not able to see data using select command. Note: my hive table is partitioned on month column.I have enable below properties before copying the data.

hive> set hive.exec.dynamic.partition=true; hive> set hive.exec.dynamic.partition.mode=nonstrict;

1
It` should work. How did you copied data, please provide details? check partition location (use show partitions table) If partition is already created, copying data to its location should work fine. If partitions are not created, you need repair tableleftjoin

1 Answers

0
votes

I would suggest you to check out the default file format, just type in Hive shell

set hive.default.fileformat;

and see the output. If it's not the same as the format of copied files, then you should indicate the corresponding format when creating the table, for instance

create table tbl as
select * from another table
stored as orc

Or you can set the different format before creating table, e.g.,

set hive.default.fileformat=orc;

Keep in mind, if your data format is textfile then you need to indicate the delimiter in create statement as well.