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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

send json data via REST request on talend

hi evryone , i want to send data to my elasticsearch database. for that I recover my data from an oracle database I transform them into json and send them via a REST request on talend

I use elasticsearch versions 7.0.1 and talend 7.1.1

data send :

{"name": "Fabrice", "site": "Paris", "department": "North West"}

method Post in this url : "http://localhost:9200/myIndex"

i have this error :

exception in component tRESTClient_1 (DataOracleToJson)
javax.ws.rs.WebApplicationException: HTTP 400 Bad Request

 0683p000009M4C9.png

Labels (7)
11 Replies
Anonymous
Not applicable
Author

when I put a document in the tXMLmap it tells me "type mismatch can not convert from string to document"
and on the forum:

https://community.talend.com/t5/Design-and-Development/resolved-Need-to-convert-JSON-string-to-docum...

 

it says that it must be sent in string and not in document, when I do it, it puts me in error (except error 400 bad request), when I check the request send with wireshark I see the object json is not send in the request

 

 

Anonymous
Not applicable
Author

i had the same issue and I used this flow. in the tWriteJsonField, the Output column is set to "string" and not the body and I removed the root Node as I don't need it

 

flow.PNGtwritejsoncomp.PNG