Manage MSSQL Identity field with tCreateTable

Five Stars

Manage MSSQL Identity field with tCreateTable

Hi
I'm trying to make a INT identity field with autoincrement but I get this error :

Exception in component tCreateTable_1 (File_rotate)
java.lang.RuntimeException: Creating table failed
	at swiss_project.file_rotate_0_1.File_rotate.tCreateTable_1Process(File_rotate.java:1215)
	at swiss_project.file_rotate_0_1.File_rotate.tFileInputXML_1Process(File_rotate.java:14346)
	at swiss_project.file_rotate_0_1.File_rotate.tFileList_1Process(File_rotate.java:15702)
	at swiss_project.file_rotate_0_1.File_rotate.runJobInTOS(File_rotate.java:19262)
	at swiss_project.file_rotate_0_1.File_rotate.main(File_rotate.java:18988)
Caused by: java.sql.SQLException: Identity column 'AST00' contains invalid INCREMENT.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
	at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
	at swiss_project.file_rotate_0_1.File_rotate.tCreateTable_1Process(File_rotate.java:1203)
	... 4 more





talend_create_table.PNGThanks in advance

 

 

Tags (1)

Accepted Solutions
Nine Stars

Re: Manage MSSQL Identity field with tCreateTable

You would have to specify the precision too for INT IDENTITY. Just mention Length = 1 & Precision = 1 which would be Seed & Increment respectively.
Also, you have mentioned db type variables as NCHAR but Talend type as Integer. You need to change them too.

All Replies
Nine Stars

Re: Manage MSSQL Identity field with tCreateTable

You would have to specify the precision too for INT IDENTITY. Just mention Length = 1 & Precision = 1 which would be Seed & Increment respectively.
Also, you have mentioned db type variables as NCHAR but Talend type as Integer. You need to change them too.
Five Stars

Re: Manage MSSQL Identity field with tCreateTable

Not logic at all but it work. Thanks !

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now