{"record":{"id":"a15d950d9e6c46bd","repo":"apache/seatunnel","slug":"hive-table-name-must-use-databasepattern-tablep","errorCode":null,"errorMessage":"Hive `table_name` must use `databasePattern.tablePattern` when `use_regex` is enabled. Invalid `table_name`: ","messagePattern":"Hive `table_name` must use `databasePattern\\.tablePattern` when `use_regex` is enabled\\. Invalid `table_name`: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveTableNamePattern.java","lineNumber":43,"sourceCode":"\n    private final String databasePattern;\n    private final String tablePattern;\n\n    private HiveTableNamePattern(String databasePattern, String tablePattern) {\n        this.databasePattern = databasePattern;\n        this.tablePattern = tablePattern;\n    }\n\n    static HiveTableNamePattern parse(String rawPattern) {\n        if (rawPattern == null || rawPattern.trim().isEmpty()) {\n            throw new IllegalArgumentException(\n                    \"`table_name` must not be blank when `use_regex` is enabled\");\n        }\n\n        String processed = rawPattern.trim().replace(\"\\\\.\", DOT_PLACEHOLDER);\n        Optional<Integer> separatorIndex = findTableSeparator(processed);\n        if (!separatorIndex.isPresent()) {\n            throw new IllegalArgumentException(\n                    \"Hive `table_name` must use `databasePattern.tablePattern` when `use_regex` is enabled. \"\n                            + \"Invalid `table_name`: \"\n                            + processed.replace(DOT_PLACEHOLDER, \".\"));\n        }\n\n        int index = separatorIndex.get();\n        String databasePattern = processed.substring(0, index).trim();\n        String tablePattern = processed.substring(index + 1).trim();\n\n        if (databasePattern.isEmpty() || tablePattern.isEmpty()) {\n            throw new IllegalArgumentException(\n                    \"Hive `table_name` must use `databasePattern.tablePattern` when `use_regex` is enabled. \"\n                            + \"Invalid `table_name`: \"\n                            + processed.replace(DOT_PLACEHOLDER, \".\"));\n        }\n\n        databasePattern = databasePattern.replace(DOT_PLACEHOLDER, \".\");\n        tablePattern = tablePattern.replace(DOT_PLACEHOLDER, \".\");","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveTableNamePattern.java#L25-L61","documentation":"Hive table discovery expects `table_name` in the exact form `databasePattern.tablePattern` — exactly one unescaped dot separating a database regex from a table regex. If findTableSeparator finds no unescaped dot at all, parse has no way to split the pattern and throws this error, echoing the processed pattern back to the user.","triggerScenarios":"Calling HiveTableNamePattern.parse with a string containing no unescaped '.' (e.g. \"mytable\" or \"db\\\\.table\" where the only dot is escaped as a literal), while use_regex is enabled.","commonSituations":"User provides only a table name without a database prefix; user escapes the separating dot by mistake (`db\\\\.t`), leaving zero separators; configs copied from non-regex Hive setups that use plain `db.table` plus escaping confusion.","solutions":["Write `table_name` as `dbPattern.tablePattern` with exactly one unescaped dot, e.g. \"mydb.\\\\.*\"","If a literal dot is needed inside a fragment, keep it escaped as `\\\\.` (written `\\\\\\\\.` in HOCON) and leave the separator dot unescaped","Check the documented examples: `db0.\\\\.*`, `db1.user_table_[0-9]+`, `db[1-2].[app|web]order_\\\\.*`"],"exampleFix":"// before\ntable_name = \"user_table_[0-9]+\" // no db separator\n\n// after\ntable_name = \"db1.user_table_[0-9]+\"","handlingStrategy":"validation","validationCode":"if (!raw.trim().matches(\"[^.]+\\\\..+\")) {\n    throw new IllegalArgumentException(\"table_name must be dbPattern.tablePattern with one unescaped dot\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write table_name as db.table form","Do not escape the separator dot","Keep regex fragments on both sides of the dot"],"tags":["hive","config","regex","format"],"backgroundTag":"invalid-argument-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}