Metabase shows unselected schemes in database

After upgrading to v0.36.3 Metabase shows all schemas to users even though a specific schema is identified in the connection string.
This is having a huge negative affect on our metabase usage.

We store all our ‘end analytics’ tables in a single Snowflake schema, we then have a number of other sensitive/other schema which metabase should not have access to.
Previously in v0.35.4, all works fine for us. Can someone advise on this or point me to the open issue if its a known problem?

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.8+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.8",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.8+10",
    "os.name": "Linux",
    "os.version": "4.9.0-11-amd64",
    "user.language": "en",
    "user.timezone": "UTC"
  },
  "metabase-info": {
    "databases": [
      "snowflake"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "9.5.16"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-08-04",
      "tag": "v0.36.3",
      "branch": "release-0.36.x",
      "hash": "a792f14"
    },
    "settings": {
      "report-timezone": "US/Eastern"
    }
  }
}

Hi @martasakal
What is your question/problem? It sounds like you’re seeing schemas, which the user doesn’t have privileges to. There’s work being done to try to only show the schemas that are selectable:
https://github.com/metabase/metabase/pull/10892

Hi @flamber will it be possible to use the same database user for connecting to different schemas in one database? For example, I have schemas A and B in one source database and want to expose them in different Metabase databases to manage user’s access.

@martasakal You can connect to the same database multiple times.

@flamber but will I be able to expose different schemas in these databases?
Cause for now it shows all schemas.
And what is the purpose of ‘Schema’ property in Database connection configuration if it shows all schemas anyway?

@martasakal Metabase supports ~15 databases in it’s core, and a lot more with third-party drivers. “Schema” is specific to Snowflake and probably something to do with it’s connection handling.
You can control which schemas are available in Admin > Permissions.

There are several issues open about having more control of schema visibility - have a look at some of the issues referenced here - upvote the ones you want by clicking :+1: on the first post of each issue:
https://github.com/metabase/metabase/issues/2146#issuecomment-631995455

@flamber Thanks!
What I’m curious about, that in the previous version we got particular schema by specifying “Schema” name. And all schemas were showing only if “Schema” wasn’t specified.

@martasakal Okay, so it’s information like that you should start out with. And which version you were using before.
Please open a new issue about that:
https://github.com/metabase/metabase/issues/new/choose
I would guess it’s caused by one of these PRs:
https://github.com/metabase/metabase/pull/12936
https://github.com/metabase/metabase/pull/12832

For reference: https://github.com/metabase/metabase/issues/13126