Saturday, May 26, 2018

HBase - SCAN

In the last tutorial ,we have understood how to load the data in the HBase table.
Now , we will learn how to read the data from the HBase table.

As per the Cloudera Documentation , GET and SCAN are the two ways by which we can read the data.

In fact , GET also uses SCAN in it's underlying logic.Let us understand the 'SCAN' command.

1.) Retrieving  complete data using 'scan' command:-
      Syntax :- scan 'tablename'



2.) Retrieving the specific ROWS from the table:-
     Syntax :- scan 'tablename' ,{LIMIT => no of rows}

 
3.) Retrieving the data for the specific column family :-
     Syntax :-  scan 'tablename',{COLUMNS => 'columnfamily:column'}



4.) Retrieving the data within a specific timestamp :-
    Syntax :- scan 'tablename' {TIMERANGE => [t1,t2]}



Further Reading :- http://hbase.apache.org/

No comments:

Post a Comment

Hadoop - What is a Job in Hadoop ?

In the field of computer science , a job just means a piece of program and the same rule applies to the Hadoop ecosystem as wel...