danhuawang commented on issue #11687:
URL: https://github.com/apache/gravitino/issues/11687#issuecomment-4718480296

   Additional symptom observed in `FlinkConnectorViewIcebergOAuth2IT` (which 
uses `catalog_iceberg_s3_3`, a JDBC-backend catalog with 
`credential-providers=s3-token`):
   
   Tests `testQueryThroughView` and 
`testGravitinoApiModifiedViewVisibleInFlink` fail with `NoSuchTableException` 
during `INSERT INTO` — not the expected `PSQLException: no password was 
provided`.
   
   ```
   org.apache.iceberg.exceptions.NoSuchTableException: Table does not exist: 
iv_70da19d1_db.tc_cross_client_base
     at 
org.apache.iceberg.BaseMetastoreCatalog.loadTable(BaseMetastoreCatalog.java:55)
     at 
org.apache.iceberg.flink.TableLoader$CatalogTableLoader.loadTable(TableLoader.java:133)
     at 
org.apache.iceberg.flink.sink.FlinkSink$Builder.chainIcebergOperators(FlinkSink.java:441)
   ```
   
   Root cause is the same as this issue: the Flink Iceberg sink creates a new 
`JdbcCatalog` instance via `TableLoader$CatalogTableLoader`, which has no JDBC 
credentials (because `jdbc-user-password` provider was suppressed by the 
explicit `credential-providers=s3-token`). The catalog connects without a 
password and either silently sees an empty namespace or fails to authenticate, 
surfacing as `NoSuchTableException` rather than a connection error.
   
   `CREATE TABLE` DDL succeeds because it goes through the Gravitino REST API 
(server-side execution where JDBC credentials are available), but `INSERT INTO` 
is executed locally by the Flink Iceberg sink which needs client-side JDBC 
access.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to