how to set dynamic column in talend

Four Stars

how to set dynamic column in talend

Hi,
I am newbie  using talend,
I want to get cleared in dynamic column concept.I had read many posts on dynamic schema but I still I am confused.
Pls anyone help me in understanding this concept.
Fore example,
id;name;status
1;dev;wk
2;diya;wk
3;priya;nwk
4;shiva;wk
5;guna;nwk

id;name;age
1;dev;23
2;diya;24
3;priya;23
4;shiva;21
5;guna;25

id;age;status
1;23;wk
2;24;wk
3;23;nwk
4;21;wk
5;25;nwk

but my output should have id,name,status,age as constant schema.
Any suggestions.......thanks in advance..

Thanks
AKRISH

Moderator

Re: how to set dynamic column in talend

Hi AKRISH,

Talend Dynamic Schema feature allows you to design schema with an unknown column structure (unknown name and number of columns).
Please have a look at KB article about: TalendHelpCenter:How to process changing data structure?
Note:


The dynamic schema functionality is only available in Talend enterprise subscription version not open source.


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.
Four Stars

Re: how to set dynamic column in talend

Hi Sabrina,
Thanks Sabrina for your instant reply....
I had already gone through the same link provided by you in another post but still I couldn't get into the concept and implement on my job described above.
I tried with tfilelist,tfileinputdelimited, tmap (or) tjavarow,tlogrow components with context variables but it throws error.
Could you pls explain me the procedure to solve this job.

Thanks 
Akrish
Ten Stars

Re: how to set dynamic column in talend

You don't need the Dynamic Schema functionality to do what you want to do. So if you are using Open Studio, it is still possible. I have written a tutorial (with an example job) on how to achieve this here.
Four Stars

Re: how to set dynamic column in talend

Hi Rilhia solutions,
Thanks for your suggestion...
My Output should be 
id;name;status;age
1;dev;wk;null
2;diya;wk;null
3;priya;nwk;null
4;shiva;wk;null
5;guna;nwk;null
id;name;status;age
1;dev;null;23
2;diya;null;24
3;priya;null;23
4;shiva;null;21
5;guna;null;25

id;name;status;age
1;null;wk;23
2;null;wk;24
3;null;nwk;23
4;null;wk;21
5;null;nwk;25

Thanks 
Akrish
Ten Stars

Re: how to set dynamic column in talend

This will work. If you know the expected column headings and they appear at the top of each file, this solution will work. Obviously it will need to be slightly reworked to suit your data.

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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog