macdoor opened a new issue, #17986:
URL: https://github.com/apache/dolphinscheduler/issues/17986

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Description
   
   ## Background
   
   Currently, **Flink** and **Flink Stream** task plugins do not support 
DolphinScheduler parameter replacement in `initScript` and `rawScript`. Users 
cannot use placeholders such as `${system.biz.date}`, custom parameters, or 
time expressions like `$[yyyyMMdd]` in Flink SQL scripts, which is inconsistent 
with other task types (e.g. Spark, SQL, Http).
   
   ## Improvement
   
   Apply the same parameter replacement mechanism to Flink and Flink Stream 
tasks:
   
   - In `FlinkTask` and `FlinkStreamTask#init()`, after parsing task params, 
call `ParameterUtils.convertParameterPlaceholders()` for `initScript` and 
`rawScript` using `taskExecutionContext.getPrepareParamsMap()`.
   - This will support:
     - `${var}` style placeholders (system and custom parameters)
     - `$[yyyyMMdd]` and other time placeholders
   
   ## Module
   
   - `dolphinscheduler-task-flink`
   - `dolphinscheduler-task-flink-stream`
   
   ## Implementation
   
   - Reuse existing `ParameterUtils.convert()` and 
`ParameterUtils.convertParameterPlaceholders()` (same as SparkTask, SqlTask, 
etc.).
   - Only two files need to be modified: `FlinkTask.java` and 
`FlinkStreamTask.java`.
   
   I am willing to submit a PR for this improvement.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to