How does metabase deal with snowflake?

Hi there,

I am trying to understand how does metabase is communicating snowflake. I am seeing a lot of queries like

show /* JDBC:DatabaseMetaData.getColumns() */ columns in table

and

show /* JDBC:DatabaseMetaData.getPrimaryKeys() */ primary keys in table

When and how frequent does metabase performs such queries?

Also, In case of dropping a table from snowflake, I am still getting a tries to fetch that table metadata from metabase side. Does metabase stores the tables somewhere in their metadata database and keeps trying to fetch them even after they're dropped?

Hi @adlimousa
Please post "Diagnostic Info" from Admin > Troubleshooting.
That looks like the sync queries, which are executed hourly by default:
https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#database-sync-and-analysis
Metabase should not try to sync that information after the first sync, when Metabase knows the table/column has been removed and sets it as active=false in the application database.

Hi @flamber,
This is very helpful, thank you.

Here's the Diagnostic Info:

{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.10+9",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "https://adoptopenjdk.net/",
"java.version": "11.0.10",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.10+9",
"os.name": "Linux",
"os.version": "4.14.225-169.362.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"druid",
"snowflake",
"mongo"
],
"hosting-env": "elastic-beanstalk",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "10.15"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
}
},
"run-mode": "prod",
"version": {
"date": "2021-03-17",
"tag": "v0.38.2",
"branch": "release-x.38.x",
"hash": "91f0ed6"
},
"settings": {
"report-timezone": "US/Eastern"
}
}
}