drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subhajit Ghosh" <subha...@skipjaq.com>
Subject Fetching nested JSON data in HBase using Apache Drill
Date Fri, 27 Mar 2015 22:30:50 GMT
I am using Apache Drill to run SQL queries on a HBase table. The value in one of the columns
is:
0: jdbc:drill:schema:hbase:zk=localhost> select cast(address['street'] as varchar(20))
from hbase.students;
+------------+
|   EXPR$0   |
+------------+
| {"id": 123} |
+------------+
1 row selected (0.507 seconds)I would like to access the id field using a query. Something
like:
0: jdbc:drill:schema:hbase:zk=localhost> select tbl.address['street']['id'] from hbase.students
as tbl;
+------------+
|   EXPR$0   |
+------------+
| null       |
+------------+As you can see, this does not work. I am run to similar queries on JSON data
in a file. My question is can I query JSON data in HBase.


—
Thanks and Regards,
Subhajit
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message