Professional Documents
Culture Documents
Term 1 Lab Assignment - Embedded
Term 1 Lab Assignment - Embedded
3. Perform Overwrite
operation on Product
table
4. Create partition on
product table using
column deptno.
Q1. Write a query to display the department name, number of workers working in each department
Q2. Write a query to display worker name, job title for those workers who are either managers or
executive and had served these position for at least 5 years
No. 1
1. Create MYSQL table Employee & Import same table from a relational
database into HDFS Exam directory
2. Create a local file called DEPT which contains department information and load
into HDFS Exam directory using the Hadoop file system shell.
vi DEPT
hadoop fs -put DEPT /user/cloudera/Exam
3. Create MYSQL table Employee & Import same table from a relational
database into HDFS Exam directory
<mysql> create table Employee(
-> empid int,
-> firstname varchar(20),
-> lastname varchar(20),
-> phoneno int);
<mysql> insert into Employee
-> values (1901040063, ‘Nguyen’, ‘Duc’, 0387772001);
<mysql> insert into Employee
-> values (1901040231, ‘Mai’, ‘Uyen’, 123456789);
<mysql> insert into Employee
-> values (1801040777, ‘Trinh’, ‘Thien’, 987654321);
vi Movie
cat Movie
hadoop fs -put Movie /user/cloudera/Exam