Now import the data from following directory into departments_export table, /user/cloudera/departments new
Now import the data from following directory into departments_export table, /user/cloudera/departments new
Answer: Solution:
Step 1: Login to musql db
mysql –user=retail_dba -password=cloudera
show databases; use retail_db; show tables;
step 2: Create a table as given in problem statement.
CREATE table departments_export (departmentjd int(11), department_name varchar(45), created_date T1MESTAMP DEFAULT NOW());
show tables;
Step 3: Export data from /user/cloudera/departmentsnew to new table departments_export
sqoop export -connect jdbc:mysql://quickstart:3306/retail_db
-username retaildba
–password cloudera
–table departments_export
-export-dir /user/cloudera/departments_new
-batch
Step 4: Now check the export is correctly done or not. mysql -user*retail_dba -password=cloudera
show databases;
use retail _db;
show tables;
select’ from departments_export;
Latest CCA175 Dumps Valid Version with 96 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund