how to get the data from post request to trestclient and convert json data to csv file??

Highlighted
Six Stars

how to get the data from post request to trestclient and convert json data to csv file??

how to get the data from post request to trestclient and convert json data to csv file??

 

in postman i am able to get the data from post request.

URL :

https://io_dynamics_crm_data/entity_name

 

body:

{
"TimeStamp_Input": "2019-02-10T02:00:00.00Z",
"EntityAndEventsJSON_Input": "{\"EntityAndEventsList\":{\"EntityName\":\"indskr_positiongroups\",\"Events\":[33,34]}}"
}

 

result:

 

{
"@odata.context": "https://io-dynamics.com/data/v8.2/$metadata#Microsoft.Dynamics.",
"JSONOutput": "{\"AuditDataSet\":[{\"AuditID\":\"cdbb2002-9430-e911-b8b3-0004ff9d738f\",\"ChangedBy\":\"a6eba981-bb15-e911-a981-000d3af49b9e\",\"ChangedColumns\":null}]

}

 

how to get the data from the trestclient to invoke the body to the trestclient.

Employee

Re: how to get the data from post request to trestclient and convert json data to csv file??

Hi,

 

    Did you try tRest Component instead of tRestClient? Please refer the link below for details.

 

https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/8F133z8E6BVS9WpHKRkYUw

 

   The output data can be transferred parsed by JSON extract component of Talend and can be further passed to csv output file.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

 

Six Stars

Re: how to get the data from post request to trestclient and convert json data to csv file??

i tried with the different method ..i have used the json string and pass it to the trestclient component.

now i am able to get the response in the i tlogrow. I have attached the screen shot of the trestlient post response . please let me know how to extract these response through textractfiledjson or any other component to convert it into csv file.

 

Employee

Re: how to get the data from post request to trestclient and convert json data to csv file??

Hi,

 

   Please refer the below posts so that you will get idea about how to extract JSON fields.

 

https://help.talend.com/reader/hm5FaPiiOP31nUYHph0JwQ/LcNrhqdlyheCLpwyUwgJQw

 

https://community.talend.com/t5/Design-and-Development/Consuming-REST-API-and-extracting-JSON-Fields...

 

The second link is a real world example done by one of the Talend community member.

 

This should give you a path to resolve your use case.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Six Stars

Re: how to get the data from post request to trestclient and convert json data to csv file??

I have tried with the textractjsonfield to extract the data from response from trestrest client.

I am getting blank . Please find the attached screen shot. let me know where m doing wrong.

 

Employee

Re: how to get the data from post request to trestclient and convert json data to csv file??

Hi,

 

    Your JSON output seems to be embedded in a XML message. Why are you not parsing the XML first?

 

    You will have to first pick the JSON Ouput message and then parse the data.

 

     Please use tLogrow at each stage till you get correct output. Then you will be able to monitor the results in each stage and can identify the error also easily.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog