Skip to main content Skip to complementary content

Creating the first subJob

About this task

To do this, proceed as follows:

Procedure

  1. Drop the following components from the Palette onto the design workspace: tFixedFlowInput from the Misc family and tMysqlOutput from the Databases > Mysql family.
  2. Link tFixedFlowInput to tMysqlOutput using a Row > Main connection.
  3. Double-click tFixedFlowInput to display its Basic settings view:
  4. Click the [...] button next to Edit schema to open the schema editor.
  5. In the schema editor, click the [+] button three times to add three lines and set them as displayed in the above screenshot.
  6. Click Ok.
  7. Back to tFixedFlowInput Basic settings view, in the Mode area, select the Use inline table option.
  8. Under the inline table, click the [+] button three times to add three rows in the table.
  9. In the inline table, click the id field of the first row and type in 1.
  10. Click the firstname field of the first row, press Ctrl+Space to display the autocompletion list and select the TalendDataGenerator.getFirstName() variable in the list.
  11. Click the lastname field of the first row, press Ctrl+Space to display the autocompletion list and select the TalendDataGenerator.getLastName() variable in the list.
  12. Do the same for the two following rows to obtain the settings displayed in the screenshot.
  13. Double-click tMysqlOutput to display its Basic settings view:
  14. From the Property Type list, leave Built-in and fill in the Host, Port, Database, Username and Password fields manually. If you centralized your connection information to the database in the Metadata > DB Connections node of the Repository, you can select Repository from the list and the fields will be automatically filled in.
    For more information about storing metadata, see Talend Studio User Guide.
  15. In the Table field, type in the name of the table in which the data will be loaded, for example: users.
  16. From the Action on table list, select Drop table if exists and create, select Insert from the Action on data list.
  17. Click Sync columns to retrieve the schema coming from the previous component.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!