HBase – Get rows from Table with Examples

Spread the love

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.

Naveen (NNK)

SparkByExamples.com is a Big Data and Spark examples community page, all examples are simple and easy to understand and well tested in our development environment Read more ..

Leave a Reply