Four Stars

automatic Mapping between tmysqlinput and tmysqloutput

hello evrybody

 i have a TmysqlInput which setting is fixed by context variables

and i have a tmysqloutput and tmp

i'm seeking for a way (if it's possible)to do the mapping between tmysqlinput and tmysqloutput without opning the tmap and doing the classic mapping 

pelease help

12 REPLIES
Seven Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

hi Hamaz,

are your both input and output tables schema are same?

If yes. you can directly map you don't need a Tmap here if the schema and database type is same.

you can verify the schema in target component schema. you find a edit schema there you can see your input and output schema gets displayed.

Thanks,
Sid
Please give a Kuto to the post if it is useful
Please put to resolved if it solves your issue.
Thanks,
Sid
Mark as solution if this resolved your issue
Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

No the databese is the same but i want to store in different table

Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

also i want to specify which coloums to be mapped , in an automatic way

Seven Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

If it is schema is different you have to use Tmap for mappings columns.

It cannot be done in automatic way, if you dont want to use tmap use tJavarow between source and target and you can reassign the fields as per your requirement.

But i suggest use tmap easy to manage your code.

Thanks,
Sid
Please give a Kudo to the post if it is useful
Please put to resolved if it solves your issue.

Thanks,
Sid
Mark as solution if this resolved your issue
Twelve Stars TRF
Twelve Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

But if you need a tMap automagically completed because of the number of fields, I'm afraid it's not possible to do what you expect.

 


TRF
Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

if there is way without tmap then it will be fine too 

Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

how can i do the mapping with javacode using tjavarow

Seven Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

You can connect tmysqlinput--->tjavarow--->tmysqloutput

 

In tjavaRow, Get source schema from input component and target schema from output component. Then click on "Generate Code" property in tJavaRow component, once it generates the default code with output fields gets assigned to input fields. you can change the field assignment as per your field mapping.

 

Note: Don't click on "Sync Columns" property in tJavarow. get schema from source and targets as per the above statement. 

 

Thanks,
Sid
Please give a Kudo to the post if it is useful
Please put to resolved if it solves your issue.

 

12.JPG13.JPG

Thanks,
Sid
Mark as solution if this resolved your issue
Twelve Stars TRF
Twelve Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

@Hamzahaj can you explain why you don't want to open the tMap configurator?


TRF
Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

Hello Sid4U

i tried that

and it work only when i precise the shema both on the input and the output

the probleme is i want to find a way to generate shema and field manually by javacode because i want to make my job as an api that

can be connected to any external database with an unkonwn  structure and then i store the date in my own database

Twelve Stars TRF
Twelve Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

Dynamic schema is a functionality provided by subscription version

 


TRF
Four Stars

Re: automatic Mapping between tmysqlinput and tmysqloutput

Hello TRF

i have just downloaded the subscription version of talend Data Integration and I have a free licence for 30 day

would you mind giving me a way to generate the schema dynamically please

thank you very much