If you loaded data again in Hive then what will happen?
-
-
if you loaded data from RDBMS by sqoop and by some reason you loaded again second time then what will happen?
-
As we are giving the same command again, it will be errored out with error “Output directory hdfs://localhost:9000/sqoop2 already exists” . We need a new directory everytime we run the command as it’s output is generated by map-reduced job, which needs a new output directory everytime we run the job.
-
If for some reason the same command for load is run again, it will fail stating that the directory already exists, because by default, imports go to a new target location. If the destination directory already exists in HDFS, Sqoop will refuse to import and overwrite that directory’s contents. If you use the –append argument, Sqoop will import data to a temporary directory and then rename the files into the normal target directory in a manner that does not conflict with existing filenames in that directory.
- You must be logged in to reply to this topic.