Connecting Baserow and Metabase (or connect to external DB?)

Please fill in the questionnaire below.

Technical Help Questionnaire

Have you read and followed the instructions at: *READ ME FIRST* Technical Help FAQs - #2 by nigel ?

Answer: Yes

Self-Hosted Installation and Setup Questions

How have you self-hosted Baserow.

Deployment using Docker Compose via Portainer using the AIO image

What are the specs of the service or server you are using to host Baserow.

Deployed on a server with 8GB RAM available

Which version of Baserow are you using.

1.30.1

How have you configured your self-hosted installation?

version: '3.8'
services:
  baserow:
    image: baserow/baserow:latest
    container_name: baserow
    ports:
      - '280:80'
      - '2443:443'
    environment:
      TZ: ''
      BASEROW_PUBLIC_URL: 'http://10.0.0.100:280'
    volumes:

What commands if any did you use to start your Baserow server?

Deployment via Portainer, equivalent to “docker compose up -d” I guess

Describe the problem

Describe, step by step, how to reproduce the error or problem you are encountering.

Provide screenshots or include share links showing:

Hello,

My use case seems the most basic use of Baserow and Metabase, but I can’t find any questions or tutorial online for it, so maybe I’m missing something…

I want to create a user-friendly database (and possibly import data via Excel/CSV file) and then analyze the content of the DB, using docker compose for the setup (and any ulterior setup necessary)

I tried using NocoDB instead of Baserow, but it’s just too basic, and I want to give a shot to Baserow + Metabase. Except I want to make sure what I’m trying to do is doable before I start investigating.

Two questions then:

  • Can I or not connect Baserow to an external PostgreSQL DB? (In which case I should be able to connect both Baserow and Metabase to the same DB, and voilĂ )

  • If I can’t, how do I connect Metabase to the Baserow DB, if I’m using the AIO docker container for Baserow? I don’t have any port exposed for the DB, right?

I selfhost something like 45 containers and it all runs quite smoothly but I learned it all by trial and error, so I’m a little lost once we get outside of the basic configurations.

N.b. even with NocoDB, I didn’t get to trying to connect NocoDB and Baserow to the same PostgreSQL DB.

Hi @Buck,

If you mean using Baserow to browse and edit data in an existing PostgreSQL database then the answer is no. You can make Baserow use an external PostgreSQL server but it needs its own database. You can also use Baserow data sync feature to load data from a PostgreSQL table into Baserow if needed.

If I can’t, how do I connect Metabase to the Baserow DB.

You technically can but you would need to have internal Baserow know-how to be able to pull/select the data correctly. So I am not sure if that would really work for you. Maybe you would be able to do it for simple things.

I don’t have any port exposed for the DB, right?

I think it is not exposed by default.

Hello @petrs,

To make it clear, for you, there is no easy way to display Baserow data in Metabase, even when successfully accessing the Baserow DB from Metabase?

Because I did successfully use an external Postgres DB for Baserow, I did successfully connect Metabase to that DB, but as you foresaw, it is completely unreadable.

I feel like there could be a weird integration where I automate a “copy” of what is entered in Baserow to an external DB in simple SQL format, in order to be able to visualize it, but it would be competely overkill and over-engineered.

From what I understand, there is no simple way to visualize Baserow data :frowning:

It is one of the reasons why we are building Dashboard builder with visualization widgets where you will be able to put Baserow table data into charts etc.

Because I did successfully use an external Postgres DB for Baserow, I did successfully connect Metabase to that DB, but as you foresaw, it is completely unreadable.

You can find the tables by their ID (found in the URL or the API docs) when you use Metabase.
You will basically need to read the field identifiers from the API docs baserow generates, because in the database the IDs are used for the columns and not the Titles.

In the Metabase admin you have a section for setting table metadata. Here you can rename columns from field_XXXX to something more clear and usable.

Moreover fields like select fields are difficult to use in Metabase. Here you could “flatten” the data with the totext() function in Baserow.

Dependant on you usecase it might be good to work with an intermediate table to flatten data to have them more usable in Metabase.

Or you could use an ETL process like you would do in data warehousing.

1 Like