Forum Discussion
Gabry
Super User
1 year agoHelp needed, including '$' prefix in OData v2 parameters with Power Query
Hello everyone,
I'm trying to connect to a SAP OData v2 service using Power Query in Power BI. I'm accessing an endpoint that requires query parameters with the '$' prefix, as mandated by OData v2....
PhilipTreacy
Super User
1 year ago
Try Uri.BuildQueryString to assemble the query parameters
Uri.BuildQueryString - PowerQuery M | Microsoft Learn
Regards
Phil
- Gabry1 year ago
Super User
Hello PhilipTreacy ,
thanks for the suggestion. I tried but then when published to the service can't be refreshed because of dynamic data source error.
Code was like this:baseURL = "http:......", queryParameters = [ #"$filter" = "C....", #"$expand" = "to_M.....", #"$select" ="M......e", #"$top" = "10" ], queryString = Uri.BuildQueryString(queryParameters), fullURL = baseURL & "?" & queryString, Source = OData.Feed(fullURL, null),