Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
shalinim1
Contributor III
Contributor III

How to convert rows to column?

Hi,

I have a table which consists of column_from, column_to, conversion_rate. For example,

INR,USD,0.014

INR,EUR,0.011

INR,GBP,0.012

INR,CAD,0.018

INR,INR,1

USD,INR,74

I have connected to main table by joining with column_from in tmap component. I want to convert column_to rows as columns. so that I can use them in my job for currency conversion.

Labels (2)
8 Replies
Ravi_Rajagopal
Contributor III
Contributor III

What is the source of your data? If the source is a database, please share with me the SQL which you are using.

shalinim1
Contributor III
Contributor III
Author

@Ravichandran Rajagopal​ This is the main table

0693p00000AFQ0YAAX.png

vikramk
Creator II
Creator II

Hi @Shalini M​ ,

Please would you mind confirming whether my understanding correct or not.

Your requirement is to bring your "column_to" rows as columns in the output?

Would it be possible to give the desired end output here. it would help to understand accurate.

shalinim1
Contributor III
Contributor III
Author

Yes @Vikram Kumar​ , I want to make 'column_to' rows as columns.

And the output should be like

If the input currency type of price column is INR, I have to convert it into USD,GBP,EUR and so on.. and load that price which is converted into a table.

Ravi_Rajagopal
Contributor III
Contributor III

Can you put the expectation in an excel spreadsheet and post that in here please?

Ravi_Rajagopal
Contributor III
Contributor III

Is this your expectation?

0693p00000AFRYrAAP.jpg

shalinim1
Contributor III
Contributor III
Author

Yes @Vikram Kumar​, Instead of Price and Total_price column.. Price_usd, Price_gbp.. TotalPrice_usd and so on have to be loaded

Ravi_Rajagopal
Contributor III
Contributor III

You can do this entire computation in a tMap component