Hive partition table Specifies that location cannot load data solutions

Source: Internet
Author: User

The location of the table is specified but the select does not come out of the data, and the directory does exist on HDFs, as shown in the figure (I have a Level 2 partition)



Solution:

1.

Alter table Test6 Add 
partition (dt=20150422,pidid=60) location  '/data/dt=20150422/pidid=60 ';

A partition is added to a partition, the problem occurs because the table is not added to the partition, that is, no registration, because the data is the one I added before creating the table

Hive> show partitions test6;
OK Time
taken:0.65 seconds

2.

When the table specifies location, he just specifies the path of the table to a storage position, the original data he does not know, and then you add the data he knows, like a registration, your previous things did not register, he did not know that there is data.

 

The order is to register the data in the location, including the registered one.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.