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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_n
Contributor
Contributor

how to pull the fetchxml API data from the trestclient?

how to pull the fetchxml dat from the trestclient?

 

API URL:  https://dynamics/api/data/<entity>?fetchXml=<fetch><entity name="product" ><all-attributes/><link-entity name="document" from="positiongroupsid"to="positiongroupsid" intersect="true" /></entity></fetch>

 

Please let me know how to pull the data from the above relationship query from the dynamics using Trestclient component. 

 

Labels (5)
8 Replies
vapukov
Master II
Master II

hi,

 

what is your problem?

 

if API text correct just escape " as \"

amit_n
Contributor
Contributor
Author

I am tryin to pull the data from dynamics with the fetchxml relationship query .

 

API:-  https://dynamics/api/data/v8.2/<entity>?fetchXml=<fetch><entity name="productgroup" ><all-attributes/><link-entity name="iodocument" from="indskr_positiongroupsid"to="indskr_positiongroupsid" intersect="true" /></entity></fetch

 

once we execute in the postman we are getting the json data as below

 

{
"@odata.context": "https://.dynamics.com/api/data//$metadata#positiongroupses(_organizationid_value,organizationid,description,statecode,statuscode,_createdby_value,positiongroupsid,modifiedon,_modifiedby_value,createdon,name)",
"value": [
{
"@odata.etag": "W/\"1181114\"",
"value": "1ccc219a-db2f-4877-87e",
"description": "To assign all content in dev to all positions",
"statecode": 0,
"statuscode": 1,
"value": "7f79fecc-e7c0-e811",
"id": "0a777a48-49c7-e811-a971",
"modifiedon": "2018-10-03T20:17:06Z",
"_modifiedby_value": "7f79fecc-e7c0-e811",
"createdon": "2018-10-03T20:17:06Z",
"name": "Content Position Group"
},

 

need to load this data to csv file.

 

trestclient--->txmlmap---> csv file

 

when try to pull data from trestclient m getting blank. Please let me know how to pull data. 

vapukov
Master II
Master II

tRESTClietnt -> tExtractJson -> csv

it works, so if not work - let check where a mistake

amit_n
Contributor
Contributor
Author

Please find the attached sceen shots and let me know  is there anything m doing wrong.

 

context.ioresource_query = https://dynamics/api/data/v8.2/<entity>?fetchXml=<fetch><entity name="productgroup" ><all-attributes/><link-entity name="iodocument" from="indskr_positiongroupsid"to="indskr_positiongroupsid" intersect="true" /></entity></fetch

 

please let me know how to resolve it.

 


Capture3.JPG
Capture2.JPG
Capture1.JPG
vapukov
Master II
Master II

You are use wrong XPATH for extract data (at least it not compatible with provided JSON above)

You can connect tlogrow direct to tRESTClient output and check - what XML you have, then will be possible suggest proper

 

 

as variant:

 

Loop "/"

or remove value[*]. from PATH

amit_n
Contributor
Contributor
Author

When i connect to tlogrow m getting the result like below attached screen shot.

 

please let me know where m making the mistake.


Capture4.JPG
vapukov
Master II
Master II

as You can see from your screenshot - API return error for you

 

so, double check uri variable, if it work in Postman, it must work in talend and must return to you same information

amit_n
Contributor
Contributor
Author

url is working in the postman. but when i try it in trestclient component it is giving the error.

 

do i need to specify any query parameter. Please let me know how to resolve it.