Reputation: 742
I am using zeppelin cloned from https://github.com/apache/incubator-zeppelin.
Hive : version 1.2.1 Hive is configured in standalone mode, metastore_db is handled by Derby.
I have a properly set up Hive interpreter in a zeppelin notebook.
I have successfully created a table from the hive interpreter as follows
%hive
CREATE TABLE 30SEC(
id bigint,
obu_id varchar(100),
obu_make varchar(100),
)ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TextFile
I successfully loaded data from a text file from my hdfs
%hive
load data
inpath "/path/to/file"
into table 30sec
When I run queries without aggregate functions, it works fine,
But if queries contain aggregate functions, nullpointer exception is thrown by Hive interpreter
Please help me out if I missed out on any important configuration.
Upvotes: 0
Views: 773
Reputation: 742
A bug was filed for this at https://issues.apache.org/jira/browse/ZEPPELIN-629
The commit https://github.com/vgmartinez/incubator-zeppelin/commit/05fa23f8c5112b4e60d0ff1685565af31e5e8a44 fixed the issue.
Thanks to Zeppelin community for the quick action.
Upvotes: 1
Reputation: 1959
When using aggregate functions , group by is required. Please correct and try again
select obu_id,count(1) fromm 30sec group by obu_id
Upvotes: 0