Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
I am using PostgreSQL without a gateway and also without encryption.
The connection is set not to have encryption. In Dataflow, it works fine.
However, if I wanna use either import or direct query without dataflow, if I wanna refresh (import) or view visuals (direct query), I get a message like this:
The PostgreSQL source doesn't support encrypted connections. (Source at myDb). The exception was raised by the IDbCommand interface.
I understand what it says, however, I am not using an encrypted connection, and the same connection works just fine through Dataflow (so at least Import can be bypassed by it).
Let's assume that I cannot use On-Premise Gateway, nor add SSL certificate and I need Direct Query.
Any ideas? And also ideas why it works in Dataflow Gen 1?
Solved! Go to Solution.
Hi @vojtechsima
Yeah, this is one of those cases where things work differently behind the scenes. Dataflow Gen1 could connect to PostgreSQL without SSL because it didn’t strictly enforce encryption. But when you use Import or DirectQuery in Power BI (outside Dataflow), it goes through the standard PostgreSQL connector and that does require SSL, even if your server allows unencrypted access.
So even though the same connection works in Dataflow, it fails in Import/DirectQuery unless SSL is enabled.
Unfortunately, there’s no official way to bypass that. You’d need to:
Enable SSL on the PostgreSQL server
Or set up a gateway that allows internal, secured access
References:
https://learn.microsoft.com/en-us/power-query/connectors/postgresql
https://community.fabric.microsoft.com/t5/Service/Dataflow-connection-to-PostgreSQL/m-p/4698357
Hi @vojtechsima
Just checking the @rohit1991 has already shared insights on this, we wanted to see if the solution helped resolve your issue.If you're still encountering the same error or need further assistance, feel free to let us know we're here to help!
Hi @vojtechsima
Yeah, this is one of those cases where things work differently behind the scenes. Dataflow Gen1 could connect to PostgreSQL without SSL because it didn’t strictly enforce encryption. But when you use Import or DirectQuery in Power BI (outside Dataflow), it goes through the standard PostgreSQL connector and that does require SSL, even if your server allows unencrypted access.
So even though the same connection works in Dataflow, it fails in Import/DirectQuery unless SSL is enabled.
Unfortunately, there’s no official way to bypass that. You’d need to:
Enable SSL on the PostgreSQL server
Or set up a gateway that allows internal, secured access
References:
https://learn.microsoft.com/en-us/power-query/connectors/postgresql
https://community.fabric.microsoft.com/t5/Service/Dataflow-connection-to-PostgreSQL/m-p/4698357