{"record":{"id":"000486b90b458ecb","repo":"apache/beam","slug":"table-must-not-be-empty","errorCode":null,"errorMessage":"table must not be empty.","messagePattern":"table must not be empty\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/debezium/src/main/java/org/apache/beam/io/debezium/DebeziumReadSchemaTransformProvider.java","lineNumber":235,"sourceCode":"    @SchemaFieldDescription(\n        \"Debezium connector type. Supported values: MYSQL, POSTGRES, SQLSERVER, ORACLE, and DB2.\")\n    public abstract @NonNull String getDatabase();\n\n    @SchemaFieldDescription(\"Additional Debezium connection properties in key=value format.\")\n    public abstract @Nullable List<String> getDebeziumConnectionProperties();\n\n    public void validate() {\n      if (getHost().isEmpty()) {\n        throw new IllegalArgumentException(\"host must not be empty.\");\n      }\n\n      if (getPort() <= 0 || getPort() > 65535) {\n        throw new IllegalArgumentException(\n            \"port must be between 1 and 65535, but was \" + getPort() + \".\");\n      }\n\n      if (getTable().isEmpty()) {\n        throw new IllegalArgumentException(\"table must not be empty.\");\n      }\n\n      List<String> connectionProperties = getDebeziumConnectionProperties();\n      if (connectionProperties != null) {\n        for (String property : connectionProperties) {\n          if (property == null || property.indexOf('=') <= 0) {\n            throw new IllegalArgumentException(\n                \"Invalid Debezium connection property '\"\n                    + property\n                    + \"'. Expected key=value format.\");\n          }\n        }\n      }\n    }\n\n    public static Builder builder() {\n      return new AutoValue_DebeziumReadSchemaTransformProvider_DebeziumReadSchemaTransformConfiguration\n          .Builder();","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/debezium/src/main/java/org/apache/beam/io/debezium/DebeziumReadSchemaTransformProvider.java#L217-L253","documentation":"validate() requires a non-empty table option because Debezium's snapshot/stream config needs to know which tables to capture (table.include.list). An empty table string throws IllegalArgumentException.","triggerScenarios":"Constructing the Debezium read transform without setting table, or setting it to \"\"; validate() runs during from().","commonSituations":"Missing table key in YAML/SQL pipeline configs, empty env substitution, or misunderstanding that 'database' alone is insufficient — a table list/pattern is required.","solutions":["Set the table option to a comma-separated list or regex of tables (e.g. \"inventory.orders\" or \"db1.table1,db1.table2\").","Verify templated pipeline specs inject the table parameter correctly.","Add a pre-flight check that all required fields (host, port, table) are non-empty.","Use fully-qualified names (database.table) matching the Debezium include list format."],"exampleFix":"// before\n.withHost(\"db\").withPort(3306).withUsername(\"u\").withPassword(\"p\") // no table\n// after\n.withHost(\"db\").withPort(3306).withTable(\"inventory.orders\").withUsername(\"u\").withPassword(\"p\")","handlingStrategy":"validation","validationCode":"if (table == null || table.isBlank()) throw new IllegalArgumentException(\"table must be set (format: database.table or comma-separated list)\");","typeGuard":"static boolean hasTable(DebeziumReadConfiguration c) {\n  return c.getTable() != null && !c.getTable().isEmpty();\n}","tryCatchPattern":null,"preventionTips":["Always specify tables using fully-qualified database.table names.","Verify templated pipeline specs inject the table parameter.","List required fields (host, port, table) in a startup config check."],"tags":["java","apache-beam","debezium","config-validation"],"backgroundTag":"empty-required-field","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}