Showing results for 
Search instead for 
Did you mean: 
runski Frequent Visitor
Frequent Visitor

Enterprise Gateway and Text Analytics


Can someone guide me on how to set up a connection to Text Analytics API using the Enterprise Gateway?


Super User
Super User

Re: Enterprise Gateway and Text Analytics

Assuming that you are referring to the Text Analytics API in the Azure Data Marketplace, in looking at this article:


I would think that what you need to do is implement this in "M" code. Is that what you are doing?

I have book! Learn Power BI from Packt

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

ivargjerde Frequent Visitor
Frequent Visitor

Re: Enterprise Gateway and Text Analytics

We implemented the API in a Blank Query using the following code


(Source as table) as any =>
    JsonRecords = Text.FromBinary(Json.FromValue(Source)),
    JsonRequest = "{""documents"": " & JsonRecords & "}",
    JsonContent = Text.ToBinary(JsonRequest, TextEncoding.Ascii),
    Response =
                Headers = [#"Ocp-Apim-Subscription-Key"= "Our API key",
                           #"Content-Type"="application/json", Accept="application/json"],
    JsonResponse = Json.Document(Response,1252)


We then call the Query from a table that contains the text we want to analyze. The text comes from our on-premise SQL server that we connect to through the Enterprise data gateway. When we try to enable refresh on the dataset we get the following error.


Something went wrong.
Failed to use the selected gateway. Please make sure the gateway is up and running and try again.
Please try again later or contact support. If you contact support, please provide these details.
Activity ID84912326-5530-51de-9f1b-04c74b35d761
Request IDf3a597ca-2144-5f1c-9b80-623075143a83
Correlation ID1422aa44-c7bc-1602-688c-872d0c2b6f0a
Status code400
TimeMon Oct 17 2016 10:52:42 GMT+0200 (Central European Daylight Time)
If we delete the table that calls the query and republish the model refresh works fine. Any input on where we might be going wrong would be greatly appreciated!



Moderator v-caliao-msft

Re: Enterprise Gateway and Text Analytics

Hi @runski,


As Smoupre said, do you use API on the link below?


Please provide us more details about what you have done, so that we can make further analysis.



Charlie Liao


ivargjerde Frequent Visitor
Frequent Visitor

Re: Enterprise Gateway and Text Analytics

Hi @v-caliao-msft@Greg_Deckler,




I work together with @runski. My post above explains our implementation approach and the error message the we see when we try to refresh our data using the Enterprise Gateway.


We do use the API from Microsoft Azure in the link provided by @v-caliao-msft.


We followed the method outlined in these blog posts. The only difference is that the text we analyse come from our on-premise SQL server instead of from Facebook.



Yesterday, we tried connecting to the .pibx file stored in OneDrive as opposed to publishing it to the Power BI Service. We were not able to refresh the data using this approach either.





wwright1984 Frequent Visitor
Frequent Visitor

Re: Enterprise Gateway and Text Analytics

I'm getting this as well it's very frustrating, has anyone found a work around or a fix yet?


{ "statusCode": 404, "message": "Resource not found" } when using the URL

Helpful resources

Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 394 members 3,774 guests
Please welcome our newest community members: