Scenario: Resetting a DB auto-increment - 6.1

Talend Open Studio for Big Data Components Reference Guide

Talend Open Studio for Big Data
Data Governance
Data Quality and Preparation
Design and Development
Talend Studio

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.

  1. Drag and drop a tDBSQLRow component from the Palette to the design workspace.

  2. Double-click tDBSQLRow to open its Basic settings view.

  3. 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.

  4. 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.

  5. 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

  6. Press Ctrl+S to save the Job and F6 to run.

    The database autoincrement is reset to 1.