Sessions Table causes buggy questions

Hello Metabase team,

One of my MySQL table is called "sessions". I used it in many LEFT JOIN querries/questions to filter or segment some users.

I notice since this week that this table is no longer accessible and that all the questions that were built with this table are buggy (displaying "0" or wrong data).

My Metabase version was 0.34 but I've tried in another 0.43 instance and the bug still persists.

As you can see on my screenshot the filter remains but the LEFT JOIN relation with the sessions table (as well as any other left join relations) have disappeared.

Many thanks for your support on this matter. I have around 150 questions that are no longer working.

Best,
Jérémy

Hi @jeremy-ezus
I'm guessing that you have hidden your Sessions table in Admin > Data Model.
If something suddenly stops working overnight, then there must have been a manual change to Metabase or your data. Computers very rarely starts behaving differently from one day to another.
Otherwise revert to your backup from when it used to work.
You should definitely upgrade from 0.34.

Hello flamber,

Thank you four your feedback.

I've tried in a fresh new instance with no legacy and the issue with the "sessions" table is still there.

  1. I cannot select it in whenever I want to draft a new question.
  2. When I run a manual sql query if I Left Join with the session table, the result will systematically be 0.
  3. In The Metabase Admin menu the sessions table is hidden by default and when I unhide it, it's grey (and the problems 1 and 2 still persist)
    image

Last week, I have updated the password of the metabase-user of my database (and updated it also in metabase). It's the only main change I recall. Very wierd bug.

I can reproduce it even with a fresh new database : you can reproduce it if you want to dig a little bit more. To do so, you need to try to connect a 5.7 MySQL database with a sessions table in a clean 0.43 metabase instance.

Thank you for your help,
Jérémy

@jeremy-ezus Try running the SQL query directly on MySQL with the same user as Metabase uses.
Metabase will automatically hide sessions tables, along with a few others, on new setups:
https://github.com/metabase/metabase/blob/master/src/metabase/sync/sync_metadata/tables.clj
When you unhide the table, then it will be shown. Run sync again via Admin > Databases > (db) > Sync database schema now.

1 Like

Thank you for your support.
I did this and refresh the cache and it works well now.