{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreidftbmwl24sbfvxrxbyy3pp33tgyvvu2sadfs2rfuixmeo7772dgu",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mpu2tgpl7nr2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreid5ggefdxcvgu2uqfeihk73rhdo7nv2lsksgqovfpmcamqecifhyq"
    },
    "mimeType": "image/webp",
    "size": 445788
  },
  "path": "/neema_kirui/from-my-machine-to-the-cloud-connecting-power-bi-to-sql-databases-postgresql-local-vs-aiven-5hc3",
  "publishedAt": "2026-07-04T21:26:12.000Z",
  "site": "https://dev.to",
  "tags": [
    "postgres",
    "database",
    "analytics",
    "datascience",
    "@pg-xxxxxxxx-yourproject.c.aivencloud.com"
  ],
  "textContent": "##  Introduction\n\nI used to think \"connecting to a database\" was one skill. Turns out it's two: connecting to a database chilling quietly on your own laptop, and connecting to one living in the cloud, behind a login, in this case, an SSL certificate that will not let you in until you treat it with respect.\n\nThis week I did both. Same tool (Power BI), same dataset, two very different vibes.\n\nGrab a coffee, here's the full walkthrough local PostgreSQL first, then Aiven's cloud version, side by side, screenshots and all.\n\n##  Part 1: Local PostgreSQL → Power BI\n\n###  Step 1 : Create a schema\n\nNothing fancy, just giving my table a home:\n\n\n\n    CREATE SCHEMA powerbi;\n\n\n\n###  Step 2 : Import the dataset\n\nRight-click the new schema → **Import Data** in DBeaver, point it at your CSV, and let the wizard do its thing.\n\n###  Step 3 : Check the table landed properly\n\nA quick peek at the columns to make sure nothing got mangled on the way in.\n\n###  Step 4 : Connect Power BI\n\nIn Power BI Desktop: **Get Data → Database → PostgreSQL database.**\n\nIn the Server field, type `localhost` (or `127.0.0.1`) and your database name.\n\n\n\n    localhost\n\n\nChoose **Import** , hit OK, and log in with your local username and password.\n\nClick **Load**. That's it. That's the whole local experience.\n\n##  Part 2: Aiven PostgreSQL (Cloud) → Power BI\n\nNow for the part that actually taught me something.\n\n###  Step 1 : Grab your connection details\n\nEverything you need lives on Aiven's Overview page: Host, Port, Database name, User, SSL mode.\n\nYour service URI will look something like this (don't worry, this isn't a real password, Aiven masks it in the console):\n\n\n\n    postgres://avnadmin:••••••••@pg-xxxxxxxx-yourproject.c.aivencloud.com:22016/defaultdb?sslmode=require\n\n\n###  Step 2 : Import the dataset into Aiven\n\nSame DBeaver wizard as before, just pointed at the Aiven connection instead of local.\n\n\n\n    CREATE SCHEMA powerbi;\n\n\n###  Step 3 : Aiven's certificate.\n\nDownload the CA cert from the Overview page:\n\nNow here's the part that actually tripped me up: Power BI's PostgreSQL connector doesn't have a field where you paste in a certificate file path (DBeaver does, Power BI doesn't). Instead, on Windows, you install the cert into **Windows' own certificate store** , since Power BI leans on the OS to handle SSL validation.\n\nOnce Windows trusts it, Power BI trusts it too. No settings to toggle inside Power BI itself.\n\n###  Step 4 : Connect Power BI to Aiven\n\nSame dialog, new server string:\n\n\n\n    pg-xxxxxxxx-yourproject.c.aivencloud.com\n\n\nDatabase: `defaultdb`\n\nLog in with your Aiven username and password. Since the cert is already trusted system-wide, no extra SSL prompts show up it just connects.\n\n##  Local vs Aiven: Side by Side\n\nStep | Local PostgreSQL | Aiven PostgreSQL\n---|---|---\nServer address | `localhost` | Full Aiven host string\nPort | Default `5432` | Custom port from Aiven console\nSSL/certificate setup | None | Download CA cert, trust it via Windows Certificate Manager\nPower BI dialog | Identical | Identical\nCredentials prompt | Username/password | Username/password (SSL handled invisibly behind the scenes)\n\nSame tool, same steps on the surface. The only real difference is one extra layer of trust you have to set up before the cloud database will even talk to you and once it's set up, it disappears completely. You never think about it again.",
  "title": "From My Machine to the Cloud: Connecting Power BI to SQL Databases; PostgreSQL (Local vs Aiven)"
}