{"record":{"id":"b40741d6bce4ec12","repo":"apache/seatunnel","slug":"clickhouse-get-table-list-config-error","errorCode":"CLICKHOUSE_GET_TABLE_LIST_CONFIG_ERROR","errorMessage":"PluginName: %s, PluginType: %s, Message: %s","messagePattern":"PluginName: (.+?), PluginType: (.+?), Message: (.+?)","errorType":"error_code","errorClass":"ClickhouseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/config/ClickhouseTableConfig.java","lineNumber":95,"sourceCode":"        List<ClickhouseTableConfig> tableList;\n        if (readonlyConfig.getOptional(TABLE_LIST).isPresent()) {\n            tableList = readonlyConfig.get(TABLE_LIST);\n        } else {\n            ClickhouseTableConfig tableConfig =\n                    ClickhouseTableConfig.builder()\n                            .tablePath(readonlyConfig.get(TABLE_PATH))\n                            .sql(readonlyConfig.get(SQL))\n                            .filterQuery(readonlyConfig.get(CLICKHOUSE_FILTER_QUERY))\n                            .partitionList(readonlyConfig.get(CLICKHOUSE_PARTITION_LIST))\n                            .batchSize(readonlyConfig.get(CLICKHOUSE_BATCH_SIZE))\n                            .splitSize(readonlyConfig.get(CLICKHOUSE_SPLIT_SIZE))\n                            .build();\n\n            tableList = Collections.singletonList(tableConfig);\n        }\n\n        if (tableList == null || tableList.isEmpty()) {\n            throw new ClickhouseConnectorException(\n                    ClickhouseConnectorErrorCode.GET_TABLE_LIST_CONFIG_ERROR,\n                    String.format(\n                            \"PluginName: %s, PluginType: %s, Message: %s\",\n                            \"Clickhouse\", PluginType.SOURCE, \"Get table list config error.\"));\n        }\n\n        for (ClickhouseTableConfig tableConfig : tableList) {\n            if (StringUtils.isEmpty(tableConfig.getTablePath())\n                    && StringUtils.isEmpty(tableConfig.getSql())) {\n                throw new IllegalArgumentException(\n                        \"`table_path` and `sql` parameter cannot be both empty.\");\n            }\n\n            if (tableConfig.getBatchSize() <= 0) {\n                tableConfig.setBatchSize(CLICKHOUSE_BATCH_SIZE.defaultValue());\n            }\n\n            if (tableConfig.getSplitSize() <= 0) {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/config/ClickhouseTableConfig.java#L77-L113","documentation":"ClickhouseTableConfig.of(ReadonlyConfig) builds the per-table configuration list for a ClickHouse source. After building tableList — from the 'table_list' option or a single table_path/sql — it validates the list is non-empty; otherwise it throws ClickhouseConnectorException with code GET_TABLE_LIST_CONFIG_ERROR carrying the plugin name/type. It means the source config yielded no table entries at all.","triggerScenarios":"Creating a ClickhouseTableConfig from a ReadonlyConfig that contains neither a 'table_list' array nor a directly usable 'table_path'/'sql' entry, so the constructed tableList ends up null or empty.","commonSituations":"Omitting table_path (and database/table) from the source config; providing an empty table_list: []; misspelling the option key (e.g. 'tablepath' or 'tablePaths') so it is ignored; hand-editing configs and deleting required fields.","solutions":["Add a valid 'table_path' (e.g. \"database_name.table_name\") to the ClickHouse source config.","Alternatively provide a 'sql' query or a non-empty 'table_list' array of table entries.","Verify option key spellings against ClickhouseSourceOptions and check the connector's full option list.","Enable debug logging of the resolved ReadonlyConfig to confirm which options the connector actually sees."],"exampleFix":"// before\nsource {\n  Clickhouse {\n    url = \"jdbc:clickhouse://localhost:8123\"\n  }\n}\n// after\nsource {\n  Clickhouse {\n    url = \"jdbc:clickhouse://localhost:8123\"\n    table_path = \"default.my_table\"\n  }\n}","handlingStrategy":"validation","validationCode":"if (!config.containsKey(\"table_list\") && !config.containsKey(\"table_path\") && !config.containsKey(\"sql\")) {\n    throw new IllegalArgumentException(\"Clickhouse source requires 'table_path', 'sql', or a non-empty 'table_list'\");\n}","typeGuard":null,"tryCatchPattern":"try { tableConfigs = ClickhouseTableConfig.of(readonlyConfig); } catch (ClickhouseConnectorException e) { if (ClickhouseConnectorErrorCode.GET_TABLE_LIST_CONFIG_ERROR.equals(e.getSeaTunnelErrorCode())) { log.error(\"Clickhouse source config has no tables: check table_path/sql/table_list\"); } throw e; }","preventionTips":["Always specify table_path, sql, or a populated table_list in ClickHouse source configs.","Validate job configs (keys and required fields) before submission with a schema checker.","Use exact option names from ClickhouseSourceOptions; avoid hand-typing keys."],"tags":["clickhouse","config","source","missing-table"],"backgroundTag":"missing-required-config-field","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"}