You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Keegan Witt (JIRA)" <ji...@apache.org> on 2014/07/30 15:47:38 UTC
[jira] [Comment Edited] (SQOOP-1405) Extra arg to enable SQL Server
identity insert on export
[ 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)