Download CSV for Impala

I am trying to upload a csv file to HDFS for Impala and not much time. Not sure what is wrong here, as I followed the guide. And csv is also on HDFS.

CREATE EXTERNAL TABLE gc_imp ( asd INT, full_name STRING, sd_fd_date STRING, ret INT, ftyu INT, qwerINT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY',' LOCATION '/user/hadoop/Gc_4'; 

The error I am getting. And I use Hue for this.

 > TExecuteStatementResp(status=TStatus(errorCode=None, > errorMessage='MetaException: hdfs://nameservice1/user/hadoop/Gc_4 is > not a directory or unable to create one', sqlState='HY000', > infoMessages=None, statusCode=3), operationHandle=None) 

Any guidance.

+4
source share
2 answers

/user/hadoop/Gc_4 should be a directory. Therefore, you need to create a directory, for example /user/hadoop/Gc_4 . Then you upload Gc_4 to it. Thus, the path to the file is /user/hadoop/Gc_4/Gc_4 . After that, you can use LOCATION to specify the path to the /user/hadoop/Gc_4 .

LOCATION must be a directory. This requirement is the same for Hive and Impala.

+5
source

This is not an answer, but a workaround.

In most cases, I saw that the loaded table, but the "status" was not successful. Also, if you saved the data using Hive, which gives you more control, then " Remember to PROHIBIT metadata in the Impala user interface." . Very important.

+1
source

Source: https://habr.com/ru/post/1498536/


All Articles