Mapping Dynamic Schema to a Fixed Destination Schema

One Star

Mapping Dynamic Schema to a Fixed Destination Schema

Hello,

I am taking input from different files using FileInputDelimiter Component (leaving the schema Dynamic ). Now i want to Map this Schema to the destination schema. For this i have a file which defines what(column name) should be mapped to what(Column name).

How do I achieve this? Please let me know if it is possible using Talend.
Moderator

Re: Mapping Dynamic Schema to a Fixed Destination Schema

Hi,

If I understand you well, your input files are:
file1:
Class;Name;Subject;marks
8;abcd;maths;90
8;pqrs;phy;92
8;xyz;chem;87
file2;
Class;StudentName;Subjects;Score
9;monp;math;98
9;imn;bio;88

and the expected result output is:
name;subjob;marks_scored;
abcd;maths;90
pqrs;phy;92
xyz;chem;87
monp;math;98
imn;bio;88 ?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Mapping Dynamic Schema to a Fixed Destination Schema

For output it is "sub" not "subjob".
rest everything is correct. I want to Map it using a lookup file (reference file).
Moderator

Re: Mapping Dynamic Schema to a Fixed Destination Schema

Hi,

Actually, it is "Unite" not "LookUp". You can use tMap to rename both your Schema Name then unite them by TalendHelpCenter:tUnite.
Or read two tFileInputDelimited components into one tFileOutputDelimited with "Append" option(output file will not include header)

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Mapping Dynamic Schema to a Fixed Destination Schema

But that doesn't satisfy the need. I need is to design a job which maps input schema (which will be dynamic) to a destination schema which is defined in Job. I wanted to do the mapping dynamically using a file where i can give the mapping relation. As shown in above images.
Can we achieve this using "Unite"?
Seventeen Stars

Re: Mapping Dynamic Schema to a Fixed Destination Schema

You can do this with the components from Talend Exchange tFileInputTextFlat. This component allows to reconfigure the position of a column by the header line and you can match the schema column to the file column with regex expressions as header name.
The same is possible with Excel files with tFileExcelSheetInput from Talend Exchange.
One Star

Re: Mapping Dynamic Schema to a Fixed Destination Schema

Thank you,
I will give it a try.
Really appreciate the help.

Thanks!
One Star

Re: Mapping Dynamic Schema to a Fixed Destination Schema

If the input files have the same structure but different column names, you can use any name in your schema for the columns in input files and map them to the output.
So you could have standard names such as Class, Name, Subject, Score.
The data will still map to these as it's a delimited file.
One Star

Re: Mapping Dynamic Schema to a Fixed Destination Schema

I am having same requirement, so is there any solution?
Moderator

Re: Mapping Dynamic Schema to a Fixed Destination Schema

Hi yaser71180,

Here is a related forum https://community.talend.com/t5/Design-and-Development/resolved-Generic-Talend-Job/m-p/92354. Hope it will be helpful for you.

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER 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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog