Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
bastiaaf
Frequent Visitor

Custom data connector - relationships

I'm working on a Custom data connector which is retrieving data - via REST API's - from an HR Cloud Platform.

While all is working well, and with the (Personal) gateway I'm even able to refresh the data, relationships (or the lack off) are giving me head-aches.

I can't seem to find any information on how to create a relationship between 2 entities in the Data Model.

I've found these links, but they do not provide an answer on how - as part of the connector - I can program a relationship between entities (without extending one of the two entities with the attributes of the other entity...

https://github.com/Microsoft/DataConnectors/issues/97

 

Hoping for some feedback 🙂

4 REPLIES 4
daniellittledev
Regular Visitor

Please vote for this idea as it's not currently possible to do this with PowerBI at the moment.

 

Vote for Idea: Enable Custom Connectors to explicitly declare table relationships 

Anonymous
Not applicable

@bastiaaf,

Have you checked the sample in the blog below? Power Query code about defining relationships has been provided in the blog.

https://github.com/Microsoft/DataConnectors/tree/master/samples/Relationships

Regards,
Lydia

@Anonymous, I did, but either I don't get the example or it's not meant for what I want to do...

Currently this is the result:

image.png
With this piece of code:

        #"CompanyLocation" = Table.NestedJoin(#"Companies",{"ID"},OTGConnector.GetLocations(),{"Company.Id"},"CompanyLocations",JoinKind.LeftOuter),
        #"CompanyLocationExpanded" = Table.ExpandTableColumn(#"CompanyLocation","CompanyLocations", {"Company.Id"})


So <Companies> is extended with the "Company.Id" attribute of <Locations>.

However what I want to achieve is the actual relationship in the model:

image.png

 

Currently, I have to explain my users to go to a menu-item and "autodetect" the relationships, which seems to be hard for them.
Would be great if I can simply code what the relationship should be...

We're facing a similar challenge.

 

You should follow this topic on the github repo as well...

https://github.com/Microsoft/DataConnectors/issues/150

 

It looks like more work around relationships is in progress.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.