Hi I have a source (flat file) like



ID Name Attachments

101 abc [07012005072902]_CMM27-11-01 Page106
(2).pdf

102 bcd "[19012005124259]_Anfrage-Vendors.doc
[19012005124336]_Anfrage.xls"

103 def "[19012006092602]_IMG_0310.JPG
19012006092631]_IMG_0311.JPG [19012006092702]_IMG_0312.JPG
[19012006092727]_IMG_0313.JPG"



But I need to generate duplicate records based on
attachments column.



Target (Table) like



ID Name Attachments

101 abc [07012005072902]_CMM27-11-01 Page106
(2).pdf

102 bcd 19012005124259]_Anfrage-Vendors.doc

102 bcd [19012005124336]_Anfrage.xls

103 def [19012006092602]_IMG_0310.JPG

103 def [19012006092631]_IMG_0311.JPG

103 def [19012006092702]_IMG_0312.JPG

103 def [19012006092727]_IMG_0313.JPG

103 def [19012006092750]_IMG_0314.JPG

103 def [19012006092814]_IMG_0315.JPG





Here no. of Attachments we can't decide because it is
dynamic.



It will be great if somebody help me on this.





Thanks in Advance.
ganga

Answers were Sorted based on User's Feedback



Hi I have a source (flat file) like ID Name Attachments 101 abc [070..

Answer / sreepathi

Well make the (id, attachment) as unique or primary key
instead of id being primary key. Hope this solves you
problem, if not come out with clear requirement.

Is This Answer Correct ?    0 Yes 1 No

Hi I have a source (flat file) like ID Name Attachments 101 abc [070..

Answer / zer0

As far a i understood ur scenario u need each attachment
with its ID and name.

For this you can have a simple mapping made in Informatica.

SQ ----> Expression ----> Target

In Expression create the following:

Input/Output Port: ID
Input/Output Port: Name
Variable Port: Attachments_var1 ---> CHR(32) || TO_CHAR(ID)
|| CHR(9) || Name || CHR(9)
Variable Port: Attachments_var2 ----> REPLACESTR
(0,Attachments,CHR(32),CHR(10) || Attachments_var1)
Output Port: Attachments_out -----> REPLACECHR
(0,Attachments_var2,CHR(32),'')

From expression output the fields to target (Flat File),
you might get your answer

Note: the first record has a space in the attachment name,
that needs to be looked into

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Informatica Interview Questions

Why is meant by direct and indirect loading options in sessions?

4 Answers  


What is a taget load order?

2 Answers   IBM,


how to get the first row without using rank t/r?

7 Answers   iGate,


Converting Rows to columns I have Relational source like his. JAN FEB MAR APR 100 200 300 400 500 600 700 800 900 100 200 300 I need to convert these rows into columns to the targe. MONTH TOTAL JAN 1500 FEB 900 MAR 1200 APR 1500 Please experts help me

5 Answers   HP,


Difference between Data and Index Caches?

0 Answers   Informatica,






In a concurrent batch if a session fails, can you start again from that session

1 Answers  


Explain one complecated mapping?

3 Answers   Fidelity, Wipro,


What are the unsupported repository objects for a mapplet?

1 Answers   Informatica,


MY SOURCE IS LIKE THIS VENKATESH,101||RAJESH,102||SIVA,103||SWATHI,104 MY REQUIRMENT IS NAME ID VENKATESH 101 RAJESH 102 SIVA 103 SWATHI 104 PLEASE PROVIDE ME THE SOLUTION

4 Answers  


What is an expression transformation?

0 Answers  


What are the Differences between connected and unconnected lookup?

6 Answers   TCS,


What is the approximate size of data warehouse?

6 Answers   Accenture, i3 Solutions,


Categories