Skip to content

Browse data menu does not show tables when using Trino #142

@mithilajoshi

Description

@mithilajoshi

Describe the bug
I cannot see tables in the hive catalog in the Browse menu using the Starburst Trino driver. I can however query these just fine. The logs in Metabase don't point to an issue but I see this happening on the Trino cluster.

This is the last statement that gets executed and then the sync stops. The same statements executes fine via an external client, like DataGrip.

PREPARE statement32743 FROM SHOW TABLES FROM "prod_tmp" LIKE 'training_data'

followed by EXECUTE statement32743 and then a User canceled error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Databases
  2. Click on Sync Database Schemas
  3. Wait
  4. Exit Admin view and go to Browse databases.
  5. Be greeted with This database doesn't have any tables.

Expected behavior
I should be able to browse tables within the Hive Catalog

Logs
[ddf1a859-cc00-4ded-9053-fb37f02cfb20] 2025-01-30T16:18:20-08:00 FATAL metabase.driver.implementation.sync ERROR WITH QUERY #error { :cause nil :via [{:type java.sql.SQLException :message Error executing query: null :at [io.trino.jdbc.TrinoStatement internalExecute TrinoStatement.java 287]} {:type io.trino.jdbc.$internal.guava.base.VerifyException :message nil :at [io.trino.jdbc.$internal.guava.base.Verify verify Verify.java 102]}] :trace [[io.trino.jdbc.$internal.guava.base.Verify verify Verify.java 102] [io.trino.jdbc.TrinoResultSet getColumns TrinoResultSet.java 313] [io.trino.jdbc.TrinoResultSet create TrinoResultSet.java 61] [io.trino.jdbc.TrinoStatement internalExecute TrinoStatement.java 262] [io.trino.jdbc.TrinoStatement execute TrinoStatement.java 240] [io.trino.jdbc.TrinoPreparedStatement executeQuery TrinoPreparedStatement.java 139] [com.mchange.v2.c3p0.impl.NewProxyPreparedStatement executeQuery NewProxyPreparedStatement.java 743] [metabase.driver.implementation.sync$fn__120094 invokeStatic sync.clj 96] [metabase.driver.implementation.sync$fn__120094 invoke sync.clj 90] [clojure.lang.MultiFn invoke MultiFn.java 244] [metabase.driver.implementation.sync$describe_schema$fn__120098 invoke sync.clj 111] [clojure.core$filter$fn__5977$fn__5978 invoke core.clj 2822] [clojure.java.jdbc$init_reduce_rs invokeStatic jdbc.clj 1205] [clojure.java.jdbc$init_reduce_rs invoke jdbc.clj 1197] [clojure.java.jdbc$reducible_result_set_STAR_$reify__43028 reduce jdbc.clj 1227] [clojure.core$transduce invokeStatic core.clj 7025] [clojure.core$into invokeStatic core.clj 7042] [clojure.core$into invoke core.clj 7029] [metabase.driver.implementation.sync$describe_schema invokeStatic sync.clj 108] [metabase.driver.implementation.sync$describe_schema invoke sync.clj 102] [metabase.driver.implementation.sync$all_schemas$fn__120107 invoke sync.clj 126] [clojure.core$map$fn__5950$fn__5951 invoke core.clj 2759] [clojure.java.jdbc$init_reduce_rs invokeStatic jdbc.clj 1205] [clojure.java.jdbc$init_reduce_rs invoke jdbc.clj 1197] [clojure.java.jdbc$reducible_result_set_STAR_$reify__43028 reduce jdbc.clj 1227] [clojure.core$transduce invokeStatic core.clj 7025] [clojure.core$into invokeStatic core.clj 7042] [clojure.core$into invoke core.clj 7029] [metabase.driver.implementation.sync$all_schemas invokeStatic sync.clj 123] [metabase.driver.implementation.sync$all_schemas invoke sync.clj 117] [metabase.driver.implementation.sync$fn__120112$fn__120115 invoke sync.clj 137] [metabase.driver.implementation.execute$fn__120149$fn__120151 invoke execute.clj 71] [metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380 invokeStatic execute.clj 338] [metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380 invoke execute.clj 321] [metabase.driver.implementation.execute$fn__120149 invokeStatic execute.clj 50] [metabase.driver.implementation.execute$fn__120149 invoke execute.clj 48] [clojure.lang.MultiFn invoke MultiFn.java 244] [metabase.driver.implementation.sync$fn__120112 invokeStatic sync.clj 131] [metabase.driver.implementation.sync$fn__120112 invoke sync.clj 129] [clojure.lang.MultiFn invoke MultiFn.java 234] [metabase.sync.fetch_metadata$db_metadata93299__93300 invokeStatic fetch_metadata.clj 30] [metabase.sync.fetch_metadata$db_metadata93299__93300 invoke fetch_metadata.clj 26] [metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015$fn__94016 invoke sync_metadata.clj 69] [metabase.sync.util$do_with_error_handling invokeStatic util.clj 191] [metabase.sync.util$do_with_error_handling invoke util.clj 184] [clojure.core$partial$fn__5929 invoke core.clj 2647] [metabase.driver$fn__59501 invokeStatic driver.clj 914] [metabase.driver$fn__59501 invoke driver.clj 914] [clojure.lang.MultiFn invoke MultiFn.java 239] [metabase.sync.util$sync_in_context$fn__63528 invoke util.clj 167] [metabase.sync.util$with_db_logging_disabled$fn__63525 invoke util.clj 159] [metabase.sync.util$with_start_and_finish_logging_STAR_ invokeStatic util.clj 132] [metabase.sync.util$with_start_and_finish_logging_STAR_ invoke util.clj 126] [metabase.sync.util$with_start_and_finish_logging$fn__63512 invoke util.clj 144] [metabase.sync.util$with_sync_events63502__63503$fn__63507 invoke util.clj 118] [metabase.sync.util$with_duplicate_ops_prevented$fn__63492 invoke util.clj 90] [metabase.sync.util$do_sync_operation63543__63544 invokeStatic util.clj 216] [metabase.sync.util$do_sync_operation63543__63544 invoke util.clj 210] [metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015 invokeStatic sync_metadata.clj 68] [metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015 invoke sync_metadata.clj 65] [metabase.api.database$fn__106499$fn__106504 invoke database.clj 1017] [clojure.core$binding_conveyor_fn$fn__5842 invoke core.clj 2047] [clojure.lang.AFn call AFn.java 18] [java.util.concurrent.FutureTask run FutureTask.java 264] [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1128] [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 628] [java.lang.Thread run Thread.java 829]]} [ddf1a859-cc00-4ded-9053-fb37f02cfb20] 2025-01-30T16:18:20-08:00 INFO metabase.sync.util FINISHED: Sync metadata for starburst Database 2 ''Trino'' (20.0 mins) [ddf1a859-cc00-4ded-9053-fb37f02cfb20] 2025-01-30T16:18:20-08:00 INFO metabase.sync.util STARTING: Analyze data for starburst Database 2 ''Trino'' [ddf1a859-cc00-4ded-9053-fb37f02cfb20] 2025-01-30T16:18:20-08:00 WARN metabase.sync.util Error in sync step Sync metadata for starburst Database 2 ''Trino'',java.sql.SQLException: ResultSet is closed, at io.trino.jdbc.AbstractTrinoResultSet.checkOpen(AbstractTrinoResultSet.java:1852), at io.trino.jdbc.AbstractTrinoResultSet.next(AbstractTrinoResultSet.java:210), at io.trino.jdbc.TrinoResultSet.next(TrinoResultSet.java:45), at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:4511), at clojure.java.jdbc$init_reduce_rs.invokeStatic(jdbc.clj:1204), at clojure.java.jdbc$init_reduce_rs.invoke(jdbc.clj:1197), at clojure.java.jdbc$reducible_result_set_STAR_$reify__43028.reduce(jdbc.clj:1227), at clojure.core$transduce.invokeStatic(core.clj:7025), at clojure.core$into.invokeStatic(core.clj:7042), at clojure.core$into.invoke(core.clj:7029), at metabase.driver.implementation.sync$describe_schema.invokeStatic(sync.clj:108), at metabase.driver.implementation.sync$describe_schema.invoke(sync.clj:102), at metabase.driver.implementation.sync$all_schemas$fn__120107.invoke(sync.clj:126), at clojure.core$map$fn__5950$fn__5951.invoke(core.clj:2759), at clojure.java.jdbc$init_reduce_rs.invokeStatic(jdbc.clj:1205), at clojure.java.jdbc$init_reduce_rs.invoke(jdbc.clj:1197), at clojure.java.jdbc$reducible_result_set_STAR_$reify__43028.reduce(jdbc.clj:1227), at clojure.core$transduce.invokeStatic(core.clj:7025), at clojure.core$into.invokeStatic(core.clj:7042), at clojure.core$into.invoke(core.clj:7029), at metabase.driver.implementation.sync$all_schemas.invokeStatic(sync.clj:123), at metabase.driver.implementation.sync$all_schemas.invoke(sync.clj:117), at metabase.driver.implementation.sync$fn__120112$fn__120115.invoke(sync.clj:137), at metabase.driver.implementation.execute$fn__120149$fn__120151.invoke(execute.clj:71), at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380.invokeStatic(execute.clj:338), at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380.invoke(execute.clj:321), at metabase.driver.implementation.execute$fn__120149.invokeStatic(execute.clj:50), at metabase.driver.implementation.execute$fn__120149.invoke(execute.clj:48), at clojure.lang.MultiFn.invoke(MultiFn.java:244), at metabase.driver.implementation.sync$fn__120112.invokeStatic(sync.clj:131), at metabase.driver.implementation.sync$fn__120112.invoke(sync.clj:129), at clojure.lang.MultiFn.invoke(MultiFn.java:234), at metabase.sync.fetch_metadata$db_metadata93299__93300.invokeStatic(fetch_metadata.clj:30), at metabase.sync.fetch_metadata$db_metadata93299__93300.invoke(fetch_metadata.clj:26), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015$fn__94016.invoke(sync_metadata.clj:69), at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:191), at metabase.sync.util$do_with_error_handling.invoke(util.clj:184), at clojure.core$partial$fn__5929.invoke(core.clj:2647), at metabase.driver$fn__59501.invokeStatic(driver.clj:914), at metabase.driver$fn__59501.invoke(driver.clj:914), at clojure.lang.MultiFn.invoke(MultiFn.java:239), at metabase.sync.util$sync_in_context$fn__63528.invoke(util.clj:167), at metabase.sync.util$with_db_logging_disabled$fn__63525.invoke(util.clj:159), at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:132), at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:126), at metabase.sync.util$with_start_and_finish_logging$fn__63512.invoke(util.clj:144), at metabase.sync.util$with_sync_events63502__63503$fn__63507.invoke(util.clj:118), at metabase.sync.util$with_duplicate_ops_prevented$fn__63492.invoke(util.clj:90), at metabase.sync.util$do_sync_operation63543__63544.invokeStatic(util.clj:216), at metabase.sync.util$do_sync_operation63543__63544.invoke(util.clj:210), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015.invokeStatic(sync_metadata.clj:68), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015.invoke(sync_metadata.clj:65), at metabase.api.database$fn__106499$fn__106504.invoke(database.clj:1017), at clojure.core$binding_conveyor_fn$fn__5842.invoke(core.clj:2047), at clojure.lang.AFn.call(AFn.java:18), at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), at java.base/java.lang.Thread.run(Thread.java:829) [ddf1a859-cc00-4ded-9053-fb37f02cfb20] 2025-01-30T16:18:20-08:00 ERROR metabase.sync.fetch-metadata Error while fetching metdata with 'db-metadata',java.sql.SQLException: ResultSet is closed, at io.trino.jdbc.AbstractTrinoResultSet.checkOpen(AbstractTrinoResultSet.java:1852), at io.trino.jdbc.AbstractTrinoResultSet.next(AbstractTrinoResultSet.java:210), at io.trino.jdbc.TrinoResultSet.next(TrinoResultSet.java:45), at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:4511), at clojure.java.jdbc$init_reduce_rs.invokeStatic(jdbc.clj:1204), at clojure.java.jdbc$init_reduce_rs.invoke(jdbc.clj:1197), at clojure.java.jdbc$reducible_result_set_STAR_$reify__43028.reduce(jdbc.clj:1227), at clojure.core$transduce.invokeStatic(core.clj:7025), at clojure.core$into.invokeStatic(core.clj:7042), at clojure.core$into.invoke(core.clj:7029), at metabase.driver.implementation.sync$describe_schema.invokeStatic(sync.clj:108), at metabase.driver.implementation.sync$describe_schema.invoke(sync.clj:102), at metabase.driver.implementation.sync$all_schemas$fn__120107.invoke(sync.clj:126), at clojure.core$map$fn__5950$fn__5951.invoke(core.clj:2759), at clojure.java.jdbc$init_reduce_rs.invokeStatic(jdbc.clj:1205), at clojure.java.jdbc$init_reduce_rs.invoke(jdbc.clj:1197), at clojure.java.jdbc$reducible_result_set_STAR_$reify__43028.reduce(jdbc.clj:1227), at clojure.core$transduce.invokeStatic(core.clj:7025), at clojure.core$into.invokeStatic(core.clj:7042), at clojure.core$into.invoke(core.clj:7029), at metabase.driver.implementation.sync$all_schemas.invokeStatic(sync.clj:123), at metabase.driver.implementation.sync$all_schemas.invoke(sync.clj:117), at metabase.driver.implementation.sync$fn__120112$fn__120115.invoke(sync.clj:137), at metabase.driver.implementation.execute$fn__120149$fn__120151.invoke(execute.clj:71), at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380.invokeStatic(execute.clj:338), at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87379__87380.invoke(execute.clj:321), at metabase.driver.implementation.execute$fn__120149.invokeStatic(execute.clj:50), at metabase.driver.implementation.execute$fn__120149.invoke(execute.clj:48), at clojure.lang.MultiFn.invoke(MultiFn.java:244), at metabase.driver.implementation.sync$fn__120112.invokeStatic(sync.clj:131), at metabase.driver.implementation.sync$fn__120112.invoke(sync.clj:129), at clojure.lang.MultiFn.invoke(MultiFn.java:234), at metabase.sync.fetch_metadata$db_metadata93299__93300.invokeStatic(fetch_metadata.clj:30), at metabase.sync.fetch_metadata$db_metadata93299__93300.invoke(fetch_metadata.clj:26), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015$fn__94016.invoke(sync_metadata.clj:69), at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:191), at metabase.sync.util$do_with_error_handling.invoke(util.clj:184), at clojure.core$partial$fn__5929.invoke(core.clj:2647), at metabase.driver$fn__59501.invokeStatic(driver.clj:914), at metabase.driver$fn__59501.invoke(driver.clj:914), at clojure.lang.MultiFn.invoke(MultiFn.java:239), at metabase.sync.util$sync_in_context$fn__63528.invoke(util.clj:167), at metabase.sync.util$with_db_logging_disabled$fn__63525.invoke(util.clj:159), at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:132), at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:126), at metabase.sync.util$with_start_and_finish_logging$fn__63512.invoke(util.clj:144), at metabase.sync.util$with_sync_events63502__63503$fn__63507.invoke(util.clj:118), at metabase.sync.util$with_duplicate_ops_prevented$fn__63492.invoke(util.clj:90), at metabase.sync.util$do_sync_operation63543__63544.invokeStatic(util.clj:216), at metabase.sync.util$do_sync_operation63543__63544.invoke(util.clj:210), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015.invokeStatic(sync_metadata.clj:68), at metabase.sync.sync_metadata$sync_db_metadata_BANG_94014__94015.invoke(sync_metadata.clj:65), at metabase.api.database$fn__106499$fn__106504.invoke(database.clj:1017), at clojure.core$binding_conveyor_fn$fn__5842.invoke(core.clj:2047), at clojure.lang.AFn.call(AFn.java:18), at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), at java.base/java.lang.Thread.run(Thread.java:829)

Screenshots

Image

Severity
This is mostly really annoying to users who want to evaluate Metabase

Metabase Diagnostic Info

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "metabase-info": {
    "databases": [
      "h2",
      "starburst"
    ],
    "run-mode": "prod",
    "plan-alias": "",
    "version": {
      "date": "2025-01-15",
      "tag": "v0.52.6",
      "hash": "1a9cb72"
    },
    "settings": {
      "report-timezone": null
    },
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "16.3"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.7.3"
      }
    }
  },
  "system-info": {
    "file.encoding": "ANSI_X3.4-1968",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.17+8",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.17",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.17+8",
    "os.name": "Linux",
    "os.version": "5.10.225-213.878.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "UTC"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions