Informatica Truncate Target Table

In the Target Table session properties there is an option to Truncate existing data before loading. It is important to realize Informatica does not always use the TRUNCATE function to clear the table, sometimes a DELETE statement is issued, this decision is made at runtime depending on different factors, noted in the table below.

Web Service Consumer for JDE BSSV Customer Manager - processCustomer

Calling JDE Business Services (BSSV), aka Web Services, can be tricky and there is little information on Oracle's or Informatica's website showing how. In fact, importing the JDE CustomerManager.wsdl into an Informatica web service consumer creates a large confusing, near impossible to understand transformation.

Here's a high level overview to create a usable JDE 9.0 Customer Manager BSSV, be aware your requirements may be different and you may have to deviate from these steps to fit your need.

Scheduled Workflow Fails But Completes when Ran Manually

Here's a solution to an obscure issue. A workflow/session completes successfully when ran manually but gives error LM_44127 Failed to prepare the task when ran from the scheduler.

If you are using Versioning, ALL objects must be checked in. Use the option Versioning > Find Checkouts to see any checked out objects. Check in all objects.

Also, IMPORTANT, if using shortcuts for sources, targets or transformations, the objects the shortcuts are copied from must also be checked in, look in the folder(s) where the shortcuts where copied from, make sure those are also checked in.

Data Integration Hub Errors

This page will be a running list of tips and workarounds for Data Integration Hub 10.

Data Integraton Hub DX_ETL DateTime Precision Issue

This issue was found in Informatica Data Integration Hub 10 on Windows Server 2012 using SQL Server 2012 as the Repository.

The PowerCenter Workflow DX_ETL can abort in mapping m_SET_CURRENT_CUTOFF giving the errors:

  • Timestamp parameters with a scale, must have a scale less than ten and a precision equal to 20 plus the scale. You specified a precision of 999 and scale of 9.
  • Fractional second precision exceeds the scale specified in the parameter binding.
Here are some steps you can take to correct this problem. Some or all of these steps may be required to correct the issue.

Formatting Telephone Numbers

I created this simple PowerCenter mapplet to format phone numbers. Informatica Developer (IDQ) may have a different or easier way to do it but I wanted something I could use in PowerCenter without the hassle of maintaining a separate object in IDQ and having to import it into PowerCenter. You can alter the mapplet to format other data like postal codes, SSNs, etc.

Download the mapplet and give it a try.

Mapplet Overview

My approach is a simple one, take the phone number, remove all special characters, then reformat the number with dashes as 999-999-9999. This approach allows me to ignore how the phone number comes into the mapplet, for example partially formatted , not formatted or formatted correctly but not how I need it.

The mapplet's input is the telephone number without a country identifier. In addition to the reformatted phone number, the mapplet also outputs:

  • a Pattern (example xxx-xxx-xxx) based on the input number (this could be used for a quick/dirty data profiling)
  • the phone number parsed into its parts, area code, central office
  • the length of the input phone number

Read further to see detail on the mapplet works.

Limit Extracts from SAP Tables Using Mapping Parametes

When extracting large tables from SAP, you can limit the amount of data selected by using Informatica parameters.  Here are two examples.

  1. Use a parameter to limit the extract to retrieve only a specified set of data. Your target uses a truncate and load scenario.
  2. Use parameters as in the example above but also use a persistent cache lookup on the target table. Append new rows to the table.

Diary of an Informatica 9.6.1 HF1 Install

Here are some notes on an Informatica PowerCenter 9.6.1 64 bit server install.  This also includes the setup of the Informatica Cloud Secure Agent (64)

Most of the install went smooth.  However I want to list some of the problems I encountered.

VBScript to Convert Excel to CSV

Using Excel files as the source for Informatica mappings can be more trouble than it's worth. You have to setup a connection and name a range in the Excel document which can be difficult to maintain. I much prefer to read text or CSV files, they're simpler to work with and less error prone. I created a VB script for the purpose of converting Excel to CSV.

Querying the Repository

Here are some SQL scripts you can use to query the repository. Most of these I got from an Informatica employee, others I put together. Use them as a base to create your own queries or reports.

One word of caution, use a profile with READ ONLY permission to access the repository and NEVER update the repository using SQL unless advised to do so by Informatica support.

Using pmrep to import an Informatica folder

Here’s the companion script for the “Using pmrep to export an Informatica folder” article. Use this script to import objects into PowerCenter.

One use for scripting an import would be to schedule it during off hours, for example moving development code to production during off hours. You may also need to export some objects, then do a "mass change" or Find/Replace on the XML file, then export them back in (for example, export all sessions, find/replace a connection).

Managing Connections using Parameter Files

Try this tip for managing PowerCenter connections.

Parametrize connections and use one parameter file to define them. Use the one parameter file in all your workflows. This will bring consistency to development and make it easy when connection changes are required.

VBScript to Combine Multiple XLS Files into a Single File

Here's a companion tip to the "VBScript to convert CSV to XLS" post.

This script will combine two Excels files into one workbook. The files will be treated as separate worksheets inside the workbook. The worksheet names will be the same as the file names.

You may find this useful when an Inforamtica process outputs multiple flat files and you have converted them into native Excel format but only wish to present one file to the end user (or for archiving or reporting purposes).

The Transaction Control

Here is a sample mapping to illustrate how the Transaction Control transformation can dynamically create multiple flat file outputs, each with a unique name and data set.

The mapping reads a source table whose key is “Group Id”, and outputs a separate target file for each Group Id data set. The file names are also generated dynamically based on the Group Id.

Using a web service to send e-mail

Informatica allows options for sending email at the session level (on Session Success or Failure) but there is not a standard way to send email from the mapping. By using a web service (written in a third party language such as .Net or Java) to send email, you can generate email from a mapping based on conditional logic and include relevant "pipeline" data in the email body. An additional advantage, if you are using HTML email, you have unlimited options to format the body of the email.

Unschedule Workflow Script

Here is a technique that can be used to unschedule workflows automatically or conditionally. This process uses the pmrep command to unschedule any workflows specified in a CSV file.

I have a copy of this workflow scheduled on our development server using the scheduling option "Run on Integration Service initialization". I do this because any restart of the Informatica service will “re-schedule” unscheduled workflows.

The workflow runs one mapping and calls one command task.

Session Failure emails

Here is a reusable email task you can use for the “On Failure E-Mail” property for any Informatica session. If the session fails an email is sent to an address you specify. The content of the email is generic but you get all relative information about the session’s failure, plus the session log as an email attachment.

Download the task and import it into a PowerCenter folder. Next set the “On Failure E-Mail” for a session to "reusable" and chose the email task.

Assign Object Permissions - pmrep AssignPermission

Note: This tip is part of a series on administration scripts.

These scripts automate the process to grant permissions to PowerCenter Folders, Connections and Query objects. In my company’s PowerCenter development environment, we allow each developer to access all folders and connection objects. Our security structure is designed so all developers are in a security group, these scripts grant access to the security group.

We use this process because if a developer creates a new folder and does not grant access to the developer security group, other developers will not have access to the folder. We run these scripts daily so new folder, connection and query objects are accessible to everyone.

Sequence Number Generation

The Sequence Generator transformation is great sometimes but I cannot find a way to reset the generated sequence based on external conditions. For example, when a value in the current row is different from the value in a previous row, I would like to reset the Sequence number.

Using some information I found on Informatica’s Knowledge base, I created a reusable Expression that will increment or reset a counter (sequence number) based on an input port's value. The counter will increment when a chosen input port's current row is equal to the previous row and reset the counter when the current row's value does not match the value from a previous row.

A Script For Informatica Repository Backups

Summary:   This tip will show you how to augment the pmrep command's backup function with environment variables to dynamically create the backup file names.  I've included a visual basic script that can be used to delete old backup files from any folder.  The result is a script you can schedule on your Windows server for unattended repository backups.

  • An example backup script and the visual basic script to delete files based on age can be downloaded here.
  • To fully utilize my example script you should be using the techniques described in my post about using Server Environment Variables