Please import the departments table in a directory called departments_enclosedby and file should be able to process by downstream system.

Please import the departments table in a directory called departments_enclosedby and file should be able to process by downstream system.

Answer: Solution:

Step 1: Connect to mysql database.

mysql –user=retail_dba -password=cloudera

show databases; use retail_db; show tables;

Insert record

Insert into departments values(9999, ‘"Data Science"’);

select" from departments;

Step 2: Import data as per requirement.

sqoop import

-connect jdbc:mysql;//quickstart:3306/retail_db

~username=retail_dba

–password=cloudera

-table departments

-target-dir /user/cloudera/departments_enclosedby

-enclosed-by V -escaped-by \ -fields-terminated-by–‘ -lines-terminated-by:

Step 3: Check the result.

hdfs dfs -cat/user/cloudera/departments_enclosedby/part"

Latest CCA175 Dumps Valid Version with 96 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments