Can't connect Azure Table Storage to PowerBI (415) Unsupported Media Type) - azure-storage

I'm getting the error below while connecting to Azure Table Storage,
Details:
Blockquote "AzureTables: Request failed: The remote server returned an error:
(415) Unsupported Media Type. (None of the provided media types are
supported)
The one thing I noticed is that if I fill up only the account name it will automatically add the rest of the url which is ".table.core.windows.net" where in the portal its table.cosmosdb.azure.com.
With core.windows.net Im getting err "AzureTables: Request failed: The remote name could not be resolved". But it might messing up some headers while using table.cosmosdb.azure.com
Please advise.
Thank you.
m

You should be able to connect to your azure table storage/CosmosDB account using powerBi using the following link structure: https://STORAGEACCOUNTNAME.table.core.windows.net/ , or https://yourcosmosdbname.documents.azure.com:443/ for cosmosdb
You can get the correct link by going to Portal > go to Storage accounts > Click on Tables/CosmosDB > You'll find the table link you would like to link to powerbi > remove the last table name after "/", then use it to connect in powerbi, it will later allow you to select the specific table in powerBI:
These are screenshots from testing for CosmosDB:
Errors 415:
When it comes to these errors, they can be caused by cache, which can be flushed by going to:
In Power BI Desktop: Go to "File" and select "Options". Under "Data Load" you have the option to clear the cache. After doing this you can use "Get Data" and "OData-feed" as normal and the URL won't return the 415 error
Check the following link for additional suggestions:

Not clear how you consume the table service API, but here is the solution that worked for me for React SPA and fetch api.
Request header must contain:
"Content-Type":"application/json"
It was failing for me with single quotes, and worked with double.

Related

Http status code when data not found in Database

I'm trying to understand which Http Status Code to use in the following use case
The user tries to do a GET on an endpoint with an input ID.
The requested data is not available in the database.
Should the service send back:
404 - Not Found
As the data is NOT FOUND in the database
400 - Bad Request
As the data in the input request is not valid or present in the db
200 - OK with null response
200 - OK with an error message
In this case we can use a standard error message, with a contract that spans across all the 200 OK responses (like below).
BaseResponse {
Errors [{
Message: "Data Not Found"
}],
Response: null
}
Which is the right (or standard) approach to follow?
Thanks in advance.
Which is the right (or standard) approach to follow?
If you are following the REST API Architecture, you should follow these guidelines:
400 The request could not be understood by the server due to incorrect syntax. The client SHOULD NOT repeat the request without modifications.
It means that you received a bad request data, like an ID in alphanumeric format when you want only numeric IDs. Typically it refers to bad input formats or security checks (like an input array with a maxLength)
404 The server can not find the requested resource.
The ID format is valid and you can't find the resource in the data source.
If you don't follow any standard architecture, you should define how you want to manage these cases and share your thought with the team and customers.
In many legacy applications, an HTTP status 200 with errors field is very common since very-old clients were not so good to manage errors.

s4sdk openSAP develop extension Course - Address not created - no put operation in mock server log

I have created mock server and it shows GET operation selecting all partners and will get a partner by id.
If I click on the Add address button there is no put or post operation in the log file.
Mock server log:
Request: GET
/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='1003764')?$select=BusinessPartner,CreationDate,FirstName,IsFemale,IsMale,LastName,to_BusinessPartnerAddress/AddressID,to_BusinessPartnerAddress/BusinessPartner,to_BusinessPartnerAddress/CityName,to_BusinessPartnerAddress/Country,to_BusinessPartnerAddress/HouseNumber,to_BusinessPartnerAddress/PostalCode,to_BusinessPartnerAddress/StreetName&$expand=to_BusinessPartnerAddress&$format=json
Reading business partner 1003764
Log from application
12:51:35.357 [http-bio-8080-exec-10] ERROR
com.sap.cloud.sdk.odatav2.connectivity.ODataQuery - Successfully
connected to destination service.
Am I missing a setting?
You can implement an add functionality for a Business Partner Address in the following way:
BusinessPartnerAddress addressToCreate = BusinessPartnerAddress.builder()
.businessPartner(businessPartnerId)
.streetName("someStreet")
.build();
new DefaultBusinessPartnerService()
.createBusinessPartnerAddress(addressToCreate)
.execute();

Power BI issues with Incapsula

I'm trying to get data->web to a service that uses Incapsula for DDOS and I'm getting the error:
DataSource.Error: The server committed a protocol violation.
Section=ResponseHeader Detail=CR must be followed by LF
There was a workaround posted here:
Power BI (Power Query) Web request results in "CR must be followed by LF" Error
But that workaround won't work for me, as the data that is returned is not a Web.Page (rather it's JSON) and therefore the Web.Page function will return a message that the results don't look like a Web.page.
Query looks like this:
= Json.Document(Web.Contents("url", [Headers=[Authorization="Basic {encoded value}", #"X-Forte-Auth-Organization-Id"="{org_id}"]]))
and will actually work when I use the query validator, but when I exit out to use I get the error shown above.
If I do this:
=Json.Document(Web.Page(Web.Contents(url, [Headers=[Authorization="Basic {encoded value}", #"X-Forte-Auth-Organization-Id"="{org_id}"]])))
then I get this error:
DataFormat.Error: The resource at 'url' cannot be retrieved using
Web.Page. It doesn't appear to be a web page.
Stack overflow wouldn't let me post the actual urls because I don't have enough reputation.
Any assistance is greatly appreciated.
[Disclaimer: I work for Incapsula]
I recommend contacting Incapsula support at support[at]incapsula.com
They can help you with this, but are unable to post the response publically.

unable to create a user in JXplorer for LDAP - i get an error

I am trying to user openLDAP for the very first time. So I found this nice tutorial http://soswin-techbits.blogspot.com/2011/10/installing-openldap-on-windows-7.html. So i followed the instructions all the way to end. However, on the very last step I get an error. When i try to add a user to the group people I get this errpr "Unable to perform Modify Operation."
So after i do cn=user1 then in the Table Editor I type "surname" and hit submit then I get this error.
even when I tried to add a new directorey I get the same error.
Here is a detailed error.
javax.naming.OperationNotSupportedException: [LDAP: error code 53 - no global superior knowledge]; remaining name 'dc=Organization,dc=com'
What is wrong?
thanks
The server may not be configured to host a backend with the suffix dc=Organization,dc=com.

Command Status 0x00000011 with submit_multi for SMPP integration

Hi am integrating with Sybase Mobile 365 Services and I have gotten submit_sm and deliver_sm to work fine. I am trying to get submit_multi to work, but no matter what I try I get back a Command Status = 11. Does anyone have any thoughts as to what that command status means? Why I would get that? I have tried different service types and everything else I can think of... with no success.
Thanks,
Stephen
Command Status = 11 (ESME_RINVDSTADR) means "Invalid destination address".
This mean that probably the the dest_address field in your submit_multi request is wrong.
The dest_address field for submit_multi should be a list of destination address structures as defined in SMPP 3.4 Specification - chapter 4.5.1.1.
The number of destination addresses in the list is set in the number_of_dests field.
Additionally, you could also check that the dest_addr_ton (Type of Number) and dest_addr_npi (Numbering Plan Indicator) are correct for each destination address. For more details about this check out this link.