Snowflake broken in 0.48.1

After we upgraded to hosted Metabase version 0.48.1 , we are only able to see 1 schema and its tables from our Snowflake database in the "Browse Data" section and can only create Questions from the tables in that 1 schema. Previously we were able to see all schema / tables in those sections of Metabase.

I tried creating a new user in Snowflake and changed the database credentials in Metabase to see if that would change anything, but it didn't. I added a new Snowflake database instance w/ the same credentials as the preexisting Snowflake database, and when I go to "Browse Data" for it, I am able to see all of the schemas/tables. The original Snowflake database still only show tables from 1 schema.

1 Like

Note that I am able to query all schemas / tables in the SQL editor no problem. However, I can only see the tables for 1 schema when browsing data or creating a Question. This makes creating no-code visualizations impossible for all of the missing tables.

We're running into the same issue here.

Hi, I’ve been trying to get help to reproduce this issue without success. If we can’t reproduce that you’re hitting then we can’t fix this. Can you please provide any consistent reproduction steps for this? Thanks

We are also having this issue. Seems likely to come from this PR: Sync dynamic tables for snowflake by qnkhuat · Pull Request #36121 · metabase/metabase · GitHub

I don't know clojure so am struggling to understand where an "old-table" is defined, but that may be why it's tricky to reproduce?

I need to know what the dissapearing schemas have in common. I created several schemas in snowflake and they all sync perfectly

Can you tell me what properties of these schemas/tables might impact this? Then I can give you those properties.

The one schema that is still shown is the first schema created in the database. Not sure if that's a hint or a red-herring.

I need to see the connection page to see if you used any role, and then in the snowflake console, the permissions of that role

e.g.

Sure, here are the Metabase connection details, and the permissions for that role on a schema and table that isn't being shown in Metabase (though we can still query it). Note these permissions are identical for the schema/tables that are being shown in Metabase. (I don't really think it's a permission issue)



thanks, and what about the DB, does it have usage as well?

Yeah, USAGE on the db (along with SELECT on future stuff):

are you able to log in on another SQL client with a user that has the same role and run "SHOW OBJECTS IN DATABASE "xxxx";"

replace xxxx for the name of the database where the schemas dissapeared

Yeah, here's a screenshot of the top of the results, let me know if you want something specific. It does return a bunch of objects in schemas that are currently disappeared in Metabase.

thanks, and if you do a sync in Metabase, which queries do you see that Metabase runs on snowflake?

It ran a lot of queries, so this is grouping them by the first 53 characters in the query text.

Summary of things that might be interesting:

  • It ran show columns on every table
  • It ran show primary keys on every table
  • It only ran show imported keys, only on tables in the schema that has not disappeared
  • It also ran SELECT TRUE AS "_" FROM {table} WHERE 1 <> 1 LIMIT 0, also only on tables in the schema that has not disappeared

Hope this helps!


Can you try setting some tables as active in the app db and then run the sync process again?

Can that be done within Metabase UI, or are you saying do that in postgres directly?

In Postgres, check the Metabase_table table

Ok, we updated a table that had active=false, but existed in Snowflake, to be active=true, and then it was back visible in Metabase. Then we did a database sync in Metabase and now the table is back to active=false

Great that’s what I wanted to happen, can you see the queries that Metabase run? I want to see why Metabase believes that table is no longer there