HBase – Get rows from Table with Examples

  • Post author:
  • Post category:HBase
  • Post last modified:September 2, 2019

This tutorial describes how to fetch a single row and specific columns from the table using the HBase shell and will practice with some examples.

Reading Data From HBase Table using Get command

Use get to retrieve the data from a single row and it’s columns. The syntax for command get is as follows.

Syntax: get ‘<namespace>:<table_name>’, ‘<row_key>’, ‘<column_key>’

Example:

Below command returns ‘2’ with all columns

hbase read data from table using get command

This again returns ‘2’ but with just columns specified ‘office:age’ and ‘office:name’

hbase read data from table using get command

Alternatively, this command returns the same result

hbase read data from table using get command
Other commands to explore
hbase read data from table using get command

Next, Let’s see how to enable or disable a table.

Leave a Reply