cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sylbae-a Frequent Visitor
Frequent Visitor

Custom Data Connector / How to troubleshoot Testconnection Handler

Hello,

 

I built my first custom data connector (encapsulate access to authenticated Rest API).

It works fine with Power BI Desktop but I cannot enable scheduling of data source refresh through Enterprise Gateway.

 

I am pretty sure this is because of incorrect implementation of mandatory TestConnection handler.

When trying to configure the data source from Power BI web portal, I am getting an error "Cannot be added to gateway". In documentation, it is highlighted we likely have a problem with TestConnection if getting this message.

 

I developped my handler based on documentation:

https://docs.microsoft.com/en-us/power-query/handlinggatewaysupport

 

But cannot figure out the problem... Is there any logfile I could access to get further details ?

 

 

TestDataSource = [

    TestConnection = (dataSourcePath) => {"TestDataSource.Feed", dataSourcePath},

    Authentication = [

        UsernamePassword = []

    ],

    Label = Extension.LoadString("DataSourceLabel")

];

 

4 REPLIES 4
Highlighted
john_dawson Frequent Visitor
Frequent Visitor

Re: Custom Data Connector / How to troubleshoot Testconnection Handler

 I'm having related difficulties too; sorry, no answer, but a few resources that might be useful

 

The most useful (to me) was: https://docs.microsoft.com/en-us/power-query/handlinggatewaysupport, which covers parameters, which is perhaps a common problem with TestConnector; it is necessary that your TestConnector is called with the right parameters, otherwise it will fail

 

This is also useful: https://docs.microsoft.com/en-us/power-query/samples/trippin/9-testconnection/readme; as it says, unfortunately, there is no way to test TestConnection except in the On-premises Data Gateway, which makes it hard to track down problems

 

I'll come back if I myself make useful progress

sylbae-a Frequent Visitor
Frequent Visitor

Re: Custom Data Connector / How to troubleshoot Testconnection Handler

Ultimately I troubleshooted my problem reviewing my code. But as a generic need, I still think it would be a good idea to implement some logging on the gateway. That would be very helpful

Anonymous
Not applicable

Re: Custom Data Connector / How to troubleshoot Testconnection Handler

Hi @sylbae-a , I'm encountering the same issue. Could you please share how you solved this? My custom connector works fine in desktop but I cant get it to work through the gateway. I am able to enter credentials (Oauth2) but after the oauth flow the data source sign in window stays opened, nothing happens. I think it is caused by the testconnection configuration but I'm not able to find the exact cause.

CAOP Regular Visitor
Regular Visitor

Re: Custom Data Connector / How to troubleshoot Testconnection Handler

I'm in the same situation. If you guys find anything, please help. I'll do the same.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors (Last 30 Days)