I'm trying to create an external table using Impala stored as Kudu, using the Hue interface and always getting an error for the line where I've mentioned "stored as kudu"
The following is the DDL which I'm trying to execute:
create external table if not exists feature_matrix_100 ( tan string, ..., primary key(tan) ) partition by hash(tan) partitions 4 row format delimited fields terminated by ',' location '/data/impala/external_table/feature_matrix_100' tblproperties( 'skip.header.line.count'='1', 'key1' = 'TAN' ) stored as kudu;
The exact error which I'm getting is:
AnalysisException: Syntax error in line 113:undefined: stored as kudu ^ Encountered: STORED Expected: AS CAUSED BY: Exception: Syntax error
Any pointer to a solution will be helpful.
Looking at the documentation, I think "STORED AS KUDU" needs to precede "tblproperties(...)".
Also, I don't think you want "ROW FORMAT..." or "LOCATION ..."; those clauses aren't relevant for Kudu tables.
the following key words are supported while creating kutu table
PARTITIONED STORED AS LOCATION ROWFORMAT
could you follow this syntax and let me know if you need more info.
you can perform a HASH partition or Range partition. or mix
using Distributed by Range or DISTRIBUTE BY HASH (id ) INTO 4 BUCKETS,
CREATE TABLE `TableName` ( `id` BIGINT, `name` STRING )
DISTRIBUTE BY RANGE(id) or DISTRIBUTE BY HASH (id) INTO 16 BUCKETS
TBLPROPERTIES ( 'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler', 'kudu.table_name' = 'Your Table Name', 'kudu.master_addresses' = 'kudu-master-hostname:7051', 'kudu.key_columns' = 'id' );