{"record":{"id":"e55d175cce93a12a","repo":"apache/dolphinscheduler","slug":"openmldb-task-params-is-not-valid","errorCode":null,"errorMessage":"openmldb task params is not valid","messagePattern":"openmldb task params is not valid","errorType":"validation","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-openmldb/src/main/java/org/apache/dolphinscheduler/plugin/task/openmldb/OpenmldbTask.java","lineNumber":68,"sourceCode":"    private static final Pattern PYTHON_PATH_PATTERN = Pattern.compile(\"/bin/python[\\\\d.]*$\");\n    public static final Pattern SQL_PATTERN = Pattern.compile(\"\\\\S\");\n\n    /**\n     * constructor\n     *\n     * @param taskRequest taskRequest\n     */\n    public OpenmldbTask(TaskExecutionContext taskRequest) {\n        super(taskRequest);\n    }\n\n    @Override\n    public void init() {\n        pythonParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), OpenmldbParameters.class);\n\n        log.info(\"Initialize openmldb task params {}\", JSONUtils.toPrettyJsonString(pythonParameters));\n        if (pythonParameters == null || !pythonParameters.checkParameters()) {\n            throw new TaskException(\"openmldb task params is not valid\");\n        }\n    }\n\n    /**\n     * build python command file path\n     *\n     * @return python command file path\n     */\n    @Override\n    protected String buildPythonCommandFilePath() {\n        return String.format(\"%s/openmldb_%s.py\", taskRequest.getExecutePath(), taskRequest.getTaskAppId());\n    }\n\n    /**\n     * build python script content from sql\n     *\n     * @return raw python script\n     */","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-openmldb/src/main/java/org/apache/dolphinscheduler/plugin/task/openmldb/OpenmldbTask.java#L50-L86","documentation":"A parameter validation guard in OpenmldbTask.init: pythonParameters is null after parsing taskParams (invalid JSON) or checkParameters() failed because required fields (e.g. the SQL/type fields) are missing. The offending input is the taskParams JSON in the task definition; the task aborts at init before any OpenMLDB CLI command is built.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-openmldb/src/main/java/org/apache/dolphinscheduler/plugin/task/openmldb/OpenmldbTask.java:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Complete the required OpenMLDB task fields in the task definition","Ensure taskParams JSON deserializes into OpenmldbParameters correctly","Validate on save in the UI"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}