Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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 Member

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

,