Last active
December 1, 2015 20:45
-
-
Save bcambel/507c889a6440f6785b8d to your computer and use it in GitHub Desktop.
Apache Drill query to group by in Apache HBase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0: jdbc:drill:zk=local> SELECT CONVERT_FROM(row_key, 'UTF8') AS clickid, | |
| . . . . . . . . . . . > CONVERT_FROM(clicks.clickinfo.studentid, 'UTF8') AS studentid, | |
| . . . . . . . . . . . > CONVERT_FROM(clicks.clickinfo.`time`, 'UTF8') AS `time`, | |
| . . . . . . . . . . . > CONVERT_FROM(clicks.clickinfo.url, 'UTF8') AS url | |
| . . . . . . . . . . . > FROM hbase.clicks WHERE clicks.clickinfo.url LIKE '%google%'; | |
| +----------+------------+---------------------------+------------------------+ | |
| | clickid | studentid | time | url | | |
| +----------+------------+---------------------------+------------------------+ | |
| | click1 | student1 | 2014-01-01 12:01:01.0001 | http://www.google.com | | |
| | click3 | null | 2014-01-01 01:02:01.0001 | http://www.google.com | | |
| | click6 | null | 2013-02-01 12:01:01.0001 | http://www.google.com | | |
| +----------+------------+---------------------------+------------------------+ | |
| 3 rows selected (2.24 seconds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment