top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

how to create a new record dynamically using informatica powercenter

0 votes
411 views

I have employee's leaves related data and payment related information. e.g. Employee E1 has taken maternity leave this year. She needs to paid for 6 months and if she is on leave for greater duration (like 8 months) , I need to create two records for her.

One for the allowed duration and the other for extended duration.

Employee  LeaveStartDAte  LeaveEndDate Total_days_taken  Total_days_allowed LeaveType
e1         1Jan2013       31Aug2013     242                 186                 ML

Target expected :

Employee  LeaveStartDAte  LeaveEndDate Leavetype
e1        1Jan2013        30June2013     ML
e1        1July 2013      31Aug2013      Extended ML

How can create the second record dynamically in informatica mapping?

posted Jul 9, 2014 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Generally speaking, we use java transformation in informatica to dynamically create new rows. However, for scenarios like the one you described, where you only need to create one extra row based on some condition you can achieve this by adding two target instances and populating the second target instance conditionally (using a router or filter transformation).

You can do something like this:

Create two sets of ports for LeaveStartDate, LeaveEndDate and LeaveType in an expression, and calculate their values accordingly. For example:

LeaveStartDate1 -> source LeaveStartDate
LeaveStartDate2 -> LeaveStartDate + Total_days_allowed + 1

Now connect first set of ports directly to a target instance. Connect the second set of ports to another target instance through a filter. The filter condition would be something like Total_days_taken > Total_days_allowed. You can also do this using a router, if you like.

answer Jul 10, 2014 by Shweta Singh
Similar Questions
+2 votes

When we do not know the number of targets, Can we create the targets at run time using informatica Powercenter.

Suppose we have below source:
Employee:

Dept_ID      EmpName  Sal
10           A        200
11           B        100
10           C        200
10           D        400
12           E        500
12           F        400

...

It can have any number of distinct Dept_ID. I want to load all EmpName and Sal of a particular Dept_ID into a separate target table (i.e target name should be as Tar_10 or Tar_11 where 10 & 11 are Dept_ID).

+1 vote

I have a Column (SALARY) in Source Table from Relational DB, for example 15000 is a record in SALARY column and I want to format it as $15,000.00 into the Target table which is a Relational DB using Expression Transformation.

Thankyou

+2 votes

How can we update a record in target table without using Update strategy?

0 votes

Teradata : JANUVIA - 50MG – TABLET - 1 BLISTER - 28 TABLET (28.TA) ORacle: JANUVIA - 50MG ? TABLET - 1 BLISTER - 28 TABLET (28.TA)

We are using code page 'ms windows latin 1 (ansi) superset of latin1' for source connection i.e. Teradata.

We are using code page UTF 8 for target

...