I have a flat file, in which i have two fields, emp_id,
emp_name. The data is like this,
emp_id,emp_name
101,soha
101,ali
101,khan
102,siva
102,shanker
102,reddy.
how to merge the names so that my output is like this
Emp_id Emp_name
101 Soha ali kahn
102 siva shenkar reddy
please provide solution
Answer Posted / nanda
In expression transformation take a variable port, lets say
v_emp_id and equate it to emp_id,
take one more variable port for calculation as v_cal
and write a expression in v_cal as
v_cal= iff(emp_id=v_emp_id, emp_name||v_cal, emp_name)-----
----- (1)
take an output port O_emp_name and
O_emp_name = v_cal
write the following as shown in the expression
transformation, i meant the order of ports and their
corresponding values
emp_id
emp_name
v_cal the (1) expression
v_emp_id emp_id
O_emp_name v_cal
send the output ports to aggregator and in aggregator
take a output port O_agg_emp_name
emp_id
emp_name
O_emp_name
O_agg_emp_name = last(O_emp_name)
send the emp_id and the O_agg_emp_name to the target
and thts it
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is diff b/t sorter t/r and agg have the option sorter property...
wf dont have integration severances how you can run?
Why sorter is an active transformation?
Explain incremental aggregation in informatica
scenario where i can use only concurrent execution of workflow.
what is mean by complex business rule ?
What are the new features of informatica 9.x in developer level?
Explain dynamic target flat file name generation in informatica
What is option by which we can run all the sessions in a batch simultaneously?
Explain target update override in informatica
can we override a native sql query within informatica? Where do we do it? How do we do it?
What are the restrictions of union transformation?
Hello, Can you please send the admin and advanced mapping design sample questions to ns_sharmin@yahoo.com?
Hi, I saw one mapping implemented by my seniors . In Expression transformation they implemented following logic. That is iif(is_date(in_UC_DATINV,'YYYYMMDD'),to_date(in_UC_DATINV,'Y YYYMMDD'),'Inventory Date is either invalid or null') Inventory_Date is validated only for is_date() But not validated for notisnull() . But error says “ either invalid or null “ why? Whether is_date() also check for not isnull() ? or in this logic something is different ? Please answer me . Advance thanks
How do you load first and last records into target table?