Skip to main content

Power BI

Needs Votes

OData.Feed should support entity bound function with same name as property

Vote (1) Share
Dave Brann's profile image

Dave Brann on 25 Jun 2020 01:29:49

Microsoft case 119083024001340 was filed for an issue causing a failure in OData.Feed when reading valid OData metadata.

Microsoft Product Group agreed there is an issue but will not fix it unless there is sufficient votes.
Microsoft support team stated the following:
"PG team has responded back today on your concern but they have no plans to change the existing behavior of OData feed function at this time, we recommend you to post your Idea to the Power BI Ideas Uservoice https://ideas.powerbi.com/forums/265200-power-bi-ideas, which helps us gauge how much impact this would have. The product engineering team will consider the request depending on the number of votes and the severity and may add the feature in upcoming product release "

The issue occurs if an OData entity, lets call it MyNamespace.E1, has a property named JobStatus and there is also a bound function also named JobStatus that is bound to MyNamespace.E1. In this case, when OData.Feed reads $metadata from the OData API, it throws an exception:
[Expression.Error] The field 'JobStatus' already exists in the record.StackTrace: at Microsoft.Mashup.Engine1.Runtime.KeysBuilder.Add(String key).


Microsoft Product Group agrees this is an issue in OData.Feed where they cannot handle duplicate column names that would be created from both property and bound function. I suggested they just append a "function" string or similar to the end of the JobStatus function (rename JobStatus to JobStatusfunction) to eliminate the duplicate name.