Categories
Video

Informatica Scenario Converting Rows into Columns:Best Two approaches explained



The Video Demonstrates a scenario where the Source contains the scores of three students in three subjects in below format.
ID Name Subject Score
100 Vivek Science 50
100 Vivek Maths 50
100 Vivek English 70
200 Amit Maths 80
300 Ankit Maths 40
200 Amit Science 70
300 Ankit Science 80
200 Amit English 60
300 Ankit English 60
It explains how we can display the scores of students in cross tabular format using pivot in Source qualifier query or using expression and aggregator in case if source is flat file
#InformaticaPowercenter #Informaticatutorials #Techcoach

source

19 replies on “Informatica Scenario Converting Rows into Columns:Best Two approaches explained”

Hello Everyone,
I have a doubt regarding Informatica Real Life Scenario.
I have a .csv file in the below Format:

Scenario 1:

DEAL_ID NAME SCENARIO DIFF
1 IND 1 1000
1 IND 2 500
1 IND 3 800

How to load this data in my Target Table.The structure for Target Table is:

DEAL_ID NAME DIFF_1 DIFF_2 DIFF_3
1 IND 1000 500 800

Based on DEAL_ID and NAME, I need to load DIFF in my respective columns

Scenario 2:

Further,There may be chance that distinct NAME will come,like

DEAL_ID NAME SCENARIO DIFF
1 IND 1 1000
1 USD 2 500
1 IND 3 800

In this case,My Target Table should look like:

DEAL_ID NAME DIFF_1 DIFF_2 DIFF_3
1 IND 1000 – 800
1 USD – 500 –

Please let me know,how to resolve in single Informatica Mapping.

THanks in Advance for your help.

Hi Vivek, I have a table with columns email and salary. I am using pivot query but its not working.

select * from emp_s6
pivot (sum(salary) for email in ('Steven','Neena','Lex','SKING','NKOCHHAR','LDEHAAN'));

can you please tell me whats wrong with this query.

Scenario –
Source :
Flat File/Database table
EMPINFO.txt
Anvir
3010
softlink solutions
1500000
Pratham
7010
Wallmart
2400000Target File/Target table
EMPNAME,EMPID,COMPANYNAME,SAL
Anvir,3010,softlink solutions,1500000
Pratham,7010,Wallmart,2400000Could you please create a vedio to get the desired output via informatica and SQL

I have teams called A1,A2,A3,A4. Lets say this is static table with one column. they need to play with each other. But I don't need a duplicate .i.e. A1 vs A2 or A2 vs A1 is same.
I want only one of them.

I think subject should be "Converting multiple Rows to one Row", because its just opposite to Normalizer and there we were "Converting Row to Multiple Rows". this will not create any confusion and anyone can easily remember what needs to be done in which case…

Leave a Reply

Your email address will not be published. Required fields are marked *