mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 12:17:43 +08:00
Modify the documentation that python task will not work properly when '\n' indicates the presence of a variable and needs to use 'repr(value)' (#15145)
Co-authored-by: yangyanxing <yangyanxing@360.cn> Co-authored-by: xiangzihao <460888207@qq.com>
This commit is contained in:
parent
b8e942208e
commit
3149928cdc
@ -92,6 +92,9 @@ For example
|
||||
|
||||
![python_context_param](../../../../img/new_ui/dev/parameter/python_context_param.png)
|
||||
|
||||
|
||||
Attention: When the variable value contains the `\n` identifier, such as ` value = "hello \n world" `, value needs to be carried out in a special way. You need to use `print('${setValue(key=%s)}' % repr(value))`, otherwise the argument cannot be passed to the subsequent flow.
|
||||
|
||||
#### Pass parameter from SubProcess task to downstream
|
||||
|
||||
In the workflow definition of the subprocess, define `OUT` direction parameters as output parameters, and these parameters can be passed to the downstream tasks of the subprocess node.
|
||||
|
@ -91,6 +91,10 @@ Node_mysql 运行结果如下:
|
||||
如
|
||||
![python_context_param](../../../../img/new_ui/dev/parameter/python_context_param.png)
|
||||
|
||||
|
||||
注意: 当变量 value 中含有 `\n` 标识,如 `value = "hello \n world"`, 则需要将 value 进行特殊进行,需要使用 `print('${setValue(key=%s)}' % repr(value))`, 否则参数无法传递到后面的流程。
|
||||
|
||||
|
||||
#### SubProcess 任务传递参数
|
||||
|
||||
在子流程的工作流定义中定义方向是 OUT 的变量作为输出参数,可以将这些参数传递到子流程节点的下游任务。
|
||||
|
Loading…
Reference in New Issue
Block a user