Showing results for 
Search instead for 
Did you mean: 
bastiaaf Frequent Visitor
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...


Hoping for some feedback Smiley Happy

Moderator v-yuezhe-msft

Re: Custom data connector - relationships


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


Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bastiaaf Frequent Visitor
Frequent Visitor

Re: Custom data connector - relationships

@v-yuezhe-msft, 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:

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:



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...

rlooney Frequent Visitor
Frequent Visitor

Re: Custom data connector - relationships

We're facing a similar challenge.


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


It looks like more work around relationships is in progress.

Helpful resources

Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 46 members 1,081 guests
Please welcome our newest community members: