{"record":{"id":"46e91fa3c4cbc0a7","repo":"apache/seatunnel","slug":"table-name-not-specified-in-options-using-table-n","errorCode":null,"errorMessage":"Table name not specified in options, using table name from catalog: {}","messagePattern":"Table name not specified in options, using table name from catalog: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/sink/DatabendSink.java","lineNumber":93,"sourceCode":"    private final DatabendSinkConfig databendSinkConfig;\n    private ReadonlyConfig readonlyConfig;\n\n    // CDC infrastructure initialization fields\n    private boolean isCdcInfrastructureInitialized = false;\n    private JobContext jobContext;\n\n    public DatabendSink(CatalogTable catalogTable, ReadonlyConfig options) {\n        this.catalogTable = catalogTable;\n        this.databendSinkConfig = DatabendSinkConfig.of(options);\n        this.schemaSaveMode = options.get(DatabendSinkOptions.SCHEMA_SAVE_MODE);\n        this.dataSaveMode = options.get(DatabendSinkOptions.DATA_SAVE_MODE);\n        this.customSql = options.getOptional(DatabendSinkOptions.CUSTOM_SQL).orElse(null);\n        this.database =\n                options.getOptional(DatabendOptions.DATABASE)\n                        .orElse(catalogTable.getTableId().getDatabaseName());\n        String configuredTable = options.get(DatabendOptions.TABLE);\n        if (configuredTable == null || configuredTable.isEmpty()) {\n            log.warn(\n                    \"Table name not specified in options, using table name from catalog: {}\",\n                    catalogTable.getTableId().getTableName());\n            this.table = catalogTable.getTableId().getTableName();\n        } else {\n            this.table = configuredTable;\n        }\n        this.rawTableName = databendSinkConfig.getRawTableName();\n        this.streamName = databendSinkConfig.getStreamName();\n        this.autoCommit = options.get(DatabendOptions.AUTO_COMMIT);\n        this.batchSize = options.get(DatabendOptions.BATCH_SIZE);\n        this.executeTimeoutSec = options.get(DatabendSinkOptions.EXECUTE_TIMEOUT_SEC);\n        this.readonlyConfig = options;\n\n        // detail schema log\n        log.info(\"DatabendSink initialized with catalog table: {}\", catalogTable);\n        log.info(\"Catalog table ID: {}\", catalogTable.getTableId());\n        log.info(\"Catalog table schema: {}\", catalogTable.getTableSchema());\n        log.info(\"Catalog table row type: {}\", catalogTable.getSeaTunnelRowType());","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/sink/DatabendSink.java#L75-L111","documentation":"DatabendSink's constructor resolves the target table from options. When the 'table' option is absent or empty, the sink falls back to the table name from the catalog's CatalogTable (TableId) and logs this warning. The sink works, but the table comes from an implicit source — a common source of writing to an unexpected table if catalog metadata differs from intent.","triggerScenarios":"Creating a DatabendSink with a ReadonlyConfig that lacks the DatabendOptions.TABLE key (or has an empty string), while CatalogTable has a table name.","commonSituations":"Configs built programmatically or from schemas where only database was set; multi-table/whole-database synchronization jobs relying on catalog table ids; copy-pasted config templates missing the table key.","solutions":["Set the 'table' option explicitly in the sink config to the intended Databend table","Verify the CatalogTable's TableId table name matches your intended target if you intend to rely on the fallback","For multi-table sync, confirm per-table routing/mapping is configured as expected"],"exampleFix":"// before\ndatabase = \"analytics\"  // no table set\n// after\ndatabase = \"analytics\"\ntable = \"events\"  # explicit target table","handlingStrategy":"validation","validationCode":"// Validate sink config before job submission\nString table = config.getOptional(\"table\");\nif (table == null || table.isEmpty()) {\n  log.warn(\"'table' not set; falling back to catalog table name: {}\",\n           catalogTable.getTableId().getTableName());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set the table option explicitly for single-table sinks","When relying on the catalog fallback, verify TableId names match the target","Include table in your config templates and CI validation"],"tags":["databend","config","fallback","sink"],"backgroundTag":"missing-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}