Tianqi-Dotes commented on a change in pull request #263:
URL:
https://github.com/apache/incubator-dolphinscheduler-website/pull/263#discussion_r559187044
##########
File path: docs/en-us/1.3.4/user_doc/task-structure.md
##########
@@ -0,0 +1,1134 @@
+
+# Overall Tasks Storage Structure
+Dolphinscheduler persists all created tasks in the table
't_ds_process_definition'.
+
+The following shows the 't_ds_process_definition' table structure:
+
+
+order | field | type | description
+-------- | ---------| -------- | ---------
+1|id|int(11)|primary key
+2|name|varchar(255)|define workflow name
+3|version|int(11)|define workflow version
+4|release_state|tinyint(4)|define workflow publish status:0 not yet launch, 1
launched
+5|project_id|int(11)|project id
+6|user_id|int(11)|define workflow owner id
+7|process_definition_json|longtext|define workflow JSON
+8|description|text|define workflow description
+9|global_params|text|global parameters
+10|flag|tinyint(4)|specify workflow availability:0 not available, 1 available
+11|locations|text|node location info
+12|connects|text|node connectivity info
+13|receivers|text|receivers
+14|receivers_cc|text|CC receivers
+15|create_time|datetime|create time
+16|timeout|int(11) |timeout
+17|tenant_id|int(11) |tenant id
+18|update_time|datetime|update time
+19|modify_by|varchar(36)|specify users make modification
+20|resource_ids|varchar(255)|resource ids
+
+In which 'process_definition_json' is the core field, defines task info in DAG
and is stored in JSON format.
+
+Following table describes the common data structure
+order | field | type | description
+-------- | ---------| -------- | ---------
+1|globalParams|Array|global parameters
+2|tasks|Array|task collections in the workflow[structures of each task type
please check following sections]
+3|tenantId|int|tenant ID
+4|timeout|int|timeout
+
+Data example:
+```bash
+{
+ "globalParams":[
+ {
+ "prop":"golbal_bizdate",
+ "direct":"IN",
+ "type":"VARCHAR",
+ "value":"${system.biz.date}"
+ }
+ ],
+ "tasks":Array[1],
+ "tenantId":0,
+ "timeout":0
+}
+```
+
+# Detailed Explanation About the Storage Structure of Each Task Type
+
+## Shell Nodes
+**Node data structure as follow:**
+order|parameter name||type|description |notes
+-------- | ---------| ---------| -------- | --------- | ---------
+1|id | |String| task Id|
+2|type ||String |task type |SHELL
+3| name| |String|task name |
+4| params| |Object|customized parameters |Json format
+5| |rawScript |String| Shell script |
+6| | localParams| Array|customized local parameters||
+7| | resourceList| Array|resource files||
+8|description | |String|description | |
+9|runFlag | |String |execution flag| |
+10|conditionResult | |Object|condition branch | |
+11| | successNode| Array|jump to node if success| |
+12| | failedNode|Array|jump to node if failure|
+13| dependence| |Object |task dependency |mutual exclusion with params
+14|maxRetryTimes | |String|max retry times | |
+15|retryInterval | |String |retry interval| |
+16|timeout | |Object|timeout | |
+17| taskInstancePriority| |String|task priority | |
+18|workerGroup | |String |Worker group| |
+19|preTasks | |Array|preposition tasks | |
+
+
+**Node data example:**
+
+```bash
+{
+ "type":"SHELL",
+ "id":"tasks-80760",
+ "name":"Shell Task",
+ "params":{
+ "resourceList":[
+ {
+ "id":3,
+ "name":"run.sh",
+ "res":"run.sh"
+ }
+ ],
+ "localParams":[
+
+ ],
+ "rawScript":"echo "This is a shell script""
+ },
+ "description":"",
+ "runFlag":"NORMAL",
+ "conditionResult":{
+ "successNode":[
+ ""
+ ],
+ "failedNode":[
+ ""
+ ]
+ },
+ "dependence":{
+
+ },
+ "maxRetryTimes":"0",
+ "retryInterval":"1",
+ "timeout":{
+ "strategy":"",
+ "interval":null,
+ "enable":false
+ },
+ "taskInstancePriority":"MEDIUM",
+ "workerGroup":"default",
+ "preTasks":[
+
+ ]
+}
+
+```
+
+
+## SQL Node
+Execute query/update SQL to specified datasource.
+
+**Node data structure as follow:**
+order|parameter name||type|description |note
+-------- | ---------| ---------| -------- | --------- | ---------
+1|id | |String|task id|
+2|type ||String |task type |SQL
+3| name| |String|task name|
+4| params| |Object|customized parameters|Json format
+5| |type |String |database type
+6| |datasource |Int |datasource id
+7| |sql |String |query SQL sentence
Review comment:
done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]