[Input for tREST URL]

One Star

[Input for tREST URL]

We are using Open Studio for DI as an ETL solution for migration
We invoke a web service using tREST (no WSDL - so we CANNOT use tWebServiceInput) and extract XML based on XPath queries defined in tExtractXMLField - we then use tMAP to pass on the result to a csv file - which in turn gets sFTPd over to a local server. See Diagram 1

There is an additional change we are looking to make:

Our goal is to APPEND further input to that URL in the tREST configuration (see attached diagram 2) - this input IS AN ID that will be ADDED AT THE END OF THE EXISTING URL
What is the best way to go about this ?
One option is to add a variable to the context (see attached diagram 3) and THEN APPEND this variable to the URL.
However, we need to figure out a way to do this WITHOUT READING FROM THE COMMAND LINE.
SO >> We want to read this variable instead from a XML or a CSV file. How exactly would we accomplish the transfer of variable values for one of the two options from diagram 4 ?

Thanks
-A
One Star

Re: [Input for tREST URL]

Hi
According to your description, you can use tFileInputDelimited or tFileInputXML to extract this ID value.
Then link tJavaRow with tFileInputDelimited or tFileInputXML, save ID into context variable.
You needn't read from command line.
Regards,
Pedro
One Star

Re: [Input for tREST URL]

Hi pedro:
We tried implementing your suggestion - but ran into an error - if you could take a quick second and look at this (apologies for cross posting) - I would appreciate it.

http://www.talendforge.org/forum/viewtopic.php?id=24069
One Star

Re: [Input for tREST URL]

We want to pass arguments to trest component or call trest component from tjava or tjavarow and pass parameters, is it possible ?

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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads