Scenario 1: Sending a HTTP request to the server and saving the response information to a local file - 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 two-component Job that uses the GET method to retrieve information from the server end and writes the response to a local file as well as to the console.

Linking the components

  1. In the Integration perspective of the Studio, create a Job from the Job Designs node in the Repository tree view.

    For further information about how to create a Job, see the Talend Studio User Guide.

  2. Drop the following components from the Palette onto the design workspace: tHttpRequest and tLogRow.

  3. Connect the tHttpRequest component to the tLogRow component using a Row > Main connection.

Configuring the GET request

  1. Double-click the tHttpRequest component to open its Basic settings view and define the component properties.

  2. Fill in the URI field with "". Note that this URI is for demonstration purposes only and it is not a live address.

  3. From the Method list, select GET.

  4. Select the Write response content to file check box and fill in the input field on the right with the file path by manual entry, D:/test.txt for this use case.

  5. Select the Need authentication check box and fill in the user and password, both tomcat in this use case.

Executing the Job

Then you can run this Job.

The tLogRow component is used to present the execution result of the Job.

  1. If you want to configure how the result is presented by tLogRow, double-click the component to open its Component view and in the Mode area, select the Table (print values in cells of a table) check box.

  2. Press F6 to run this Job.

Once done, the response information from the server is saved and displayed.