[ 
https://issues.apache.org/jira/browse/SQOOP-3193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16038587#comment-16038587
 ] 

Boglarka Egyed edited comment on SQOOP-3193 at 6/6/17 11:45 AM:
----------------------------------------------------------------

Hi [~jayanthir],

The version info doesn't seem to be correct as it refers to Sqoop2, however, 
the command you have provided is definitely a Sqoop1 as that one is the command 
line tool (Sqoop2 works differently). Could you please review it?

Based on the Sqoop User Guide --hive-overwrite will overwrite your table using 
a CREATE TABLE statement so I think the --create-hive-table command in your 
example is unnecessary and causes the already exists error message, please see:
https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_importing_data_into_hive

Cheers,
Bogi


was (Author: boglarkaegyed):
Hi [~jayanthir],

The version info doesn't seem to be correct as it refers to Sqoop2, however, 
the command you have provided is definitely a Sqoop1 as that one is the command 
line tool (Sqoop2 works differently).

Based on the Sqoop User Guide --hive-overwrite will overwrite your table using 
a CREATE TABLE statement so I think the --create-hive-table command in your 
example is unnecessary and causes the already exists error message, please see:
https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_importing_data_into_hive

Cheers,
Bogi

> Sqoop comamnd to overwrite the table
> ------------------------------------
>
>                 Key: SQOOP-3193
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3193
>             Project: Sqoop
>          Issue Type: Bug
>          Components: sqoop2-shell
>    Affects Versions: 1.99.7
>         Environment: linux
>            Reporter: Jayanthi R
>              Labels: features
>             Fix For: no-release
>
>
> I am using sqoop import command and I want to overwrite the data when I use 
> it for second or third time (except the first time)
> sqoop import --connect jdbc:postgresql://reuxeuls677.bp.com/auditdb 
> --username audit_user --password theaudituserloginpassword --table 
> test_automation --hive-overwrite --hive-table sqoophive -m 1  --hive-import 
> --hive-database 'test_automation_db' --create-hive-table --hive-table 
> test_automation;
> But, I am getting the following error:
> 17/06/06 09:34:13 ERROR tool.ImportTool: Encountered IOException running 
> import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output 
> directory hdfs://HDPEMDCPROD/user/dluser/test_automation already exists



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to