Pentaho

 View Only

 Pentaho MS-SQL set IDENTITY_INSERT a00 ON for table output

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Fiodar Hulin's profile image
Fiodar Hulin posted 02-28-2020 09:11

Hi All

PDI 9.0

 

Simple job

MS SQL connection

Table input -> tableouput

 

tableouput table :

CREATE TABLE [dbo].[a02](

   [ProductID] [int] NOT NULL IDENTITY(1,1)

  ..

 

I need to write IDENTITY explicitly

in SSMS I run

set IDENTITY_INSERT a00 ON

and do insert ok.

 

In pentaho I got error

Table output.0 - Cannot insert explicit value for identity column in table 'a00' when IDENTITY_INSERT is set to OFF.

 

trying to run in SQl : set IDENTITY_INSERT a00 ON

Before 

SQL -> table input -> table output

but same error occured.

 

Seems set IDENTITY_INSERT a00 ON runs in DIFFerent SESSION

then table output

 

How can I run set IDENTITY_INSERT a00 ON in same session

or point out to use it ;

 


#PentahoDataIntegrationPDI
#Kettle
#Pentaho
Fiodar Hulin's profile image
Fiodar Hulin

https://stackoverflow.com/questions/60438353/pentaho-ms-sql-set-identity-insert-a00-on-for-table-output/60510628#60510628

 

Same question -

Idea of answer was to use job instead of transformation

but problem is that SQL runs in OTHER session