The Activity Log integration template retrieves information from the Informatica Cloud activity log and produces a formatted output using a user-defined XSLT script. You can use this template to view a list of custom integration jobs, as well as any other tasks that recently ran. The output indicates if a task completed, completed with errors, or failed to complete.
You can download this integration template from the Informatica Marketplace, here.
Prerequisites
- Download the plug-in to perform XSLT processing. The plug-in is the w_jxslt.xml file within the zip file that you downloaded from the Marketplace
- Import the provided plug-in to your organization. Click Configuration > Plug-ins > New.
- Configure the new plug-in, upload the plug-in file, and click Save.
- Create a source file for authentication information for a valid Informatica Cloud account. Include the following field headers in the file and one row of data for the authentication information:
Field Headers | user | userid | pw |
Login Details | Informatica Cloud user name | User ID | Password for the account |
Step 1: Import Template and Set Display Properties
Click to view a larger image
Step 2: Creating Custom Integration Task
- Choose the integration template.
- Select a flat file source connection and the source file with authentication information.
- Select a flat file target connection and select Create Target to create an new file target for the task output.
- On the Other Parameters page, define the attributes for the REST Calls (HTTP Method, HTTP URL) as shown below. Use the appropriate URL for your environment:
Click to view a larger image
- HTTP Method. Use GET to retrieve activity log information.
- HTTP URL. Use the following URL: https://app.informaticaondemand.com/saas/api/1/activitylog
- XSLT Script. Enter the XSLT script to format the output. You can use the following and modify it to your specification:
Sample XSLT Script |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <html> <body> <h2>Activity Logs</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Type</th> <th>Name</th> <th>Start Time</th> <th>End Time</th> <th>Success</th> <th>Failed Target Rows</th> <th>Success Target Rows</th> <th>Failed Source Rows</th> <th>Success Source Rows</th> </tr> <xsl:for-each select="ActivityLogResponse/entries/ActivityLogEntry"> <tr> <xsl:if test="success != 1"> <xsl:attribute name="style">background-color:#FFCCCC;</xsl:attribute> </xsl:if> <td><xsl:value-of select="type"/></td> <td><xsl:value-of select="objectName"/></td> <td><xsl:value-of select="startTime"/></td> <td><xsl:value-of select="endTime"/></td> <td><xsl:value-of select="success"/></td> <td><xsl:value-of select="failedSourceRows"/></td> <td><xsl:value-of select="successSourceRows"/></td> <td><xsl:value-of select="failedTargetRows"/></td> <td><xsl:value-of select="successTargetRows"/></td>
</tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> |
- Row Limit (Activity Log). Enter the number of rows you want returned from the activity log.
Additional Notes:
- In some cases the output file might get truncated. If this happens delete the output file, edit and save the task, and run the task again.
- If you don’t want to use the source file for storing a clear-text password, you can encrypt the password and decrypt it in the template. You can also code the password inside the template.
Comments