Support Questions

Find answers, ask questions, and share your expertise

Queries in Zeppelin

avatar
Master Guru

This query works in Ambari Hive View and Zeppelin SQL view

SELECT sentiment, CASE WHEN LENGTH(location) > 0 THEN substring(location,0,10) ELSE 'UNK' END AS location, COUNT(*)  as num
from tweetsbi
where country is not null and ts is not null and
tweet_id is not null and sentiment is not null and 
location is not null and location != '' and country 
!= '' 
GROUP BY sentiment, location
order by num desc, sentiment

It does not work in Hive view in Zeppelin.

This is on HDP 2.4.2 Sandbox.

1 ACCEPTED SOLUTION

avatar
3 REPLIES 3

avatar

@Timothy Spann: Can you try @nmaillard's suggestion from here?

avatar
Master Guru

Another work around which worked for me is havimg hive interpretur as first one called out in youe bind. good friend binu matthew found that one

avatar
New Contributor

@timothy span did substring function really worked with sql interpreter on Zeppelin? or did you some change to the interpreter? Thank you!

,