Forum Discussion
OData connection error using Data Gateway
Hi All,
I would like to test the ODATA connector using PowerBI as a source with "data gateway"
(1) In powerbi.com - I have successfully configured the Data Gateway Cluster on the machine (On-Premise Data Gateway)
(2) In powerbi.com - In the menu "Manage Gateway", I try to insert as a datasource ODATA - basic authentication with the URL
http://localhost:9090/tagetikcpm/api/aih/v1/Datasources and it works correctly.
(3) In powerbi.com - In the menu "Manage Gateway", I try to insert as ODATA datasource - basic authentication with different URL
http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/Datasource_000008()
but it returns me the following error:
Unable to connect: We encountered an error while trying to connect to . Details: "We could not register this data source for any gateway instances within this cluster. Please find more details below about specific errors for each gateway instance."Hide details
Activity ID: 243fb8a8-adc9-4398-9a1e-b93e2ca84059
Request ID: 6f204009-6f1c-d4a5-3a42-2273740eba83
Status code: 400
Error Code: DMTS_PublishDatasourceToClusterErrorCode
Time: Tue Mar 02 2021 15:13:13 GMT+0100 (Ora standard dell’Europa centrale)
Service version: 13.0.15480.60
Client version: 2102.4.05076-train
TGKDEMO: Unable to connect to the data source undefined.
Underlying error code: -2147467259
Underlying error message: We couldn't parse OData response result. Error: The context URI 'http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/$metadata#Collection(CCHTagetik.Aih.type_000008)' is not valid for the expected payload kind 'Collection'.
DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259
Microsoft.Data.Mashup.ValueError.DataSourceKind: OData
Microsoft.Data.Mashup.ValueError.DataSourcePath: http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/Datasource_000008()
Microsoft.Data.Mashup.ValueError.Reason: DataSource.Error
Troubleshoot connection problems
However, the same URL(3) works correctly via the web browser and it returns XML Data.
It should be not an infrastructure issue because in the second point the connection works correctly.
Could someone tell me why?
Thanks for your support!
12 Replies
- v-janeyg-msftCommunity Support
Hi, Anonymous
Can you establish a connection in desktop? Can you share the screenshot you configured in the gateway?
It seems that the following parameters can't be recognized, and cloud links may not be supported.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi,
In Power BI Desktop with direct use of ODATA connector, inside the machine, the URLs seem to work.
In this case, I would like to read the data using the "Data gateway" service and the Dataflow (with ODATA connector) as the data source for Power BI dashboard.
I have attached the first example with URL http://localhost:9090/tagetikcpm/api/aih/v1/Datasources (It seems work) and the second example http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/Datasource_000008()
with the error added in the post above.
Error context URI 'http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/$metadata#Collection(CCHTagetik.Aih.type_000008)' is not valid for the expected payload kind 'Collection'.
The second URL works correctly via browser inside the machine (I have attached the results).
Thanks for your help!
Best Regards - AnonymousNot applicable
- v-janeyg-msftCommunity Support
Hi, Anonymous
Have you connected with the url 'http://.../Datasource_000008()' in desktop successfully?
Can you change the name 'Datasource_000008()' without using '_' and '()'? Maybe it can't be recognized.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
The URL http://localhost:9090/tagetikcpm/api/aih/data/v1/TGK_06/001/Datasource_000008
without "()" works correctly with Power BI Desktop in the local machine (without Data Gateway service) but it doesn't work with Data Gateway.
I can't remove the char "_" because it is not a valid URL.Regards,
- v-janeyg-msftCommunity Support
Hi, Anonymous
Have your problem been solved? If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Janey Guo
- AnonymousNot applicable
- v-janeyg-msftCommunity Support
Hi, Anonymous
I have reminded you that the format of your url data source is not recognized and supported by pbi service. Not all data that can be refreshed in the desktop can be refreshed in the service, such as some custom data sources. Can you try a personal gateway? If it doesn’t work, then consider replacing the data source.
Best Regards
Janey Guo