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

Keegan Witt edited comment on SQOOP-1405 at 7/30/14 1:47 PM:
-------------------------------------------------------------

On second thought, this can be a prefix that isn't a standalone statement, for 
example
*testTable*
||Column||Type||Props||
|k|int|IDENTITY(1,1) NOT NULL|
|col1|int|NOT NULL|

Calling with something like {{--statement-prefix "SET IDENTITY_INSERT testTable 
ON"}} could cause an insert like {{SET IDENTITY_INSERT testTable ON INSERT INTO 
testTable (k, col1) VALUES (1, 2);}}

This would probably be better than the multiple statements idea.  Since this 
wouldn't be SQL Server specific, maybe it'd make sense to add for all 
connectors.


was (Author: keegan):
On second thought, this can be a prefix that isn't a standalone statement, for 
example
*testTable*
||Column||Type||Props||
|k|int|IDENTITY(1,1) NOT NULL|
|col1|int|NOT NULL|

Calling with something like {{--statement-prefix "SET IDENTITY_INSERT testTable 
ON"}} could cause an insert like {{SET IDENTITY_INSERT testTable ON INSERT INTO 
testTable (k, col1) VALUES (1, 2);}}

> Extra arg to enable SQL Server identity insert on export
> --------------------------------------------------------
>
>                 Key: SQOOP-1405
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1405
>             Project: Sqoop
>          Issue Type: New Feature
>          Components: connectors/sqlserver
>            Reporter: Keegan Witt
>
> It'd be nice if we had an extra arg for SQL Server that ran {{SET 
> IDENTITY_INSERT _tablename_ ON}} before exporting the data.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to