No tables in Redshift DB

I am successfully connected to RedShift Database but the dashboard shows ' This database doesn't have any tables.'

If I fire a query in the DB it runs smoothly. All api requests in console (cmd) are returning 200
Also admin panel stops responding (shows loader) after a while

Metabase v0.39.1
Running JAR file on Windows
Browser Chrome 90.0.4430.93

Hi @arpit
Post "Diagnostic Info" from Admin > Troubleshooting.
If you have just added the database, then Metabase needs to finish syncing before it can show anything in the UI.
Otherwise try to do a manual sync of the schema again - Admin > Databases > (your-db).
And check the log for any errors during sync - Admin > Troubleshooting > Logs.

Diagnostic Info:
{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "Cp1252",
"java.runtime.name": "Java(TM) SE Runtime Environment",
"java.runtime.version": "1.8.0_281-b09",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_281",
"java.vm.name": "Java HotSpot(TM) 64-Bit Server VM",
"java.vm.version": "25.281-b09",
"os.name": "Windows 10",
"os.version": "10.0",
"user.language": "en",
"user.timezone": "Asia/Calcutta"
},
"metabase-info": {
"databases": [
"h2",
"redshift"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.39.1",
"date": "2021-04-27",
"branch": "release-x.39.x",
"hash": "6beba48"
},
"settings": {
"report-timezone": null
}
}
}

I tried manual sync of the schema and found all of the calls returned 200 PFB log:

[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:23+05:30 DEBUG metabase.plugins.jdbc-proxy Registering JDBC proxy driver for com.amazon.redshift.jdbc42.Driver...
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:23+05:30 INFO metabase.sync.util STARTING: step 'sync-timezone' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:23+05:30 INFO metabase.driver.impl Initializing driver :metabase.driver.sql-jdbc.execute.legacy-impl/use-legacy-classes-for-read-and-set...
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:26+05:30 INFO metabase.sync.util FINISHED: step 'sync-timezone' for redshift Database 3 'xyzdb' (2.7 s)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:26+05:30 INFO metabase.sync.util STARTING: step 'sync-tables' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:29+05:30 DEBUG metabase.server.middleware.log GET /api/util/bug_report_details 200 9.1 ms (1 DB calls) App DB connections: 1/4 Jetty threads: 4/50 (2 idle, 0 queued) (48 total active threads) Queries in flight: 0 (0 queued)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util FINISHED: step 'sync-tables' for redshift Database 3 'xyzdb' (4.9 s)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util STARTING: step 'sync-fields' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util FINISHED: step 'sync-fields' for redshift Database 3 'xyzdb' (3.8 ms)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util STARTING: step 'sync-fks' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util FINISHED: step 'sync-fks' for redshift Database 3 'xyzdb' (2.2 ms)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:31+05:30 INFO metabase.sync.util STARTING: step 'sync-metabase-metadata' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: step 'sync-metabase-metadata' for redshift Database 3 'xyzdb' (4.8 s)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: Sync metadata for redshift Database 3 'xyzdb' (12.7 s)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util STARTING: Analyze data for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util STARTING: step 'fingerprint-fields' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: step 'fingerprint-fields' for redshift Database 3 'xyzdb' (2.5 ms)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util STARTING: step 'classify-fields' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: step 'classify-fields' for redshift Database 3 'xyzdb' (2.9 ms)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util STARTING: step 'classify-tables' for redshift Database 3 'xyzdb'
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: step 'classify-tables' for redshift Database 3 'xyzdb' (2.4 ms)
[a64e8c49-3ca8-4be7-92e5-45fedc2a6ab1] 2021-04-28T14:56:35+05:30 INFO metabase.sync.util FINISHED: Analyze data for redshift Database 3 'xyzdb' (22.9 ms)

@arpit Try starting with debug logging enabled for sync:
JAR - example:
java -Dlog4j.configurationFile="https://log4j.us/v2/templates/metabase?trace=metabase.sync" -jar metabase.jar

Hi
I checked the logs seems like the sync process is working fine but not getting any data from redshift. Although I am able to Query data

#################################################################
# Completed sync on xyzdb
# Start: 2021-04-28T15:48:00.031+05:30
# End: 2021-04-28T15:48:10.345+05:30
# Duration: 10.3 s
# ---------------------------------------------------------------
# Completed step 'sync-timezone'
# Start: 2021-04-28T15:48:00.031+05:30
# End: 2021-04-28T15:48:00.771+05:30
# Duration: 740.0 ms
# Found timezone id Asia/Kolkata
# ---------------------------------------------------------------
# Completed step 'sync-tables'
# Start: 2021-04-28T15:48:00.771+05:30
# End: 2021-04-28T15:48:05.552+05:30
# Duration: 4.8 s
# Total number of tables sync'd 0, number of tables updated 0
# ---------------------------------------------------------------
# Completed step 'sync-fields'
# Start: 2021-04-28T15:48:05.552+05:30
# End: 2021-04-28T15:48:05.557+05:30
# Duration: 5.0 ms
# Total number of fields sync'd null, number of fields updated null
# ---------------------------------------------------------------
# Completed step 'sync-fks'
# Start: 2021-04-28T15:48:05.557+05:30
# End: 2021-04-28T15:48:05.564+05:30
# Duration: 7.0 ms
# Total number of foreign keys sync'd 0, 0 updated and 0 tables failed to update
# ---------------------------------------------------------------
# Completed step 'sync-metabase-metadata'
# Start: 2021-04-28T15:48:05.565+05:30
# End: 2021-04-28T15:48:10.345+05:30
# Duration: 4.8 s
#################################################################

@arpit Hmmm..... interesting. I have a feeling that you're seeing this issue, which we haven't received any information on how to reproduce, which makes it close to impossible to fix:
https://github.com/metabase/metabase/issues/15104

I would love to get to the bottom of this, so we can fix this, but we'll need your help.

Are you using some specific combination of privileges?
Is it just a regular "simple" DDL or is it something more exotic like FEDERATED?

I am not using any FEDERATED Query neither DDL Query.
Simple SELECT query works perfectly but Metabase doesn't show tables.

@arpit Okay, I guess it has something to do with your USAGE privileges, but I have no idea what could be the cause, so you'll need to investigate and check the Redshift query logs to get a better understanding of what the problem could be.