O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Printing your output query

In one of the previous recipes, we saw how we can print the input and select query for debugging. This recipe shows how this can be achieved for an update, delete, or insert, which are all functions available through tMysqlOutput.

Getting ready

Open the job jo_cook_ch07_0050_printOutputSQL, which is a copy of the job from the previous recipe.

How to do it…

The steps to be performed are as follows:

  1. Add tJavaRow and link it to tMysqlOutput.
  2. Add the following code:
    System.out.println(((String)globalMap.get("tMysqlOutput_1_QUERY")));
  3. Run the job. You will see that the output is all null.
  4. Open the tMysqlOutput component and click on the Advanced settings tab.
  5. Click the field Enable debug mode as shown in the following screenshot:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required