#1 2012-05-24 01:16:14

aditya3245
New member
Registered: 2012-05-24
Posts: 9

[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:

[  ADD INPUT from an xml file/ csv file - and append it to the web service URL for tREST ]

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


Uploaded Images

Last edited by aditya3245 (2012-05-24 01:39:02)

Offline

#2 2012-05-24 04:06:10

pedro
Member
Registered: 2011-11-17
Posts: 3682

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


Only Paranoid Survive.

Offline

#3 2012-05-24 22:57:28

aditya3245
New member
Registered: 2012-05-24
Posts: 9

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

Offline

Board footer

Powered by FluxBB