This scenario clears the data in a table of a MySQL database first and then adds a row to it.
The table, named Date, contains one column called date with the type being date.
As a prerequisite of this Job, the MySQL ODBC driver must have been installed and the corresponding ODBC connection must have been configured.
Drop tDBOutput and tRowGenerator from the Palette to the design workspace.
Connect the components using a Row > Main link.
Double-click tRowGenerator to open its Schema editor.
Click the [+] button to add a line.
Enter date as the column name.
Select Date from the data type list.
Select getCurrentDate from the Functions list.
Enter 1 in the Number of Rows for RowGenerator field as only one row will be added to the table.
Click OK to close the editor and propagate the schema changes to tDBOutput subsequently.
Double-click tDBOutput to open its Basic settings view in the Component tab.
In the Database field, enter the name of the data source defined during the configuration of the MySql ODBC connection.
To configure an ODBC connection, click to open the database connection configuration wizard.
In the Username and Password fields, enter the database authentication credentials.
In the Table field, enter the table name, Date in this example.
In the Action on data field, select Insert to insert a line to the table.
Select the check box Clear data in table to clear the table before the insertion.
Save the Job and press F6 to run.
As shown above, the table now has only one line about the current date and time.