The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Power BI Desktop connects to PostgreSQL through its built-in PostgreSQL database connector. For a local server, Desktop can connect directly, but a published semantic model usually needs an on-premises data gateway so the Power BI Service can reach the private network. For Aiven for PostgreSQL, use the service’s assigned host, port, database and credentials, and require TLS. A successful Desktop connection proves only that that computer can reach the database; it does not prove that scheduled refresh in the Power BI Service will work.
The workflow is therefore: connect and shape the data in Power Query, choose Import or DirectQuery deliberately, publish the model, then configure the correct gateway or cloud connection and verify network, credentials and certificate handling.
What you need before connecting
Have the following information ready before opening Power BI Desktop:
Free tools Windows power users keep installed
One-click scans. No signup required.
- The PostgreSQL server host name or IP address.
- The database name and a PostgreSQL account permitted to read the required schemas and tables.
- The server port. PostgreSQL commonly uses 5432, but a non-default port is normal, especially for managed services.
- Whether the server requires SSL/TLS and, if certificate verification is enabled, the issuing CA certificate.
- For a local database that must refresh after publishing, a Windows or Linux machine that can reach PostgreSQL and can run an on-premises data gateway.
Keep the server and database identifiers consistent. If the Desktop model uses an IP address, registering the same source with a host name in the gateway can prevent Power BI from matching the model to the data source.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Connect a local PostgreSQL database in Power BI Desktop
1. Open the native connector
- Start Power BI Desktop and select Home > Get data > PostgreSQL database.
- Enter the PostgreSQL server in Server and the database in Database. If the dialog accepts a port suffix, use the form supported by your Desktop build, such as
server.example:5433; otherwise enter the port in the separate port control. - Select Import or DirectQuery, then select OK.
Current Power BI Desktop releases include the Npgsql provider required by this connector. Microsoft says the provider has been included since December 2019; the October 2024 Desktop release incorporated Npgsql 4.0.17. On those supported releases, a separate provider installation is generally unnecessary.
2. Authenticate
Choose the authentication kind offered by the dialog. Microsoft documents database username/password and Microsoft account authentication for the PostgreSQL connector; which option is usable depends on the server configuration and your organization. Enter credentials for an account with the least privilege needed for the report. Do not put a password into a query or store it in a text file.
3. Select and shape objects
After authentication, Power BI opens Navigator. Expand the database and select the tables or views to use. Choose Load to create the model immediately or Transform Data to open Power Query and filter rows, remove columns, change types, merge queries or apply other transformations before loading.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor repeatable refreshes, prefer database views or a stable query contract over selecting an entire operational table whose columns may change. Confirm data types in Power Query, particularly timestamps, numeric keys and nullable fields, before building relationships and measures.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
4. Handle encrypted local connections
If PostgreSQL is configured for SSL, enable the connector’s encrypted-connection option when it is shown. Microsoft notes that the PostgreSQL server must support SSL and that the client may need the server certificate installed in the operating system’s Trusted Root Certification Authorities store. Install the certificate through your organization’s approved process and verify the certificate chain; do not make an unencrypted connection the normal workaround for a certificate problem.
Import or DirectQuery?
Both modes are available for the PostgreSQL connector, but they make the model behave differently. There is no universal performance winner: the right choice depends on freshness requirements, query shape, source capacity and network conditions.
| Decision point | Import | DirectQuery |
|---|---|---|
| Where queries run | Power BI loads a copy into the semantic model; report interactions normally query that imported model. | Report interactions generate queries against PostgreSQL through the connector. |
| Freshness | Data changes appear after a refresh of the semantic model. | Queries can reflect more current source data, subject to connector, model and service behavior. |
| Performance factors | Interactive speed is driven largely by the imported model, while refresh duration and model size matter. | Every interaction can consume database, gateway and network capacity; indexes, query folding and concurrent users matter. |
| Use it when | Scheduled or manual refresh is acceptable and you want a self-contained analytical model. | Source freshness is important or importing the required volume is impractical, and the database can handle the workload. |
Test representative report pages with your actual schema and expected concurrency. The connector documentation establishes that both modes exist, not that one will be faster for every PostgreSQL installation.
Provider and version boundaries
Provider mismatches usually affect older installations rather than current Desktop builds:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Power BI Desktop releases before December 2019 require a separately installed Npgsql provider for the PostgreSQL connector.
- For that legacy manual-installation path, Microsoft specifies Npgsql 4.0.17.
- Npgsql 4.1 and later are unsupported for this connector because of .NET compatibility constraints.
- A separately installed Npgsql assembly in the Global Assembly Cache (GAC) can override the provider bundled with Power BI Desktop. If behavior changes after an Npgsql installation, check for that override before changing report queries.
Record the Desktop version and provider state when diagnosing a connection that worked on one computer but not another. Upgrading to a supported Desktop release is usually safer than mixing multiple provider versions.
Publish a local connection and make refresh work
A local PostgreSQL server is often reachable from the author’s computer but not from Microsoft’s cloud service. Publishing the report does not move the database onto the public internet. When direct service access is unavailable, use an on-premises data gateway.
1. Prepare the gateway host
- Install a supported on-premises data gateway on a machine that remains online during refresh windows.
- Verify that this machine can resolve and reach the PostgreSQL host and port through firewalls, VPN routes and any network access controls.
- Use a gateway account and PostgreSQL credentials approved by your administrator. The gateway service account needs the permissions required to run the refresh, not broad database administration rights.
The PostgreSQL connector supports cloud connections, virtual network data gateways and on-premises data gateways. Microsoft’s June 2025 on-premises gateway release includes Npgsql, so a current supported gateway normally does not need a separate provider installation.
2. Register the exact data source
In the Power BI Service, open the gateway’s data-source management page and add a PostgreSQL data source. Enter the same server and database identifiers used in the Desktop model, including the same IP address, host name and port representation. Select the matching authentication method and save the credentials.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
A mismatch such as 192.0.2.10 in Desktop and db.internal.example in the gateway can leave the semantic model without a matching data source even when both names resolve to the same machine. Treat the identifier as part of the connection definition, not as a cosmetic label.
3. Bind the published model
- Publish the report from Desktop to the intended workspace.
- Open the semantic model’s Settings in the Power BI Service and locate Gateway and cloud connections (the wording can vary slightly by service update).
- Select the gateway cluster and data source that exactly match the model’s PostgreSQL connection.
- Confirm credentials, run a manual refresh, and inspect refresh history before enabling a schedule.
If the manual refresh fails, fix that failure first. Scheduling a refresh does not bypass a blocked port, an invalid password, a stopped gateway service or a source-name mismatch.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Connect Power BI to Aiven for PostgreSQL
1. Copy the service-specific endpoint
In Aiven Console, open the PostgreSQL service overview or connection-information panel. Copy the assigned host, port, database, user name and password. Aiven assigns service ports, so do not assume that 5432 is correct. Use the value shown for your service.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors2. Enter the endpoint in Power BI
- In Power BI Desktop, select Home > Get data > PostgreSQL database.
- Enter the Aiven host and database. If the connector provides one server box, supply the host with the assigned port in the format accepted by that dialog; if it provides a separate port field, enter the copied port there.
- Select Import or DirectQuery, select OK, and authenticate with the Aiven database credentials.
- Enable the encrypted-connection option, then select tables or views in Navigator and load or transform them.
Aiven requires encrypted external PostgreSQL connections. An attempt made without TLS can therefore be rejected even when the host, port and password are correct.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
3. Understand Aiven certificate modes
Aiven documents sslmode=require as the default requirement. This mode encrypts traffic but does not verify that the server certificate belongs to the intended server. That distinction matters: encryption protects data in transit, while certificate validation helps prevent a connection to an impostor endpoint.
For certificate verification, use verify-ca or verify-full and configure the Aiven project CA certificate. verify-ca checks that the certificate chains to the configured CA. verify-full additionally verifies the server identity against the host name, so the host entered in Power BI must match the certificate’s identity. Microsoft also notes that the client may require the CA certificate in the operating system’s trusted-root store.
Choose the strongest mode your organization supports. If you temporarily use require while diagnosing a certificate chain, document that it provides encryption without certificate validation and replace it with a verified mode after the CA trust configuration is complete.
Recommended Free Tools
Why Desktop succeeds while Service refresh fails
Desktop and the Power BI Service are different execution environments. Desktop uses the author’s network route, installed certificates, saved credentials and local provider. A service refresh uses either Microsoft’s cloud route or the selected gateway machine, with its own network permissions, certificate store and credentials.
Quick Recap
- Gateway not connected: confirm the gateway cluster is online and the service account is running.
- Database unreachable: test DNS resolution, TCP access to the assigned port, firewall rules, VPN routes and PostgreSQL listen/allow rules from the gateway host.
- No matching data source: compare server, port and database strings character for character between Desktop and the gateway registration.
- Permission failure: re-enter the database credentials in the gateway data source and verify that the account can read every table or view used by the model.
- Certificate failure: install the correct CA in the machine used for refresh and check whether the selected SSL mode requires certificate or host-name validation.
- Provider compatibility issue: record Desktop and gateway versions, check for a GAC-installed Npgsql override, and avoid Npgsql 4.1 or newer for this connector.
Operational checklist
- Use a dedicated read-only PostgreSQL account for the model where practical.
- Store credentials in Power BI’s credential store or gateway data-source settings, never in M queries.
- Keep Desktop, gateway and PostgreSQL driver versions within Microsoft’s supported combinations.
- Use Import only when its refresh interval and model-size implications fit the report; use DirectQuery only when the source and network can sustain interactive queries.
- For Aiven, copy the service port instead of assuming 5432 and keep TLS enabled.
- For verified Aiven TLS, distribute the project CA through your managed certificate process and use a host name compatible with
verify-full. - After every endpoint, credential or gateway change, run a manual service refresh and review its history before relying on a schedule.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

