the point I was trying to make is : The good news is, Drill does provide a nice simple way to abstract these details away. You simply create a view on top of HBase [1]. The view can contain the physical conversions. Then users can interact with the view rather than the underlying table.
On Fri, Jul 31, 2015 at 11:36 AM, Jacques Nadeau <[email protected]> wrote: > Carol, your statements are misleading. There are some situations where > people have stored in HBase encoded as text. In other cases, they've used > a straight binary encoding. CAST is used generally used when the data is > already encoded as a UTF8 string. Otherwise, the user should use > CONVERT_FROM to decode the binary value. > > -- > Jacques Nadeau > CTO and Co-Founder, Dremio > > On Fri, Jul 31, 2015 at 7:42 AM, Carol McDonald <[email protected]> > wrote: > > > This blog shows an example using REST , drill , and HBase. In this > example > > a view converts the HBase byte values to strings > > > > > > > https://www.mapr.com/blog/how-use-sql-hadoop-drill-rest-json-nosql-and-hbase-simple-rest-client > > > > 0: jdbc:drill:> use dfs.mydata; > > > > create or replace view prodview as SELECT CAST(row_key AS INTEGER) AS > > prod_id, CAST(t.details.category AS VARCHAR(40)) AS category, > > CAST(t.details.name AS VARCHAR(129)) AS name FROM maprdb.products t; > > > > > > On Tue, Jul 28, 2015 at 11:35 AM, Usman Ali <[email protected]> > > wrote: > > > > > Hi, > > > When we query an Hbase table like "select * from > > > hbasePluginName.`tableName`" using Restful APIs, the json it returns > > > contains values in the form of bytes. I know that all the values in my > > > hbase table were originally of String form but I do not know exact > schema > > > (column families and column names) of my table. How can I convert those > > > bytes stored in strings back to my original strings. > > > > > > Thanks. > > > Usman Ali > > > > > >
