Search code examples
sqoop

overwrite hdfs directory Sqoop import


Is it possible to overwrite HDFS directory automatically instead of overwriting it every time manually while Sqoop import? (Do we have any option like "--overwrite" like we have for hive import "--hive-overwrite")


Solution

  • Use --delete-target-dir

    ​It will delete <HDFS-target-dir> provided in command before writing data to this directory.