Double-click the tMysqlOutput component
to open its Basic settings view.
Leave the Property Type as Built-in and fill in the database connection
details manually in the Host, Port, Database,
Username and Password fields.
If you have centralized your connection information to the database in the Metadata > DB Connections node of the Repository, you can select Repository from the Property Type list and browse to the centralized connection to have the fields automatically filled in. For more information about storing metadata, see Managing metadata in Talend Studio.
- Fill in the Table field with the target database table name, users in this example.
- Select the actions to be carried out on the database table and data according to your needs from the corresponding lists. In this example, the target table will be created if it does not exist in the specified database, and data from client requests will be inserted, or updated if it already exists, to the database table.
- Click the Sync columns button to synchronize the table schema with the input schema.
- Double-click the tXMLMap component to open the Map Editor.
- Rename the root node in the output table: right-click the node, select Rename from the contextual menu, and specify a new name in the pop-up dialog box, user in this example.
Select all the three columns in the input table and drop them onto the
user node, and select the Create as sub-element of target node option from
the pop-up dialog box to set these columns as sub-elements of the user node. When done, click OK to validate the mappings and close the Map
- Double-click the tRESTResponse component and set the response parameters according to your needs. In this example, we keep the default settings for all the parameters.