EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login

HBase Create Table

By Priya PedamkarPriya Pedamkar

Home » Data Science » Data Science Tutorials » Hadoop Tutorial » HBase Create Table

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.

Syntax of HBase:

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

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

Hadoop Training Program (20 Courses, 14+ Projects)

20 Online Courses

14 Hands-on Projects

135+ Hours

Verifiable Certificate of Completion

Lifetime Access

4 Quizzes with Solutions

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Hadoop Tutorial
  • Advanced
    • What is Yarn in Hadoop
    • Hadoop Administrator
    • Hadoop Administrator Jobs
    • Hadoop Schedulers
    • Hadoop Streaming
    • Apache Hadoop Ecosystem
    • Distributed Cache in Hadoop
    • Hadoop Ecosystem Components
    • Hadoop YARN Architecture
    • HDFS Architecture
    • What is HDFS
    • HDFS Federation
    • Apache HBase
    • HBase Architecture
    • What is Hbase
    • HBase Shell Commands
    • What is MapReduce in Hadoop
    • Mapreduce Combiner
    • MapReduce Architecture
    • MapReduce Word Count
    • Impala Shell
    • HBase Create Table
  • Basics
    • What is Hadoop
    • Career in Hadoop
    • Advantages of Hadoop
    • Uses of Hadoop
    • Hadoop Versions
    • HADOOP Framework
    • Hadoop Architecture
    • Hadoop Configuration
    • Hadoop Components
    • Hadoop Database
    • Hadoop Ecosystem
    • Hadoop Tools
    • Install Hadoop
    • Is Hadoop Open Source
    • What is Hadoop Cluster
    • Hadoop Namenode
    • Hadoop data lake
    • Hadoop fsck
    • HDFS File System
    • Hadoop Distributed File System
  • Commands
    • Hadoop Commands
    • Hadoop fs Commands
    • Hadoop FS Command List
    • HDFS Commands
    • HDFS ls
    • Hadoop Stack
    • HBase Commands
  • Interview Questions
    • Hadoop Admin Interview Questions
    • Hadoop Cluster Interview Questions
    • Hadoop developer interview Questions
    • HBase Interview Questions

Related Courses

Data Science Certification

Online Machine Learning Training

Hadoop Certification

MapReduce Certification Course

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

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

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

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

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

Special Offer - Hadoop Training Program (20 Courses, 14+ Projects) Learn More