{"record":{"id":"004b3aa79b512ed3","repo":"apache/seatunnel","slug":"table-create-failed","errorCode":"TABLE_CREATE_FAILED","errorMessage":"schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST is not yet supported by the Bigtable connector. Please create the table and column families manually and set schema_save_mode=RECREATE_SCHEMA.","messagePattern":"schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST is not yet supported by the Bigtable connector\\. Please create the table and column families manually and set schema_save_mode=RECREATE_SCHEMA\\.","errorType":"error_code","errorClass":"BigtableConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-google-bigtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/bigtable/sink/BigtableSink.java","lineNumber":102,"sourceCode":"        }\n        if (parameters.getVersionColumn() != null) {\n            this.versionColumnIndex = rowType.indexOf(parameters.getVersionColumn());\n        }\n        handleSaveMode();\n        return new BigtableSinkWriter(rowType, parameters, rowkeyColumnIndexes, versionColumnIndex);\n    }\n\n    /**\n     * Validates and applies the configured {@link SchemaSaveMode} and {@link DataSaveMode}.\n     *\n     * <p>Only {@link SchemaSaveMode#RECREATE_SCHEMA} and {@link DataSaveMode#APPEND_DATA} are\n     * currently supported. Unsupported modes throw immediately so users are never misled by\n     * accepted-but-no-op settings. Full Admin API support (table creation / truncation) can be\n     * added in a follow-up once a BigtableCatalog is available.\n     */\n    private void handleSaveMode() {\n        if (schemaSaveMode == SchemaSaveMode.CREATE_SCHEMA_WHEN_NOT_EXIST) {\n            throw new BigtableConnectorException(\n                    BigtableConnectorErrorCode.TABLE_CREATE_FAILED,\n                    \"schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST is not yet supported by the \"\n                            + \"Bigtable connector. Please create the table and column families \"\n                            + \"manually and set schema_save_mode=RECREATE_SCHEMA.\");\n        }\n        if (dataSaveMode == DataSaveMode.DROP_DATA) {\n            throw new BigtableConnectorException(\n                    BigtableConnectorErrorCode.TABLE_TRUNCATE_FAILED,\n                    \"data_save_mode=DROP_DATA is not yet supported by the Bigtable connector. \"\n                            + \"Please truncate the table manually or use data_save_mode=APPEND_DATA.\");\n        }\n        if (dataSaveMode == DataSaveMode.ERROR_WHEN_DATA_EXISTS) {\n            throw new BigtableConnectorException(\n                    BigtableConnectorErrorCode.TABLE_QUERY_FAILED,\n                    \"data_save_mode=ERROR_WHEN_DATA_EXISTS is not yet supported by the Bigtable \"\n                            + \"connector. Please use data_save_mode=APPEND_DATA.\");\n        }\n        log.info(\"Bigtable sink save mode: schema={}, data={}\", schemaSaveMode, dataSaveMode);","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-google-bigtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/bigtable/sink/BigtableSink.java#L84-L120","documentation":"BigtableSink.handleSaveMode throws BigtableConnectorException (TABLE_CREATE_FAILED) because schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST is explicitly unsupported — there is no BigtableCatalog/table-creation support yet. The connector fails fast instead of silently ignoring the setting.","triggerScenarios":"handleSaveMode() is invoked during createWriter() and detects schemaSaveMode == SchemaSaveMode.CREATE_SCHEMA_WHEN_NOT_EXIST in the sink configuration.","commonSituations":"Users relying on the common default behavior of auto-creating missing tables run the Bigtable sink against a table that does not exist and hit the error at writer startup.","solutions":["Create the Bigtable table and its column families manually (gcloud or console) before running the job","Set schema_save_mode = RECREATE_SCHEMA if recreation semantics are acceptable per the message","Set schema_save_mode = ERROR_WHEN_SCHEMA_NOT_EXIST after ensuring the table exists","Implement Bigtable Admin API-based table creation in the connector as a contribution"],"exampleFix":"// before\nsink {\n  Bigtable {\n    schema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST\n  }\n}\n// after\nsink {\n  Bigtable {\n    schema_save_mode = RECREATE_SCHEMA  // or create the table manually first\n  }\n}","handlingStrategy":"validation","validationCode":"if (config.getString(\"schema_save_mode\") == \"CREATE_SCHEMA_WHEN_NOT_EXIST\") {\n  throw new IllegalArgumentException(\"Bigtable sink requires RECREATE_SCHEMA or an existing table\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  sink.open(saveModeHandler);\n} catch (BigtableConnectorException e) {\n  if (e.getErrorCode() == BigtableConnectorErrorCode.TABLE_CREATE_FAILED)\n    // create table + column families via gcloud, then rerun\n    LOG.error(\"Create the Bigtable table manually; see message: {}\", e.getMessage());\n}","preventionTips":["Pre-create tables and column families with gcloud before sink jobs","Use schema_save_mode = RECREATE_SCHEMA when appropriate","Avoid copying schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST from other sink configs","Check connector docs for supported save modes"],"tags":["bigtable","schema-save-mode","config","unsupported-feature"],"backgroundTag":"unsupported-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}