Also make sure you use orderid columns for sqoop to use for boundary conditions.

Also make sure you use orderid columns for sqoop to use for boundary conditions.

Answer: Solutions:

Step 1: Clean the hdfs file 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_items

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

-query="select’ from orders join order_items on orders.orderid = order_items.order_item_order_id where SCONDITlONS "

-target-dir /user/cloudera/order_join

-split-by order_id

–num-mappers 2

Step 3: Check imported data.

hdfs dfs -Is order_join

hdfs dfs -cat order_join/part-m-00000

hdfs dfs -cat order_join/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