We have an OData feed where the entity IDs are in the form of URLs, like:
http://data.mycompany.com/1234
We can load the main OData feed into Power Query just fine, but when we try to expand navigation properties it seems that PowerQuery removes one of the two forward slashes after the http protocol.
So when it should be making a query to something like this:
http://data.mycompany.com/odata/feed('http://data.mycompany.com/1234')/NavProperty
Instead it tries to query:
http://data.mycompany.com/odata/feed('http:/data.mycompany.com/1234')/NavProperty
And obviously this doesn't work.
I found that by explicitly specifying an @odata.id annotation in the feed we can influence the URL that Power Query tries to follow, but only double-encoding the slashes can I get it to work in Power Query. So with this in the feed:
"@odata.id": "http%3A%252F%252Fdata.mycompany.com/1234"
Power Query makes the needed query:
http://data.mycompany.com/odata/feed('http://data.mycompany.com/1234')/NavProperty
(Note that all of the encoding gets removed).
Unfortunately, this breaks the API for other clients so it isn't a good fix for us.
We're thinking about changing our API to detect "http:/xxx" in IDs and add the extra slash back in, but this feels like a hack and we'd prefer to get it to work the way we think it should.
Has anyone come across an issue like this?
Thanks in advance