Step 1: Click on Hue in the welcome screen. This will take you to the Hadoop UI of the cloudera.
Step 2: To load the sample data into HBase data store click on “Step 2: Examples” tab.
Step 3: Click on “HBase Browser” below. On clicking this will start initializing the few example tables to HBase database. Wait until the initialization part is done.
Step 4: Click on Data Browser tab, under that Hbase , now you will land up in HBase Browser Home location.
- You can see few sample data have been initialized on HBase database.
Step 5: Now let’s construct the below database of a company’s employees
- Click on the New Table button on the right top corner to add new table to the HBase database.
- Fill in the table details like Table name as Employee and we have to column family names: Personal data and professional data. Click on “add an additional column family” to add more column family names. Once done Click submit.
- Employee table is created now.
- To add rows and data to the employee table click on the Employee link.
- To add a new row click on to the ” New Row” button on the lower right corner of the screen.
- Fill in the details of new row as shown in the image below. To add more fileds click on “Add Field” button. Once filling all the required details click “Submit” button to insert the row.
- You can see the row has been inserted.
- Likewise we can add few more columns and final table will be like this.
- Now to search or write a query you can type it in the Search box as shown below. To search for employee 1 details type in “emp1” and hit enter or click search icon.
- To get employee 1 Personal details the query will be ” emp1[Personal Data: ]
- To get employee 1 Personal and Professiona details the query will be “emp1[Personal Data: , Professional Data: ]
- To get employee1 name, the query will be “emp1[Personal Data: Name ].
Hope you enjoyed learning your first HBase lesson.