How can we lookup row value with Column attributes names

Six Stars

How can we lookup row value with Column attributes names

Hi All,

 

we are receiving data from the different source systems, one table having KPI data another one having KPI data along with attributes name as column data. please advise how can I lookup rows data with column attributes name in the 2nd table.my target is HDFS

 

I have uploaded sample data format of my input and output, please have a look and assist how to archive this requirement ??

 

Regards,

Avinash


Accepted Solutions
Six Stars

Re: How can we lookup row value with Column attributes names

Thanks for your suggestion, I able manage to process the data using tUnpviotRow.

 

Regards,

Avinash

View solution in original post


All Replies
Highlighted
Seven Stars

Re: How can we lookup row value with Column attributes names

Assuming your input columns are not gonna change dynamically, Something like this can be done,

 

Since there is no joining column in your input files, there is no join in the tmap expression.

tmap_2.png

However we can use a ternary operator in the expression to get the desired result,

opExpression.PNG

Hope this helps.

Six Stars

Re: How can we lookup row value with Column attributes names

Thanks for your suggestion, I able manage to process the data using tUnpviotRow.

 

Regards,

Avinash

View solution in original post

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now