Not applicable

[resolved] ReadURL function datamapper using context variable

Hi,
I have a map in data mapper reading files with ReadURL function.
This file name depends on the environnement so I want to build it from context data.
Unfortunately it looks like it is not planned (In WriteURL function on the other hand there is a parameter URL that enable that using GetMapProperty function).
In help documentation, I can read:
"To process multiple Source or Result objects use the ReadUrl or WriteUrl functions. In this case, it's not necessary
to specify the URL. You can assign the Source or Result objects using the MapExecutionContext.addInputSource()
or MapExecutionContext.addOutputResult() methods. This allows multiple Java objects to be read or written in
a single map execution for example."
But I have no idea where and how I have to do that. An example would be very helpful.
Regards.
Eric
1 ACCEPTED SOLUTION

Accepted Solutions
Not applicable

Re: [resolved] ReadURL function datamapper using context variable

Hi,
I found a solution using ${context.variable} in the READURL function.
Eric
3 REPLIES
Moderator

Re: [resolved] ReadURL function datamapper using context variable

Hi,
Have you already checked documents about:TalendHelpCenter:Read Functions and 
TalendHelpCenter:Write Functions?
Would you mind setting an example for your use case?
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.
Not applicable

Re: [resolved] ReadURL function datamapper using context variable

Hi,
I found a solution using ${context.variable} in the READURL function.
Eric
Moderator

Re: [resolved] ReadURL function datamapper using context variable

Hi,
Thanks for your feedback and sharing your solution with us.
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.