Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ouptut to Web-API

Hello,

 

I have aJob in the Open Studio for Big Data, which reads content from a sourve, convert it, and finally i got the rows and put it in an mysql-Database with tMysqlOutput-component. Instead of this tMysqlOutput-compoment I want to put the content of the row as xml or json-String  to an Web-Url. I have tried the components tHttpRequest and tRest, but that is not the soulution: Post-Parameters for tHttpRequest has to come from a file, and the tRest-component cannot use the row data. 

 

Are there any output components which I can use?

 

Thanks for help and regards

Thomas

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Use a tFlowToIterate and iterate from that. The your values for that iteration will be stored in the globalMap HashMap with the key "{rowname}.{columnname}" of the row going into the tFlowToIterate. So, as an example, if you have a row called row1 connecting to the tFlowToIterate and the row has 3 columns (col1 as a String, col2 as an Integer, and col3 as a Long), then you can access the values using the code below...

 

((String)globalMap.get("row1.col1"))
((Integer)globalMap.get("row1.col2"))
((Long)globalMap.get("row1.col3"))

View solution in original post

4 Replies
Anonymous
Not applicable
Author

We have tRestClient (for Rest) and tESBConsumer (for Soap) where you can pass an XML or JSON payload as a document to the component.  Check out their documentation on https://help.talend.com

Anonymous
Not applicable
Author

Thanks for the tip. But with this component I have no Chance to connect from e.g. tFileInputExcel. My Idea was, send some data directly to a rest-URL And If i choose "iterate", i have no row- Variables, which i can use as parameter for the rest-url.

Possible some code in tjavarow may help, or is there a possible solution with tRest ?

 

Thanks for help and kind regards

Thomas


talend.jpg
Anonymous
Not applicable
Author

Use a tFlowToIterate and iterate from that. The your values for that iteration will be stored in the globalMap HashMap with the key "{rowname}.{columnname}" of the row going into the tFlowToIterate. So, as an example, if you have a row called row1 connecting to the tFlowToIterate and the row has 3 columns (col1 as a String, col2 as an Integer, and col3 as a Long), then you can access the values using the code below...

 

((String)globalMap.get("row1.col1"))
((Integer)globalMap.get("row1.col2"))
((Long)globalMap.get("row1.col3"))
Anonymous
Not applicable
Author

Thats it! With this I can post the contents to the URL - Good solutions, which saves a lot of time. Thanks!

 

Regards

Thomas