Azure Machine Learning Recommendations API: Delete Build fails - azure

I'm using Azure's Recommendations API to generate product recommendations. I'm keeping Recommendations up to date via an SSIS package that updates the data, creates a new build for the data, and if the build succeeds, deletes any previously existing builds.
The API documentation is straightforward, and everything works fine except one call in particular fails for me returning a HTTP 406 error (Not acceptable - Accept header doesn't match a response type supported by the server).
Has anyone successfully deleted a build via this API Call?
According to the documentation a Delete Build call should look like this:
Method=DELETE
{rootURI}/DeleteBuild?buildId=%27%27&apiVersion=%271.0%27

Andrew,
I just ran into this question... Did you resolve this issue?
In contrast with most of the functions, The datamarket version of the API requires a DELETE method to actually delete a build (as apposed to a GET) -- that may be the first thing to check.
Also, I want to make sure you are aware that the datamarket version of the API will be deprecated (please read the migration guide at https://azure.microsoft.com/en-us/documentation/articles/cognitive-services-migration-from-dm/ for more details). You should now be using the Recommendations API Cognitive Service (see https://www.microsoft.com/cognitive-services/en-us/recommendations-api ).
Either way, if you are still running into issue, feel free to contact us at mlapi#microsoft.com and we can check what may be wrong with your call.
Thanks!
Luis Cabrera
Recommendations API Program Manager

Related

node-quickbooks vs intuit-oauth

I am doing research on quickbooks online integration using node and angular 8.
The official intuit developer site provides two node packages.
one is official from intuit and one is from community.
I have glanced through both of them.
the official package is fairly universal. It essentially is just a API client to send a request to remote server and the payload is basic json format.
the community package seems a bit more specific but the documentation seems a bit confusing.
Which one would you choose to do the work and why?
I would love to hear your input.
Thanks :)
The Intuit provided library (intuit-oauth) is specifically for authenticating and getting the OAuth token you need to communicate with the Quickbooks API, the other library (node-quickbooks) is for making the actual calls against the API endpoints.
You will need both libraries, unless you are handling authentication in a different way.
Fwiw for whoever finds this useful:
I forked intuit-oauth, added typescript and fixed vulnerabilities that have been fixed in the PRs of their repo for years and never updated here: https://www.npmjs.com/package/intuit-oauth-ts
Additionally I forked node-quickbooks, updated the api to return promises rather than relying on callbacks, resolved the discovery URLs automatically, changed the format of response objects to be more sensible, and added (unfortunately only some) of the typescript definitions for it here: https://www.npmjs.com/package/qbo. I don't have enough time to add the definitions for all of the files (largey because the included ones should be completely exhaustive for every property in the QBO api, which is timeconsuming to define). If someone would like to contribute by adding more of the typescript definitions or adding all of them, I would really appreciate it.
I am interested in any example angular app using intuit-oauth
Trying to work it out but getting issues since there is no document for typescript.

SAP Cloud SDK CI/CD Pipeline: Usage with non S\4 Services

I am using SAP Cloud SDK (Java flavour) to create an extension application of SuccessFactors.
I sadly discovered that the Jenkins pipeline does not allow me to use any other service than the ones listed here: SCN Blog (scroll to the Appendix).
This does not make so much sense to me, as now the SDK can be used - and it is sponsored to be used by SAP - also with SaaS in its ecosystem, SuccessFactors being one of them.
Any hint? Can this check be somehow "bypassed"?
Thanks,
Roberto.
Please note that the blog post is quite old, have you verified your assumption that it does not work with SuccessFactors API?
Nonetheless, we recently introduced a configuration option which allows you to disable certain checks, cf https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#s4sdkqualitychecks
checkServices is what you would want to disable in your scenario.
As stated by Florian in the comment and following the Project Piper documentation, parameters "checkServices" and "customODataServices" can be used to customize the behavior of the pipeline when running upon a non-Business Hub API.
"checkServices: false" will completely deactivated the check, whereas "customODataServices: [ yourApiName ]" will skip the check just for the specified services.

Post Service call with Multiple records

I would like to know how to post multiple records to SAP using "BatchRequestBuilder" along with ChangeSet .I am using a custom odata service call(ODataCreateRequestBuilder),not using the VDM model. I did'nt get any blog or documentation to start with.
Can you please help me in this regard.
Updated:
Below is what I am trying to post to SAP
[{"purchaseSchAgrmntNo":"","customerMaterialNumber":"","plant":"","vendorNo":""},{"purchaseSchAgrmntNo":"","customerMaterialNumber":"","plant":"","vendorNo":""}]
SAP SDK version : 3.9.0
I have added below code with only one CreateRequest.
ChangeSet changeSet = new ChangeSetBuilder().addCreateRequest( ODataCreateRequestBuilder.withEntity(sapConfig.getServiceUrlRepriceList(),
sapConfig.getEntityRepriceList())
.withBodyAsMap(responseBody)
.build()).build();
BatchResult batchResult = BatchRequestBuilder.withService("URL?").addChangeSet(changeSet).build().execute(httpClient);
Can you let me know if this is correct.Also let me know what I have to pass in the service.Is it service URL?
Thanks,
Arun Pai
The BatchRequestBuilder is actually not directly part of the SAP Cloud SDK but a dependency that the SDK internally uses to execute batch requests. That is why on the SDK level there is no documentation on how to use it.
Roughly, a batch request comprises of multiple change sets which in turn group together multiple operations. The ChangeSetBuilder allows you to build up change sets which you can then pass to a BatchRequestBuilder.
So if you want to run create requests in batch mode you would want to leverage public ChangeSetBuilder addCreateRequest(ODataCreateRequest oDataCreateRequest).
You can take a look at how the SAP Cloud SDK uses these classes to build up batch requests to get an idea how it works in detail. As a starting point look towards BatchFluentHelperBasic. However, unless you don't know the service you want to query at compile time, I recommend that you leverage the generator to generate this code so that you can use the VDM instead which simplifies this.
If you extend your question to hold more specific information on what you actually want to achieve I can expand my answer to give a more concrete example. Also please include the SDK version you are using.

Fetch Google Analytics API with Python and Google2Pandas

My plan is to fetch the GA API with python3 and google2Pandas.
My problem so far is that I don't know where to start first, when I look at the google2pandas README it looks easy but I have issues to build my own script with that and implementing the Oauth2 stuff.
What is the right way to start with these boiler plates?
All those functions are a bit confusing to me.
What do I really need to use the analytics v4 API and fetch some simple stuff for my dashboard? Which Parameters do I have to set and how or where in the file should I do that? Another question is, do I have to use those functions in a new python file or can I go start with the _panalysis_ga.py?
It would be really helpful if you can guide me here or at least steer me in the right direction with some example.
The link to the repository kind of has the answer, but appreciate it's not always clear if you've never seen it before. There is no need to do anything on the OAth2 process as the library seems to take care of that.
Use pip to install the google2Pandas library on your machine.
You then need to create a GCP account if you don't already have one, and follow step 1 here to get the credentials.
you can then use the Quick Demo shown on the README file of the repository (modify the query to your needs).
EDIT
Look into the New and Improved section of the README file as it is the most up to date one.

How to recover source code of Nodejs GAE project

I've an application which is deployed. I'd created simple get fetch services on cloud in a project and have deployed it. Unfortunately in confusion b/w the projects, I deleted the project. I can access the web service by fetching through urls but couldn't get the source code. Any help?
At the moment it's only possible to download Java, Python, PHP and Go application's source code.
What I can recommend you is to submit a Feature Request through this link asking for this feature also for Node.js. Also you may consider using Cloud Source Repositories, which is free and can help you mitigate this kind of issues in the future.

Resources