{"record":{"id":"bc3edbad8aeddf2c","repo":"apache/iceberg","slug":"got-non-successful-table-metadata-with-metadat","errorCode":null,"errorMessage":"Got non-successful table metadata: {} with metadataLocation {} for table {}","messagePattern":"Got non-successful table metadata: (.+?) with metadataLocation (.+?) for table (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeTableOperations.java","lineNumber":89,"sourceCode":"  protected String tableName() {\n    return fullTableName;\n  }\n\n  @VisibleForTesting\n  String fullTableName() {\n    return tableName();\n  }\n\n  private String loadTableMetadataLocation() {\n    SnowflakeTableMetadata metadata =\n        snowflakeClient.loadTableMetadata(snowflakeIdentifierForTable);\n\n    if (metadata == null) {\n      throw new NoSuchTableException(\"Cannot find table %s\", snowflakeIdentifierForTable);\n    }\n\n    if (!metadata.getStatus().equals(\"success\")) {\n      LOG.warn(\n          \"Got non-successful table metadata: {} with metadataLocation {} for table {}\",\n          metadata.getStatus(),\n          metadata.icebergMetadataLocation(),\n          snowflakeIdentifierForTable);\n    }\n\n    return metadata.icebergMetadataLocation();\n  }\n}\n","sourceCodeStart":71,"sourceCodeEnd":99,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeTableOperations.java#L71-L99","documentation":"SnowflakeTableOperations.loadTableMetadataLocation logs a warning when the Snowflake metadata returned for a table has a status other than 'success'. The table exists, but its metadata status indicates it may not be ready or consistent; the code proceeds using the returned metadata location instead of throwing.","triggerScenarios":"Calling refresh()/location() on a Snowflake table whose underlying metadata status is not 'success' (e.g. the table is being created/altered/dropped in Snowflake, or replication/synchronization is pending).","commonSituations":"Reading a table during an in-flight CREATE/ALTER on the Snowflake side; tables created but not yet published as Iceberg; transient Snowflake-side state issues.","solutions":["Retry the load after the Snowflake table operation completes","Check the table's status in Snowflake (SHOW ICEBERG TABLES / DESCRIBE) to find why it is not 'success'","If the status is permanently non-successful, drop and recreate the table metadata in Snowflake"],"exampleFix":"// before\nTable table = catalog.loadTable(identifier); // status not yet 'success'\n// after\nTable table = waitForSuccessStatus(catalog, identifier); // poll until status == 'success' before loading","handlingStrategy":"retry","validationCode":"// Check table status before loading\n// SELECT status FROM snowflake.information_schema... or SHOW ICEBERG TABLES to confirm 'success'","typeGuard":"boolean isReady(ResultSet rs) { return \"success\".equals(rs.getString(\"status\")); }","tryCatchPattern":"for (int i = 0; i < 5; i++) { try { return catalog.loadTable(identifier); } catch (NoSuchTableException | RuntimeException e) { /* metadata status not success; sleep and retry */ } }","preventionTips":["Avoid reading Iceberg tables immediately after CREATE/ALTER in Snowflake","Poll table status until 'success' before catalog loads","Add retry with backoff around Snowflake table operations"],"tags":["snowflake","metadata","retry"],"backgroundTag":"unexpected-response-shape","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}