How to connect to Baserow database from PowerBI

How can I query the PostgreSQL database in my hosted account from an outside application like Power BI?

Hey there @Hlombard ,

If you have a are using our SaaS solution, then you data is stored on our Postgres database along with everybody else who uses our SaaS.

You can’t directly query our database since that would mean you could access everyones data who is also using our SaaS solution.

If you want direct access to the underlying Postgres database, you will have to self-host :slightly_smiling_face:

Thanks!

If I self host, how do I connect to the Postgres DB inside the Docker container?

I would like to avoid the effort setting up Baserow with and external database.

I have never used Power BI so I can’t tell you how it works with that tool exactly.

Probably you will have to supply Power BI with an url to the database and credentials to access the database (that’s my guess).

Your postgres docker container should have a url you can use to connect to it, maybe you need to make some slight adjustments to your docker compose, but @nigel might know more about that :slight_smile:

PowerBI connections works the same as other query tools (I use Flyspeed Query).

You have to provide:

Server / Host
Port
Database
User name
Password.

So your response make me think I need to figure out the path to the database.

Do you know what that would be in a standard Docker deployment?

Could it be something like http://localhost/baserow/data/???

Sorry - I’m an accountant so need to be spoon fed

Hey @Hlombard,

You would first need to make sure the database is exposed in your container and that remote users can connect.

I would test by doing a local connection first using a database tool, the host would just be the host of the container but would likely need to be the IP address.

Where this will get really interesting is if you are trying to use the cloud version of PowerBI as you would need to open some firewall ports to allow the connection in and with the wrong configuration it could end up being a security risk.

One thing you could do is use a cloud hosted database then have PowerBI and Baserow talk to that, what I would do though is use the Web connector option in PowerBI and pull data from the Baserow API that might be enough for what you are planning to do.

1 Like