I am new in Talend. this is my api => http://api.dss.adapt-odisha.com/aagro?url=https://mausam.imd.gov.in/api/warnings_district_api.php
this is created design =>
in tXMLMap
But when i am running this i am not getting data
How can i solve this issue?
Your api returns a json, but tRESTClient converts it to xml by default, because of "Convert response to DOM Document" setting.
I unchecked that setting, and used tExtractJSONFields to parse the json, it's working as expected.
Here's the schema of tExtractJSONFields
Related
enter image description hereThis Below my data I want to store on IClouds IOS, How Can I do that ,is it possible to store on iClouds ,please give me a code for that
enter image description here
This Below my data I want to store on IClouds IOS, How Can I do that ,is it possible to store on iClouds ,please give me a code for that
To save the "MyFun item" data, it is recommended to serialize the data and save it to a json file or an xml file.
For JSON serialization, you can install the Nuget package Newtonsoft.Json. For more info, you can refer to this document.
Or XML serialization, you can create an instance of XmlSerializer Class to serializes and deserializes objects into and from XML document.
Here are some related SO threads you can refer to.
How to write a JSON file in C#?
Serialize an object to XML
If you have got the serialized data, as mentioned in the comment, you can download official demo Xamarin.iOS - Introduction to iCloud, then pass it to MonkeyDocument.DocumentString.
I have a Talend job which has an input CSV file which needs to be converted to a JSON format and then using a tRESTclient/tREST , make a HTTP call request and post data.
In the current job, I have an Elasticsearch server installed on my local machine and provided that URL.
I was able to convert the files to JSON format and also verified with a tlogrow component but unable to post data.
(P.S: I was able to post data using a bulk Java code, loading jar files and making HTTP call and sending parameters using a tJAVArow component. So no issue with my localhost and posting data.)
After converting the data from input file to JSON format, set the context variable with your JSON data and then make the rest call. You can add the context variable in the HHTP Body. example : context.json_post without double quotes.
I have an Azure Mobile service with a .Net back end.
In the backend the data object use proper case. for example, MemberNumber.
In the azure client the view models use pascal case memberNumber.
I am using a library that creates an ODATA request and I get:
The query specified in the URI is not valid. Could not find a property named 'memberNumber' on type 'arenaapi.DataObjects.Members'.
That happens with this get:
/tables/members?%24inlinecount=allpages&%24orderby=memberNumber
If I change that the MemberNumber it works.
However, also, if I change the request to:
/tables/members?%24inlinecount=allpages&$orderby=memberNumber
It also works. It seems that the model binding parser is working differently if the $ is encoded or not.
Is there any way I can fix this server side so the encoded request won't return a 400 without changing the memberNumber to MemberNumber?
All the other stuff, posting, patching, etc is properly binding the pascal cased JSON post to proper cased c# data objects.
I am using appnexusapi gem to connect with AppNexus api but I am not able to proceed beyond establishing a basic connection.
Here is my ruby code:
require 'appnexusapi'
conn = AppnexusApi::Connection.new({'uri' => 'http://api.appnexus.com/auth', 'username' =>'*****','password' => '******'})
key = conn.login
As the documentation is not good, I am unable to proceed further. I would like to generate reports and query the data service.
In appnexus console I found that it generates random id for every report.
To generate a report, you need to POST to the /report service with the proper json for the report you want. The easiest way to generate this json is to manually create a sample report in Console and then hit Ctrl+J to see the json used. You can then alter as necessary for your exact needs.
Once you have the json, make a POST to the /report service and you'll receive a unique report_id (for that specific report request). Using this report_id, make a GET call to the /report?id= service and look for the 'execution_status' field. When that field is 'ready', you can grab the 'url' field to get the path to actually download the data (something like /report-download?id=13828374). Make a GET to that url and you'll have all of your data.
Details are available on the AppNexus wiki if you are a client: https://wiki.appnexus.com/display/api/Report+Service
When I send the following query
http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q=coffee%20New%20York%20NY
using c# WebClient.DownloadString function or ordinary web browser
I get JSON data which is different from data for the same query using JavaScript and
Google AJAX Search API.
From REST service I get the following url field
http://www.google.com/maps/place?source003duds0026q003dcoffee0026cid003d13245583795745066822
but from JavaScript query I get this url field
http://www.google.com/maps/place?source=uds&q=coffee&cid=13245583795745066822
The problem with REST service answer is that the url it gives points
to a web page with error message "We currently do not support the location".
What am I doing wrong?
It looks like either you are decoding the URI from the REST request incorrectly, or Google is ending it wrong. The = are being sent or parsed as 003d and the & as 0026
EDIT : After trying that link I see they return the links, in the JSON, with the '=' and '&' encoded, the JavaScript must be replacing those characters for you automatically. You could do a simple String replace on "003d" and "0026" - although I'm not sure that will cover every use case.
I resolved this by parsing JSON data with Json.NET library http://json.codeplex.com/