{"record":{"id":"a908337251ff5945","repo":"apache/iceberg","slug":"source-table-s-contains-one-all-of-the-reserved-p","errorCode":null,"errorMessage":"Source table %s contains one/all of the reserved property keys: %s, %s.","messagePattern":"Source table (.+?) contains one/all of the reserved property keys: (.+?), (.+?)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java","lineNumber":349,"sourceCode":"  }\n\n  @Override\n  public CatalogTable getTable(ObjectPath tablePath)\n      throws TableNotExistException, CatalogException {\n    Table table = loadIcebergTable(tablePath);\n\n    // Flink's CREATE TABLE LIKE clause relies on properties sent back here to create new table.\n    // As Flink API accepts only Map<String, String> for props, here we are serializing catalog\n    // name, database, table as json string to distinguish between catalog info\n    // and table properties in createTable.\n    String srcCatalogProps =\n        FlinkCreateTableOptions.toJson(\n            getName(), tablePath.getDatabaseName(), tablePath.getObjectName());\n\n    Map<String, String> tableProps = table.properties();\n    if (tableProps.containsKey(FlinkCreateTableOptions.CONNECTOR_PROPS_KEY)\n        || tableProps.containsKey(FlinkCreateTableOptions.SRC_CATALOG_PROPS_KEY)) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Source table %s contains one/all of the reserved property keys: %s, %s.\",\n              tablePath,\n              FlinkCreateTableOptions.CONNECTOR_PROPS_KEY,\n              FlinkCreateTableOptions.SRC_CATALOG_PROPS_KEY));\n    }\n\n    ImmutableMap.Builder<String, String> mergedProps = ImmutableMap.builder();\n    mergedProps.put(\n        FlinkCreateTableOptions.CONNECTOR_PROPS_KEY, FlinkDynamicTableFactory.FACTORY_IDENTIFIER);\n    mergedProps.put(FlinkCreateTableOptions.SRC_CATALOG_PROPS_KEY, srcCatalogProps);\n    mergedProps.putAll(tableProps);\n\n    return toCatalogTableWithProps(table, mergedProps.build());\n  }\n\n  private Table loadIcebergTable(ObjectPath tablePath) throws TableNotExistException {\n    try {","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java#L331-L367","documentation":"FlinkCatalog.getTable rejects an Iceberg table whose properties contain Flink's reserved keys CONNECTOR_PROPS_KEY or SRC_CATALOG_PROPS_KEY. These keys record how the table was created via Flink and are managed by the catalog; a source table already carrying them would produce ambiguous/conflicting connector configuration, so loading fails with IllegalArgumentException.","triggerScenarios":"Accessing (SELECT/scan/insert) an Iceberg table that was written by another tool or manually edited such that its properties include the Flink connector properties key or source-catalog properties key reserved by FlinkCreateTableOptions.","commonSituations":"A table created through Flink, then its properties copied wholesale into another table's properties (e.g. via CREATE TABLE ... LIKE or manual alter) and later read again from Flink; tooling that dumps and restores table properties including internal Flink keys.","solutions":["Remove the reserved keys (the connector/src-catalog property names shown in the message) from the Iceberg table properties: ALTER TABLE ... UNSET TBLPROPERTIES ('key').","Recreate the table via Flink normally instead of copying its property map.","Identify which tool injected the reserved keys and stop persisting them (filter them out in the property-copying code).","If the keys were set by mistake with correct values still needed, re-apply them only through the Flink catalog create path."],"exampleFix":"// before: copying all props including reserved keys\nnewTable.updateProperties().setAll(source.properties()).commit();\n// after\nMap<String, String> safe = Maps.filterKeys(source.properties(),\n    k -> !k.equals(FlinkCreateTableOptions.CONNECTOR_PROPS_KEY)\n      && !k.equals(FlinkCreateTableOptions.SRC_CATALOG_PROPS_KEY));\nnewTable.updateProperties().setAll(safe).commit();","handlingStrategy":"try-catch","validationCode":"Map<String, String> props = table.properties();\nif (props.containsKey(\"flink.connector-props\") || props.containsKey(\"flink.src-catalog-props\")) {\n  throw new IllegalStateException(\"Table carries Flink reserved property keys\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  Table table = flinkCatalog.getTable(objectPath);\n} catch (IllegalArgumentException e) {\n  // unset reserved keys via a plain Catalog (not FlinkCatalog), then retry\n}","preventionTips":["Filter internal Flink keys when copying table properties between tables.","Create tables through the Flink catalog rather than manual property restoration.","Run property audits on tables authored by other engines before Flink access."],"tags":["flink","catalog","reserved-properties"],"backgroundTag":"invalid-config-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}