Deleting directory in Sqoop

0 votes
I have imported a MySql table in sqoop but gave a wrong path. Now I want to delete the file from that path. How can I do it?
Feb 11 in Big Data Hadoop by Hritik
88 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can use the --delete-target-dir :

$ sqoop import --connect jdbc:mysql://localhost/dbname --username username -P --table tablename --delete-target-dir --target-dir '/path/to/dir/' -m 1

answered Feb 11 by Omkar
• 65,850 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Could not find the Sqoop directory in HDP 2.2

You can find the Sqoop lib directory ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 12,270 points
223 views
0 votes
1 answer

Deleting a directory with comma throwing an error

As comma is an escape sequence character, ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 12,270 points
11 views
0 votes
1 answer

In which directory Hadoop should be installed?

You can install Hadoop anywhere. You just ...READ MORE

answered Apr 16, 2018 in Big Data Hadoop by Shubham
• 12,270 points
33 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,070 points
1,679 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,070 points
132 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
8,154 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
572 views
0 votes
3 answers

Hadoop hdfs: list all files in a directory and its subdirectories

You can do it using queue: private static ...READ MORE

answered Dec 4, 2018 in Big Data Hadoop by Ishwar
870 views
0 votes
3 answers

Spark Scala: How to list all folders in directory

val spark = SparkSession.builder().appName("Demo").getOrCreate() val path = new ...READ MORE

answered Dec 4, 2018 in Big Data Hadoop by Mark
675 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.