Specify (default) Schema in IBM DB2

Hi,

I'm trying to connect to a IBM DB2 Database (DB2 v11.5.6000.1809) using this driver.
I'm running metabase on Windows10

H:\>java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10)
OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)

If I specify the Database Connection Properties in the Metabase Administration Panel, the connections succeeds and the database is also visible in the data panel of the Metabase start page, but no tables are shown.

That is, because all the tables are located in a specific schema, let's call it example_schema.

If I add a Query in Metabase, e.g.

select * from example_schema.some_table;

it works and retrieves corresponding data.

But how do get those tables to show up in the data panel in the first place?

I already tried to append it to the Database name in the administration panel so that it should resolve to a valid connection string according to the IBM Documenation:

2023-10-02_16h49_09

But that resolves in an Error

Blockquote
[jcc][10165][10051][4.25.13] Invalid database URL syntax: jdbc:db2://servername:50000/db_name:CurrentSchema=example_schema:. ERRORCODE=-4461, SQLSTATE=42815

Note: I just replaced the real connection properties with some dummy values above

Any help is highly appreciated.

Looping @rcronin, but I think you can't specify those values in the "database" field

I wouldn't add the connection property in the database name field. There should be an advanced options button to click to add additional connection properties. Even then, it might not be related to this connection string property. If you sync the connection, what does the log say when it's trying to sync the database?

Unfortunately with this driver there's no advanced option:

The logs look something like this (translated using google as they were in german):

[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:42:24+02:00 DEBUG metabase.server.middleware.log POST /api/database/33/sync_schema 200 14.8 ms (3 DB calls) Apply DB connections: 0/3 Jetty threads: 6/50 (2 idle, 0 waiting) (56 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:42:37+02:00 DEBUG metabase.server.middleware.log GET /api/setup/admin_checklist 200 15.1 ms (9 DB calls) DB- Apply connections: 1/3 Jetty threads: 8/50 (2 idle, 0 waiting) (56 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:42:37+02:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 20.6 ms (5 DB calls) DB- Apply connections: 0/3 Jetty threads: 7/50 (2 idle, 0 waiting) (56 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:42:37+02:00 DEBUG metabase.server.middleware.log GET /api/setting 200 30.5 ms (4 DB calls) Apply DB connections : 0/3 Jetty threads: 7/50 (2 idle, 0 waiting) (56 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:42:51+02:00 DEBUG metabase.server.middleware.log GET /api/setup/admin_checklist 200 10.3 ms (9 DB calls) DB- Apply connections: 0/3 Jetty threads: 6/50 (2 idle, 0 waiting) (56 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:03+02:00 DEBUG metabase.server.middleware.log GET /api/slack/manifest 200 1.0 ms (0 DB calls) DB- Apply connections: 0/3 Jetty threads: 6/50 (2 idle, 0 waiting) (56 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:06+02:00 DEBUG metabase.server.middleware.log GET /api/database 200 10.6 ms (3 DB calls) Apply DB connections : 0/3 Jetty threads: 6/50 (3 idle, 0 waiting) (53 active threads in total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:14+02:00 DEBUG metabase.server.middleware.log GET /api/activity/recent_views 200 10.6 ms (5 DB calls) DB- Apply connections: 1/3 Jetty threads: 7/50 (2 idle, 0 waiting) (53 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:14+02:00 DEBUG metabase.server.middleware.log GET /api/activity/popular_items 200 11.2 ms (6 DB calls) DB- Apply connections: 0/3 Jetty threads: 7/50 (2 idle, 0 waiting) (53 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:21+02:00 DEBUG metabase.server.middleware.log GET /api/alert 200 7.3 ms (1 DB calls) Apply DB connections : 0/3 Jetty threads: 6/50 (2 idle, 0 waiting) (53 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:43:21+02:00 DEBUG metabase.server.middleware.log GET /api/pulse 200 4.6 ms (1 DB calls) Apply DB connections : 0/3 Jetty threads: 6/50 (2 idle, 0 waiting) (53 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:44:31+02:00 DEBUG metabase.server.middleware.log GET /api/setup/admin_checklist 200 11.9 ms (9 DB calls) DB- Apply connections: 0/3 Jetty threads: 8/50 (1 idle, 0 waiting) (48 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:44:31+02:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 24.1 ms (5 DB calls) DB- Apply connections: 0/3 Jetty threads: 7/50 (2 idle, 0 waiting) (50 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:44:31+02:00 DEBUG metabase.server.middleware.log GET /api/setting 200 26.2 ms (4 DB calls) Apply DB connections : 0/3 Jetty threads: 7/50 (2 idle, 0 waiting) (50 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:45:27+02:00 DEBUG metabase.server.middleware.log GET /api/util/bug_report_details 200 5.3 ms (1 DB calls) DB- Apply connections: 0/3 Jetty threads: 6/50 (4 idle, 0 waiting) (55 active threads total) Queries in progress: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:46:05+02:00 DEBUG metabase.server.middleware.log GET /api/user/current 200 12.9 ms (9 DB calls) DB- Apply connections: 1/3 Jetty threads: 7/50 (4 idle, 0 waiting) (54 active threads total) Queries in execution: 0 (0 waiting)
[68abc265-cfc0-49dd-894e-117ba292b7db] 2023-10-02T21:46:05+02:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 14.2 ms (5 DB calls) DB- Apply connections: 0/3 Jetty threads: 6/50 (4 idle, 0 waiting) (54 active threads total) Queries in execution: 0 (0 waiting

Okay - I don't specifically utilize this flavor of the DB2 driver. But if you go to the github page for that driver you reference and click the owner of the repository's profile, his email is posted. He may be able to help you accomplish what you're looking for.

Which one do you use? This was just the only one I found for Windows.

Thank you so far!

We are on the DB2 iSeries (AS400) platform. Are you using LUW?

Yes, I'm on Windows 10 and Windows Server 2012R2. Thanks, I will try to ask the maintainer of the driver.

table synchronization will only work with Metabase v0.46.x, you will have to wait for the plugin to be updated to run on the latest version of metabase