Tenant context should not be null when using regular JDBC statements

Whenever I use regular JDBC statements (as in: not prepared statements), the statements fail to run. A simple `INSERT INTO “sometable” SELECT col1, col2 FROM “anothertable”` fails and the raw profile has something along the lines of

  (java.lang.IllegalStateException) Tenant context should not be null
    com.dremio.plugins.dataplane.NessieRepositoryAwareNessieClientImpl.enforceTenantContextCheck():85
    com.dremio.plugins.dataplane.NessieRepositoryAwareNessieClientImpl.withRepositoryContext():64
    com.dremio.plugins.dataplane.NessieRepositoryAwareNessieClientImpl.resolveVersionContext():96
    com.dremio.plugins.dataplane.store.DataplanePlugin.resolveVersionContext():290
    com.dremio.exec.catalog.VersionContextResolverImpl$Loader.load():96

There’s a successful entry for “Arrow Flight Client (create prepared statement)” in the Jobs in Dremio Cloud, but the subsequent line “Arrow Flight Client (execute prepared statement)” fails.

Is it mandatory to use prepared statements? And if so, since when?

@dremmer Let me try to recreate the issue. BAsically you are selecting fron a RDBMS table ad inserting to an Iceberg table via JDBC flight?