DataConnectors icon indicating copy to clipboard operation
DataConnectors copied to clipboard

ODataFeed connector doesn't show all relationships

Open anetab opened this issue 5 years ago • 0 comments

Hi,

I have a relationship in my OData metadata from an entity type "Property" to an entity type "City" via a navigation property. The metadata for Property is as follows:

<EntityType Name="Property">
   <Key>
      <PropertyRef Name="Syscode"/>
   </Key>
   <Property Name="Syscode" Type="Edm.Int32"/>
   <Property Name="City" Type="Edm.String"/>
   <NavigationProperty Name="City_City" Type="test.City">
      <ReferentialConstraint Property="City" ReferencedProperty="PnCity"/>
   </NavigationProperty>
</EntityType>

And this is the metadata for City:

<EntityType Name="City">
   <Key>
      <PropertyRef Name="Syscode"/>
   </Key>
   <Property Name="Syscode" Type="Edm.Int32"/>   
   <Property Name="PnCity" Type="Edm.String"/>
   <Property Name="Country" Type="Edm.String"/>  
</EntityType>

Note that the referenced property in the referential constraint is NOT the id property of the target entity type.

The problem is that this relation is not shown in Power BI (although I have the "Import relationships from data sources" switched on). In contrast, other relationships where the referenced property is the id of the target entity type are shown correctly. I can also manually add the relationship in Power BI.

Is this a bug, or do I need to add anything to the OData metadata to make Power BI recognize the relationship?

Thanks a lot, in advance, for your help.

anetab avatar Jul 26 '18 13:07 anetab