This scenario describes a single component Job which aims at re-initializing the DB auto-increment to 1. This job has no output and is generally to be used before running a script.
As a prerequisite of this Job, the relevant DBMS's ODBC driver must have been installed and the corresponding ODBC connection must have been configured.
Drag and drop a tDBSQLRow component from the Palette to the design workspace.
Double-click tDBSQLRow to open its Basic settings view.
Select Repository in the Property Type list as the ODBC connection has been configured and saved in the Repository. The follow-up fields gets filled in automatically.
For more information on storing DB connections in the Repository, see Talend Studio User Guide.
The Schema is built-in for this Job and it does not really matter in this example as the action is made on the table auto-increment and not on data.
The Query type is also built-in. Click on the [...] button next to the Query statement box to launch the SQLbuilder editor, or else type in directly in the statement box:
Alter table <TableName> auto_increment = 1
Press Ctrl+S to save the Job and F6 to run.
The database autoincrement is reset to 1.