• Post author:
  • Post category:HBase
  • Post last modified:March 27, 2024
  • Reading time:3 mins read

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.

Advertisements

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 Nelamali

Naveen Nelamali (NNK) is a Data Engineer with 20+ years of experience in transforming data into actionable insights. Over the years, He has honed his expertise in designing, implementing, and maintaining data pipelines with frameworks like Apache Spark, PySpark, Pandas, R, Hive and Machine Learning. Naveen journey in the field of data engineering has been a continuous learning, innovation, and a strong commitment to data integrity. In this blog, he shares his experiences with the data as he come across. Follow Naveen @ LinkedIn and Medium