Support Questions
Find answers, ask questions, and share your expertise

Apache Drill 1.5.0 Java API: Read out File from HBase

Apache Drill 1.5.0 Java API: Read out File from HBase

Expert Contributor

I'm new to Apache Drill and I'm trying to read files from a HBase (version 1.1.2) table with Apache Drill (version 1.5.0).

When I run a query like "select mytable.cf.filecolumn from hbase.mytable" everything works fine, as I get back a binary representation directly by using ResultSet.getBytes(index). The Drill Data Type is BINARY VARYING here. Screenshot of the Drillbit UI for a similar query:

64513-1.png

64514-2.png

The problem now is, when I run a query like "select * from hbase.mytable", which selects one ore more complete column families, the column data is somehow represented as json, the Drill Data Type is then MAP for that. It looks the following in my Drillbit UI:

64515-3.png

64516-4.png

As I have a Map of the column data that is stored for each column family, how can I read out the file content? I want to read the HBase table with Drill, and export the file from the column family and save it to the client's hard disk.