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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
csette1329
New Member

PowerBI losing related tables in "Expand" steps

Has anyone seen this issue? PostgreSQL → Power Query relationships suddenly disappear after tunneling change

 

I’m investigating a scenario and would like to hear from anyone who has experienced something similar.

Context:

  • PostgreSQL database with well-defined foreign keys and table relationships
  • Power BI / Power Query connected directly to this PostgreSQL source
  • Because the relationships existed in the database, Power Query automatically exposed the Expand option with the related tables/columns (as expected)

The problem:
After the client migrated from a PuTTY SSH tunnel (used for testing) to a Windows VM using PowerShell SSH port forwarding (production), every Power Query step that expanded related tables broke.

Symptoms:

  • Power Query throws errors saying the related columns no longer exist
  • When checking the database from Power Query, those columns and relationships simply disappear
  • Client insists no tables, views, or constraints were modified on PostgreSQL
  • Only the connection method changed (PuTTY → PowerShell port forwarding on port 5000 → bastion → RDS)

Anyone has any suspictions?

 

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @csette1329 ,

The disappearance of relationships in Power Query after switching tunneling methods is usually not about PostgreSQL itself but about how Power BI interprets metadata through the driver/connection. The SSH tunneling change can alter which driver is used, how schemas are exposed, or whether foreign key metadata is surfaced.

 

Try below workarounds.

 

1. Explicitly define relationships in Power BI’s Model view instead of relying on automatic detection. This bypasses the Expand dependency.

 

2. Use views in PostgreSQL that join related tables, so Power BI doesn’t need to infer relationships.

 

3. If possible, revert to the same driver/tunnel setup used in testing (PuTTY) and compare connection strings side by side.

 

Note: The database schema is fine, but the metadata exposure through the connector changed when you switched tunneling methods. Double-check driver versions, schema resolution, and user permissions. If automatic relationships don’t reappear, you may need to manually define them in Power BI.

 

Refer below links.

https://community.fabric.microsoft.com/t5/Desktop/Power-BI-DirectQuery-to-AWS-RDS-PostgreSQL-via-SSH...

 

 

If my response as resolved your issue please mark it as solution and give kudos.

View solution in original post

4 REPLIES 4
v-achippa
Community Support
Community Support

Hi @csette1329,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @MattiaFratello and @Anonymous for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @csette1329,

 

We wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Anonymous
Not applicable

Hi @csette1329 ,

The disappearance of relationships in Power Query after switching tunneling methods is usually not about PostgreSQL itself but about how Power BI interprets metadata through the driver/connection. The SSH tunneling change can alter which driver is used, how schemas are exposed, or whether foreign key metadata is surfaced.

 

Try below workarounds.

 

1. Explicitly define relationships in Power BI’s Model view instead of relying on automatic detection. This bypasses the Expand dependency.

 

2. Use views in PostgreSQL that join related tables, so Power BI doesn’t need to infer relationships.

 

3. If possible, revert to the same driver/tunnel setup used in testing (PuTTY) and compare connection strings side by side.

 

Note: The database schema is fine, but the metadata exposure through the connector changed when you switched tunneling methods. Double-check driver versions, schema resolution, and user permissions. If automatic relationships don’t reappear, you may need to manually define them in Power BI.

 

Refer below links.

https://community.fabric.microsoft.com/t5/Desktop/Power-BI-DirectQuery-to-AWS-RDS-PostgreSQL-via-SSH...

 

 

If my response as resolved your issue please mark it as solution and give kudos.

MattiaFratello
Super User
Super User

Hi @csette1329

the only thing that come up in my mind is privileges.

The user must have REFERENCES privileges on the related tables.

 

If this helped please feel free to mark it as a solution and give kudos 👍

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.