EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Hadoop Tutorial HBase Create Table
 

HBase Create Table

Priya Pedamkar
Article byPriya Pedamkar

Updated March 27, 2023

HBase Create Table

 

 

Introduction to HBase Create Table

Hbase tables are mutatable, modifiable, and deletable. Hbase tables can also be created using HiveQL. HBase Apache is a database in Hadoop. It is scalable and can store Big data. Using access to your big data, one can use Apache HBase and do random, real-time write/read. Many methods can be accessed by HBase to interact with it. Java and Java API construct HBase and so, it is widely used to provide a lot of functionalities. HBase is called a HappyBase which is a developer-friendly library of Python which interacts with HBase Apache. Offering application developers, use of standard HBase setups, to interact with HBase. But, if Java is not the construct for HBase, it can provide you with two options. They are REST Interface and Thrift Interface.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Syntax of HBase:

Using HBase shell, creating a table: create is the command used to create an HBase table. Specification of Table name and Column Family name is necessary.

Syntax for creating a table in HBase shell:

create ‘ < name of table > ’ , ‘ < name of column family> ’

Example of HBase Create Table

Hbase tables are used for handling and hosting a very large range of data in the form of a table. This is for interacting and analyzing. Storage for multi-structured and scanty data can be done easily. Also a column orientation, nonrelational database management.

Thrift and REST Interfaces

  • Thrift Interface is more of a lightweight and hence rapid of the two.
  • REST interface is comparatively slow with respect to performance.
  • REST interface uses HTTP verbs.
  • Installation of HBase python is done from PyPI repository:

pip3 install hbase – python

The Flat – Wide and Tall – Narrow are two approaches used for the design of HBase tables. The approach selection, however, depends on what you want to achieve using any one of these methods. HBase performance directly depends on how data is accessed, that is, it completely depends on the Row – Key handling.

The difference in Tall – Narrow and Flat – Wide approaches is analogous to get and scan. Tall – Narrow approach, ideally, has less numbered rows and large numbered columns. And Flat – Wide approach has less numbered columns and large numbered rows. HBase is a No-SQL, value – type or a key database where a key is assigned to watch row.

For Example:

This is the conceptual representation of a table created in HBase. The table describes the keywords such as SFO and so on. The whole row is considered as column families.

Hbase Create Table1

Keys usually will not be there at the beginning. They are more for illustrative purposes. At HBase definition timing, one can specify one or more column’s families. A column family has created something like this:

Code:

create ‘ geog_origin ‘ , ‘ origin ’

column family

Inserting data into the first row of the table:

Code:

put ' geog_origin ’ , ’ SFO ' , ' origin : airport_name ' , ' San Francisco , CA : San Francisco '
put ' geog_origin ’ , ’ SFO ' , ' origin : city ’ , ’ San Francisco , CA '
put ' geog_origin ’ ,’ SFO ' , ’ origin ' : state ' , ' California '
put ' geog_origin ’ , ' SFO ' , ’ origin ' : id ’ , ' 14771 '

Column families are each inserted into columns with its values individually. Deleted and retrieved using DELETE, PUT, GET commands. You have to prefix columns name with predefined column family and the key-value provision for the respective row you are about to insert it in. In the conceptual world, it looks something like this :

Hbase Create Table3

Updating, loading and deleting data in HBase tables is possible in Python. To overcome the problems of HDFS and Hive like write once and append, mutate, and manipulation of data is not possible, and hence HBase is a good medium. HBase can perform delete, insert and update operations.

Try typing “import this” on Python IDE, you’ll find a poem highlighting the philosophies of Python:

Code:

Import this

Import this

Conclusion

HBase is a database distribution. It is scalable and is used for Big data storage. We can create HBase tables and can also store huge data into these tables. Accessing the data inserted is also easy using the keywords Delete, Put and Get. HBase is always used by importing the HBase python package from the Python library.

Recommended Articles

This is a guide to HBase Create Table. Here we discuss the introduction, syntax and various examples of HBase Create Table. You may also have a look at the following articles to learn more –

  1. HBase Architecture
  2. HBase Commands
  3. Azure Services
  4. Advantages of Hadoop
  5. Different Types of HBase Shell Commands

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA Login

Forgot Password?

🚀 Limited Time Offer! - 🎁 ENROLL NOW