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
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 |
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 |
What are the different options used to configure the sequential batches?
What are the differences between a connected lookup and unconnected lookup?
Explain where to store informatica rejected data? How to extract the informatica rejected data?
what is incremental loading ?
12 Answers CTS, IBM, Oracle, TCS,
How to extract sap data using informatica?
There are 2 files, Master and User. We need to compare 2 files and prepare a output log file which lists out missing Rolename for each UserName between Master and User file. Please find the sample data- MASTER.csv ---------- Org|Tmp_UsrID|ShortMark|Rolename ---|---------|----------|------------ AUS|0_ABC_PW |ABC PW |ABC Admin PW AUS|0_ABC_PW |ABC PW |MT Deny all GBR|0_EDT_SEC|CR Edit |Editor GBR|0_EDT_SEC|CR Edit |SEC MT103 GBR|0_EDT_SEC|CR Edit |AB User USER.csv -------- Org|UserName|ShortMark|Rolename ---|--------|---------|------------ AUS|charls |ABC PW |ABC Admin PW AUS|amudha |ABC PW |MT Deny all GBR|sandya |CR Edit |Editor GBR|sandya |CR Edit |SEC MT103 GBR|sandya |CR Edit |AB User GBR|sarkar |CR Edit |Editor GBR|sarkar |CR Edit |SEC MT103 Required Output file: --------------------- Org|Tmp_UsrID|UserName|Rolename |Code ---|---------|--------|------------|-------- AUS|0_ABC_PW |charls |ABC Admin PW|MATCH AUS|0_ABC_PW |charls |MT Deny all |MISSING AUS|0_ABC_PW |amudha |ABC Admin PW|MISSING AUS|0_ABC_PW |amudha |MT Deny all |MATCH GBR|0_EDT_SEC|sandya |Editor |MATCH GBR|0_EDT_SEC|sandya |SEC MT103 |MATCH GBR|0_EDT_SEC|sandya |AB User |MATCH GBR|0_EDT_SEC|sarkar |Editor |MATCH GBR|0_EDT_SEC|sarkar |SEC MT103 |MATCH GBR|0_EDT_SEC|sarkar |AB User |MISSING Both the files are mapped through Organization, Shor_mark. So, based on each Organization, Short_Mark, for each UserName from User.csv, we need to find the Matching and Missing Rolename. I am able to bring Matching records in the output. But really I don't find any concept or logic to achieve "MISSING" records which are present in Master and not in User.csv for each UserName. Please help out guys. Let me know if you need any more information. Note:- In User.csv file, there are n number of Organization, under which n number Shortmark comes which has n number of UserName.
What is joiner transformation in informatica?
How to differentiate between the active and passive transformations?
What is data quality? How can a data quality solution be implemented into my informatica transformations, even internationally?
what is difference between COM & DCOM?
Can any one give me a real time example for FACT TABLE & DIMENSIONAL TABLE?
following source name gender ramya female ram male deesha female david male kumar male i want the target male female ram ramya david deesha kumar any body give solution above question?