Problem connecting with Metabase >= 0.48.4

Hello,

I’ve installed a CrateDB cluster (v 5.9.2) on Hetzner Cloud, 5 nodes on ARM machines (ubuntu 24.04).

Each node has 4cpu, 8GB ram, external extensible SSD.

I am feeding it daily/hourly with various data arriving from my ingestion scripts (bulk inserts from HTTP POST and/or COPY table FROM … distributed across all nodes.)

Everything works well and I can query it via ad-hoc written queries (I use PHP PDO and it works!)

I want to link CrateDB with Metabase (v 51.6). It seems connected but when I tries to synchronize it hangs forever and never gives the list of tables with which proceed to build the dashboards.

Going to look at the Metabase logs I see that there is an error

org.postgresql.util.PSQLException: ERROR: line 5:20: no viable alternative at input ‘select\n NULL as role,\n t.schemaname as schema,\n t.objectname as table’

If I try to execute the same query inside one of the nodes (from crash or from web console) I get the same error

io.crate.exceptions.SQLParseException: line 1:62: no viable alternative at input ‘select NULL as role, t.schemaname as schema, t.objectname as table’

Any help is appreciated.
Massimo

1 Like

Hi Massimo,
This is a known issue that we are looking to address.
In the immediate you have 2 options, you can downgrade Metabase to v0.47.13 or you can edit the file under driver/postgres.clj changing the aliases as schema , as table, etc to all use double quotes like as "schema" , as "table" , etc., like demonstrated here.

I hope this helps.

1 Like

Thanks Hernan,
are you telling me I have to modify Metabase to make it work with CrateDB?

At this point I can’t figure out if the problem is with Metabase or CrateDB !

If the problem is on the Metabase side, I can’t follow your advice as it becomes a potential problem for me on future releases of Metabase which I will definitely want to adopt for all the new features they release. I use the PRO version of Metabase and as CrateDB is an unsupported data source, I cannot open an issue on the Metabase side.

If, however, the problem is on the CrateDB side, i.e. how the connection and/or synchronization involving Metabase towards the CrateDB cluster is managed, I am interested in understanding whether it will be resolved by you in order to evaluate the complete adoption of CrateDB in my context.

I hope you will understand.

Thank you

Massimo

1 Like

Dear Massimo,

thank you for writing in. We are currently exploring the situation at Metabase v0.48.4: Problem connecting CrateDB · Issue #153 · crate/crate-clients-tools · GitHub, and will most likely need to come up with a dedicated data source adapter for CrateDB that will be submitted to Metabase, so it will be natively supported.

That means the adapter will still significantly inherit capabilities from the PostgreSQL adapter, but will then be able to accompany for any differences in SQL dialect and other details.

We are currently working on it and kindly ask for your patience to improve the situation. We will inform you about any progress as we go.

With kind regards,
Andreas.

1 Like

Looks great to hear about a native Metabase adapter :slight_smile:

Keep me (and the community too!) informed on evolution.

Regards.

Massimo

On another note, we would love to understand your context, could you tell us a bit more about your use-case?

Thanks!

Just for the records, the CI job run on this PR demonstrates that Metabase connectivity works up to version 0.48.3, and goes south with 0.48.4.

Relevant changes to Metabase are reflected within the Driver Interface Changelog for Metabase 0.49.0.