You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I'd like to create a configuration file allowing me to configure the links between the input data and the output data in a tMap component.
For example, I have a fieldA in the input data that is linked to the fieldB of the output data. But I want to allow my application being configurable allowing, per example, later, to link the fieldA of the input data to the fieldC of the output data rather than the fieldB thanks to a configuration file and not by using Talend to modify the link.
Is that possible to configure the link relation between the input data and the output data of the tMap component or for others components thanks to a configuration file or by another way without using Talend to modified the link later ?
Thanks for your reply.
Offline

Nobody has an answer about this subject ?
I just want to know if it is possible for the moment ?
Thanks.
Offline

You can use a context variable and test it in your output expression fields such as:
In your expression field B:
context.isFieldA_linkedTo_FieldB ? input.fieldA : null
and in your expression field C:
! context.isFieldA_linkedTo_FieldB ? input.fieldA : null
What do you think about this solution ?
Offline

Thanks for your reply.
But I t think that it would help me only partially because the links created with your expressions is writting in hard thanks to Talend.
I want to link the input and output fields dynamically thanks to a file within which is described the relations between the fields (a configuration file).
Per example, here is an exemple of configuration file describing the relation between the input fields and the output fields :
InputField; OutputField
firstname; input.firstname
lastname; input.lastname
...
And if I will decide to modify the input field corresponding to the output field, I want to modify the file configuration like that :
InputField; OutputField
name; input.firstname
description; input.lastname
...
Do you understand what I mean ? And is it possible to do that ?
Thanks for your replies.
Offline

I understand you, and you can't use an external conf file to do this.
Therefore, I don't know a way to do it, indeed job should be recompiled to take account of modifications.
Offline

OK, that is what I was thinking about.
Thanks for your reply.
Offline
Pages: 1