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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantV
Creator
Creator

Insert data into DB using Django REST API

I am trying utilize Django REST APIs to insert data into the database, instead of the direct write. I've been able to read JSON data using the tRESTClient component but I am not too sure about the insertion/POST. Could someone point me to the components (and relation) that I should use?

 

The current job that I have is mostly: Read data from raw file -> tMap -> DB and I wish to do something like Read data from raw file -> tMap -> (pass on data to REST endpoint via POST)

 

PS: I realize that this might not be the most efficient way to ingest data but that's what the business wants since it brings in an additional layer of control.

Labels (4)
4 Replies
Anonymous
Not applicable

use a tRestClient component to send rest requests.  

sushantV
Creator
Creator
Author

Still not working but I got it moved ahead a little.

 

Used the tRestClient component after my tMap and I could see the records getting inserted into the DB but all of them are without any data. Strangely nowhere I was asked to specify the JASON tree. The number of records getting inserted are equal to rows being read from raw file so at least something is right. But I couldn't locate the menu/options to specify which data element read from the raw file should tag to which JASON element.

 

How do I specify the data to JSON mapping?

 

@@rhall  @Dijke @TRF @nthampi

 

sushantV
Creator
Creator
Author

Quite amazed that nobody knows this/ can help with this thing. I am sure somebody would have done doing a POST insert using RESTful APIs in Talend. @ctoum @

sushantV
Creator
Creator
Author

Need some help here. Can someone at least point me in some direction? I can try to figure things on my own. At least the experts, let me know which component should I be using.