{"record":{"id":"7031fd5702e6efb6","repo":"apache/iceberg","slug":"source-table-s-contains-one-all-of-the-reserved-p-7031fd","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":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/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/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java#L331-L367","documentation":"getTable injects the reserved Flink property keys (connector and src-catalog) into the returned property map to support CREATE TABLE LIKE. If the stored Iceberg table itself already contains one of these reserved keys, Iceberg refuses and throws IllegalArgumentException to prevent property collision and corrupted round-trips. The keys are FlinkCreateTableOptions.CONNECTOR_PROPS_KEY and SRC_CATALOG_PROPS_KEY.","triggerScenarios":"Reading a table (getTable, or SELECT via the catalog) whose Iceberg table properties were manually set to include 'connector' or the src-catalog property key — typically because a previous CREATE TABLE LIKE artifact was persisted or someone added the key with ALTER TABLE TPROPERTIES.","commonSituations":"Manually copying properties from a Flink-side dynamic table back into the Iceberg table; custom ingestion jobs that persist Flink connector options; restoring table snapshots that contain stale reserved keys.","solutions":["Remove the reserved keys from the Iceberg table properties: ALTER TABLE t UNSET TBLPROPERTIES ('connector') (or the src-catalog key), or remove via icebergCatalog table.updateProperties().","Recreate the table without the reserved keys and reload data.","Audit creation pipelines so Flink connector/src-catalog options are never persisted into Iceberg table properties."],"exampleFix":"// before\ntable.updateProperties().set(\"connector\", \"iceberg\").commit();\n\n// after\nTableMetadata metadata = ((HasTableOperations) table).operations().current();\ntable.updateProperties().remove(\"connector\").commit(); // reserved key must not be stored","handlingStrategy":"validation","validationCode":"Map<String, String> props = table.properties();\nif (props.containsKey(\"connector\") || props.containsKey(\"src-catalog\")) {\n  throw new IllegalStateException(\"reserved Flink keys present in Iceberg table properties\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  CatalogTable t = catalog.getTable(tablePath);\n} catch (IllegalArgumentException e) {\n  // strip reserved keys via table update and retry\n}","preventionTips":["Never persist Flink connector/src-catalog options into Iceberg table properties.","Audit tables with a job that scans properties for reserved keys.","Restrict ALTER TABLE ... SET TBLPROPERTIES for reserved key names."],"tags":["flink","catalog","reserved-property","illegal-argument"],"backgroundTag":"invalid-argument-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"}