Member since
02-18-2014
5
Posts
0
Kudos Received
0
Solutions
03-06-2014
11:15 PM
Dear all, I am having troubles using Impala to access data stored in HBase. Impala throws me the following error message: AnalysisException: Failed to load metadata for table: default.customsink_lat CAUSED BY: TableLoadingException: TableLoadingException: Failed to parse view-definition statement of view: default.customsink_lat However, Hive does work perfectly fine. Unfortunately it is not an option because it is too slow. The scenario: - One HBase table with wide columns - One Hive table based on the HBase table and another one that uses explode to transform the columns into rows The structure in Hive: customsink_lat: based on this code: create or replace view customsink_lat as
SELECT id, clmndate,clmnvalue FROM customsink LATERAL VIEW explode(props) cl AS clmndate,clmnvalue; and another one based directly on HBase: CREATE EXTERNAL TABLE customsink(
id string,
props map<bigint,float>
)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" =
":key,cf:"
)
TBLPROPERTIES("hbase.table.name" = "customsink"); Do you have any idea why Imala cannot handle the structure of customsink_lat? Thank you very much in advance, Fabian PS: Here are the results of Hive queries. Especially customsink_lat does not contain nested data anymore, although it is based on nested data. So I cannot find an explanation why Impala still refuses to parse customsink_lat. hive> select * from customsink;
OK
Source1 {9223370642321980337:1.0,9223370642321980339:0.0,9223370642329180337:1.0,9223370642329180339:0.0}
Source2 {9223370642321980333:3.0,9223370642321980335:2.0,9223370642329180333:3.0,9223370642329180335:2.0}
Time taken: 0.296 seconds hive> select * from customsink_lat;
Total MapReduce jobs = 1
Launching Job 1 out of 1
OK
Source1 9223370642321980337 1.0
Source1 9223370642321980339 0.0
Source1 9223370642329180337 1.0
Source1 9223370642329180339 0.0
Source2 9223370642321980333 3.0
Source2 9223370642321980335 2.0
Source2 9223370642329180333 3.0
Source2 9223370642329180335 2.0
Time taken: 27.986 seconds
... View more
Labels: