Professional Documents
Culture Documents
HTTP Transformation Passive & Connected. It allows you to connect to an HTTP server to use its services and applications. With an HTTP transformation, the Integration Service connects to the HTTP server, and issues a request to retrieves data or posts data to the target or downstream transformation in the mapping.
STEPS: 1. 2.
On the HTTP tab, you can configure the transformation to read data from the HTTP server or write data to the HTTP server. Configure the following information on the HTTP tab: Select the method. Select GET, POST, or SIMPLE POST method based on whether you want to read data from or write data to an HTTP server.
3. 4. 5.
Configure groups and ports. Manage HTTP request/response body and header details by configuring input and output ports. You can also configure port names with special characters. Configure a base URL. Configure the base URL for the HTTP server you want to connect to.
Authentication: Basic. Based on a non-encrypted user name and password. Digest. Based on an encrypted user name and password. NTLM. Based on encrypted user name, password, and domain.
Read data from an HTTP server. When the Integration Service reads data from an HTTP server, it retrieves
the data from the HTTP server and passes the data to the target or a downstream transformation in the mapping. For example, you can connect to an HTTP server to read current inventory data, perform calculations on the data during the PowerCenter session, and pass the data to the target.
2.
Update data on the HTTP server. When the Integration Service writes to an HTTP server, it posts data to the
HTTP server and passes HTTP server responses to the target or a downstream transformation in the mapping. For example, you can post data providing scheduling information from upstream transformations to the HTTP server during a session.
Page 1
Informatica-HTTP Transformations
1. In the Transformation Developer or Mapping Designer, click Transformation > Create. 2. Select HTTP transformation. 3. Enter a name for the transformation. 4. Click Create. The HTTP transformation displays in the workspace. 5. Click Done. 6. Configure the tabs in the transformation.
Configure the HTTP Tab: Select the method. Select GET, POST, or SIMPLE POST method based on whether you want to read data from or write data to an HTTP server. Configure groups and ports. Manage HTTP request/response body and header details by configuring input and output ports. You can also configure port names with special characters. Configure a base URL. Configure the base URL for the HTTP server you want to connect to.
Selecting a method:
GET Reads data from an HTTP server. POST Writes data from multiple input ports to the HTTP server. SIMPLE POST A simplified version of the POST method. Writes data from one input port as a single block of data to the HTTP server.
To define the metadata for the HTTP request, you must configure input and output ports based on the method you select: GET method. Use the input group to add input ports that the Designer uses to construct the final URL for the HTTP server. POST or SIMPLE POST method. Use the input group for the data that defines the body of the HTTP request. For all methods, use the header group for the HTTP request header information.
Page 2
Informatica-HTTP Transformations
Configuring groups and Ports: Output. Contains body data for the HTTP response. Passes responses from the HTTP server to downstream transformations or the target. By default, contains one output port, HTTPOUT. You cannot add ports to the output group. You can modify the precision for the HTTPOUT output port. Input. Contains body data for the HTTP request. Also contains metadata the Designer uses to construct the final URL to connect to the HTTP server. To write data to an HTTP server, the input group passes body information to the HTTP server. By default, contains one input port. Header. Contains header data for the request and response. Passes header information to the HTTP server when the Integration Service sends an HTTP request. Ports you add to the header group pass data for HTTP headers. When you add ports to the header group the Designer adds ports to the input and output groups on the Ports tab. By default, contains no ports EXAMPLES: GET Example: The source file used with this example contains the following data:
78576 78577 78578
Page 3
Informatica-HTTP Transformations
The Designer appends a question mark (?), the input group input port name, a dollar sign ($), and the input group input port name again to the base URL to construct the final URL:
http://www.informatica.com?CR=$CR
The Integration Service sends the source file values to the CR input port of the HTTP transformation and sends the following HTTP requests to the HTTP server:
http://www.informatica.com?CR=78576 http://www.informatica.com?CR=78577 http://www.informatica.com?CR=78578
The HTTP server sends an HTTP response back to the Integration Service, which sends the data through the output port of the HTTP transformation to the target.
POST Example: The source file used with this example contains the following data:
33,44,1 44,55,2 100,66,0
The Integration Service sends the values of the three fields for each row through the input ports of the HTTP transformation and sends the HTTP request to the HTTP server specified in the final URL
Page 4
Informatica-HTTP Transformations
The Integration Service sends the body of the source file through the input port and sends the HTTP request to the HTTP server specified in the final URL.
Page 5