I have 4 columns in a table say, name ,address, salary and
city. So based on distinct city names, i need to combine
the other data and send it to a flat file. Distinct city
names can be 4 or 5 or 6. So it has to dynamically generate
flat files(4 or 5 or 6) corresponding to the city names.

Answer Posted / ankit kansal

steps:-
1)Bring source and target into a mapping
*remember to check the target file name option in target analyzer window for that target.
2)sort your data on the basis of city.
3)In expression transformation
o_flag-----o---IIF(prev_city=city,0,1)
prev_city--v---city
o_file_name--o--city
*remember the order must be same
4)Take Transaction Control
IIF(o_flag=1,TC_COMMIT_BEFORE,TC_CONTINUE_TRANSACTION)


i hope it helped you.

http://deepinopensource.blogspot.in/

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.

766


How we can create indexes after completing the loan process?

710


What are the various types of transformation?

629


Different sorts of metadata that stores in the storage facility?

544


How can we create index after completion of load process?

587






Parameter and variable differences

1606


What is option by which we can run all the sessions in a batch simultaneously?

651


How do you set a varible in incremental aggregation

1430


How to do the error handling of if ur source is flatfiles?

1491


I have three same source structure tables. But, I want to load into single target table. How do I do this? Explain in detail through mapping flow.

759


What is the difference between informatics 7x and 8x and what is latest version?

530


If i have source as flat file. how can i store the header and trilor into one target and data into one more target. |------>target1(header+trailor) source------ |------>target2(data) can any one please help me

1541


Explain pmcmd command usage in informatica

691


Explain the different dimensions.

540


wf dont have integration severances how you can run?

1526