Also make sure you have imported only two columns from table, which are department_id, department_name

Also make sure you have imported only two columns from table, which are department_id, department_name

Answer: Solutions:

Step 1: Clean the hdfs tile system, if they exists clean out.

hadoop fs -rm -R departments

hadoop fs -rm -R categories

hadoop fs -rm -R products

hadoop fs -rm -R orders

hadoop fs -rm -R order_itmes

hadoop fs -rm -R customers

Step 2: Now import the department table as per requirement.

sqoop import

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

–username=retail_dba

-password=cloudera

-table departments

-target-dir /user/cloudera/departments

-m2

-boundary-query "select 1, 25 from departments"

-columns department_id, department_name

Step 3: Check imported data.

hdfs dfs -Is departments

hdfs dfs -cat departments/part-m-00000

hdfs dfs -cat departments/part-m-00001

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