Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

BDM1043 Lab1 HDFS Commands

Maricris Q. Resma
BDM 1043 - Big Data Fundamentals 02 (DSMM Group 2)
Lambton College Mississauga
Jagmohan Dutta

November 11, 2022


1. Create Database and Table Students in mysql

CREATE TABLE Students (sid CHAR(9), firstname VARCHAR(20), lastname CHAR(8),


gpa REAL);

2. Insert atleast 10 rows into this table.

insert into Students values ('C011111', 'Maricris', 'Resma', 3.5)

insert into Students values ('C022222', 'Mari', 'Quilop', 3.5);


insert into Students values ('C033333', 'Cris', 'Santos', 3.5);

insert into Students values ('C044444', 'Matty', 'Resma', 3.5);

insert into Students values ('C055555', 'Matthias', 'Quilop', 3.5);

insert into Students values ('C066666', 'Edgar', 'Resma', 3.5);

insert into Students values ('C077777', 'Allan', 'Gonzales', 3.5);

insert into Students values ('C088888', 'Jr', 'Resma', 3.5);

insert into Students values ('C099999', 'Matthew', 'Healy', 3.5);

insert into Students values ('C010101', 'Makis', 'Antonio', 3.5);


3. Import this table into Hadoop by using sqoop.

sqoop-import --connect jdbc:mysql://sandbox-hdp.hortonworks.com/jagwk10 --username root --


P --table Students --hive-import --create-hive-table --hive-table Students_Imported --hive-
database jagwk10 --split-by id -m 1;

You might also like