Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to load data into Impala table stored as Kudu

Unable to load data into Impala table stored as Kudu

Explorer

I've created a table in Impala, stored as Kudu using Hue interface and trying to load data into the same from a csv file located on my HDFS folder.

 

However, the same is failing with the error message:

AnalysisException: LOAD DATA only supported for HDFS tables: bit_nnet.feature_matrix_100

 

The following is the CREATE TABLE command using:

create table if not exists bit_nnet.feature_matrix_100 (
	tan							string		not null,
	...
	primary key(tan)
)
partition by hash(tan) partitions 4
stored as kudu;

 

The following is the LOAD DATA command I am using:

load data inpath '/data/feature_matrix_100.csv' into table bit_nnet.feature_matrix_100;
3 REPLIES 3

Re: Unable to load data into Impala table stored as Kudu

Rising Star

As you saw in the error message, the "LOAD DATA" statement doesn't work for Kudu tables. Its documentation says as much.

 

I'm no Impala expert, but perhaps you can build an HDFS table around '/data/feature_matrix_100.csv' first, then SELECT that data into your Kudu table?

Re: Unable to load data into Impala table stored as Kudu

New Contributor

Did you have solve this problem? I encounterd this also. Could you share your experience?

Re: Unable to load data into Impala table stored as Kudu

Champion

@xuehan2216 @sdutta007 

 

You can perform CTAS - please refer the below reference 

CREATE TABLE new_table
PRIMARY KEY (ts, name)
PARTITION BY HASH(name) PARTITIONS 8
STORED AS KUDU
AS SELECT ts, name, value FROM old_table;
Don't have an account?
Coming from Hortonworks? Activate your account here