Question with JOIN Saved Failed

I tried to do an Custom Question using JOIN, but I receive a “Saved Failed”.

At log, I had:

[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T09:45:11-05:00 INFO metabase.api.card Card results metadata passed in to API is MISSING. Running query to fetch correct metadata.
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T09:45:11-05:00 DEBUG metabase.async.util Running metabase.api.card$save_new_card_async_BANG_$fn__47719@6115d332 on separate thread...
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T09:45:12-05:00 ERROR metabase.async.util Caught error running metabase.api.card$save_new_card_async_BANG_$fn__47719@6115d332
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T09:45:12-05:00 DEBUG metabase.middleware.log POST /api/card 200 [ASYNC: completed] 152.1 ms (57 DB calls) Jetty threads: 3/50 (4 idle, 0 queued) (113 total active threads) Queries in flight: 0

Database: MariaDB 5.5.60
Driver: MySQL
Metabase: 0.33.0

Hi @raragao
Do you have the full stack trace? it seems like it’s only parts of the log.
Is your entire database (connection, tables, columns) using charset/collation utf8mb4?

Hi @flamber,

This is part of log that I get when I entry in Custom Question page:

[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T10:38:00-05:00 DEBUG metabase.middleware.log POST /api/dataset 200 [ASYNC: completed] 72.7 ms (17 DB calls) Jetty threads: 3/50 (4 idle, 0 queued) (119 total active threads) Queries in flight: 0
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T10:38:04-05:00 INFO metabase.api.card Card results metadata passed in to API is MISSING. Running query to fetch correct metadata.
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T10:38:04-05:00 DEBUG metabase.async.util Running metabase.api.card$save_new_card_async_BANG_$fn__47719@3dbf0ee0 on separate thread...
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T10:38:04-05:00 ERROR metabase.async.util Caught error running metabase.api.card$save_new_card_async_BANG_$fn__47719@3dbf0ee0
[8b0a4028-f378-43c3-b00c-eb2245b05077] 2019-08-22T10:38:04-05:00 DEBUG metabase.middleware.log POST /api/card 200 [ASYNC: completed] 191.4 ms (57 DB calls) Jetty threads: 3/50 (4 idle, 0 queued) (120 total active threads) Queries in flight: 0

My db schema is using:

  • characterset: latin1
  • collation: latin1_swedish_ci

And tables are using:

  • collation: utf8_general_ci

Sorry, but it’s a legacy system.

@raragao
I think you need to create an intermediate database, which is running a newer version of MySQL and uses utf8mb4 throughout, and make Metabase connect to that.
By full stack trace, I mean the actual Metabase log (Admin > Troubleshooting > Logs) - I’m not sure where you’re getting the log lines you’re posting, but I’m guessing it’s from some log system.
This is what a full stack trace looks like: https://github.com/metabase/metabase/issues/9891#issuecomment-489471820

Uhm… ok, I’ll test with a new version of MySQL and feedback to you.

I get log on Admin > Troubleshooting > Logs. There are another log with more details ?

@raragao Officially Metabase supports MySQL 5.7+, but several people have had luck with 5.6 too, but 5.5 has really bad chartset/collation support, so I don’t think it will work with that.

1 Like