Dolphin Scheduler 2.0.0 MetaData

Dolphin Scheduler 2.0 DB Table Overview

Table NameComment
t_ds_access_tokentoken for access ds backend
t_ds_alertalert detail
t_ds_alertgroupalert group
t_ds_commandcommand detail
t_ds_datasourcedata source
t_ds_error_commanderror command detail
t_ds_process_definitionprocess difinition
t_ds_process_instanceprocess instance
t_ds_projectproject
t_ds_queuequeue
t_ds_relation_datasource_userdatasource related to user
t_ds_relation_process_instancesub process
t_ds_relation_project_userproject related to user
t_ds_relation_resources_userresource related to user
t_ds_relation_udfs_userUDF related to user
t_ds_relation_user_alertgroupalert group related to user
t_ds_resourcesresoruce center file
t_ds_schedulesprocess difinition schedule
t_ds_sessionuser login session
t_ds_task_instancetask instance
t_ds_tenanttenant
t_ds_udfsUDF resource
t_ds_useruser detail
t_ds_versionds version

E-R Diagram

User Queue DataSource

image.png

  • Multiple users can belong to one tenant
  • The queue field in the t_ds_user table stores the queue_name information in the t_ds_queue table, but t_ds_tenant stores queue information using queue_id. During the execution of the process definition, the user queue has the highest priority. If the user queue is empty, the tenant queue is used.
  • The user_id field in the t_ds_datasource table indicates the user who created the data source. The user_id in t_ds_relation_datasource_user indicates the user who has permission to the data source.

Project Resource Alert

image.png

  • User can have multiple projects, User project authorization completes the relationship binding using project_id and user_id in t_ds_relation_project_user table
  • The user_id in the t_ds_projcet table represents the user who created the project, and the user_id in the t_ds_relation_project_user table represents users who have permission to the project
  • The user_id in the t_ds_resources table represents the user who created the resource, and the user_id in t_ds_relation_resources_user represents the user who has permissions to the resource
  • The user_id in the t_ds_udfs table represents the user who created the UDF, and the user_id in the t_ds_relation_udfs_user table represents a user who has permission to the UDF

Command Process Task

image.png
image.png

  • A project has multiple process definitions, a process definition can generate multiple process instances, and a process instance can generate multiple task instances
  • The t_ds_schedulers table stores the timing schedule information for process difinition
  • The data stored in the t_ds_relation_process_instance table is used to deal with that the process definition contains sub-processes, parent_process_instance_id field represents the id of the main process instance containing the child process, process_instance_id field represents the id of the sub-process instance, parent_task_instance_id field represents the task instance id of the sub-process node
  • The process instance table and the task instance table correspond to the t_ds_process_instance table and the t_ds_task_instance table, respectively.

Core Table Schema

t_ds_process_definition

FieldTypeComment
idintprimary key
namevarcharprocess definition name
versionintprocess definition version
release_statetinyintprocess definition release state:0:offline,1:online
project_idintproject id
user_idintprocess definition creator id
process_definition_jsonlongtextprocess definition json content
descriptiontextprocess difinition desc
global_paramstextglobal parameters
flagtinyintprocess is available: 0 not available, 1 available
locationstextNode location information
connectstextNode connection information
receiverstextreceivers
receivers_cctextcarbon copy list
create_timedatetimecreate time
timeoutinttimeout
tenant_idinttenant id
update_timedatetimeupdate time

t_ds_process_instance

FieldTypeComment
idintprimary key
namevarcharprocess instance name
process_definition_idintprocess definition id
statetinyintprocess instance Status: 0 commit succeeded, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete
recoverytinyintprocess instance failover flag:0:normal,1:failover instance
start_timedatetimeprocess instance start time
end_timedatetimeprocess instance end time
run_timesintprocess instance run times
hostvarcharprocess instance host
command_typetinyintcommand type:0 start ,1 Start from the current node,2 Resume a fault-tolerant process,3 Resume Pause Process, 4 Execute from the failed node,5 Complement, 6 dispatch, 7 re-run, 8 pause, 9 stop ,10 Resume waiting thread
command_paramtextjson command parameters
task_depend_typetinyinttask depend type. 0: only current node,1:before the node,2:later nodes
max_try_timestinyintmax try times
failure_strategytinyintfailure strategy. 0:end the process when node failed,1:continue running the other nodes when node failed
warning_typetinyintwarning type. 0:no warning,1:warning if process success,2:warning if process failed,3:warning if success
warning_group_idintwarning group id
schedule_timedatetimeschedule time
command_start_timedatetimecommand start time
global_paramstextglobal parameters
process_instance_jsonlongtextprocess instance json
flagtinyintprocess instance is available: 0 not available, 1 available
update_timetimestampupdate time
is_sub_processintwhether the process is sub process: 1 sub-process, 0 not sub-process
executor_idintexecutor id
locationstextNode location information
connectstextNode connection information
history_cmdtexthistory commands of process instance operation
dependence_schedule_timestextdepend schedule fire time
process_instance_priorityintprocess instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest
worker_group_idintworker group id
timeoutinttime out
tenant_idinttenant id

t_ds_task_instance

FieldTypeComment
idintprimary key
namevarchartask name
task_typevarchartask type
process_definition_idintprocess definition id
process_instance_idintprocess instance id
task_jsonlongtexttask content json
statetinyintStatus: 0 commit succeeded, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete
submit_timedatetimetask submit time
start_timedatetimetask start time
end_timedatetimetask end time
hostvarcharhost of task running on
execute_pathvarchartask execute path in the host
log_pathvarchartask log path
alert_flagtinyintwhether alert
retry_timesinttask retry times
pidintpid of task
app_linkvarcharyarn app id
flagtinyinttaskinstance is available: 0 not available, 1 available
retry_intervalintretry interval when task failed
max_retry_timesintmax retry times
task_instance_priorityinttask instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest
worker_group_idintworker group id

t_ds_command

FieldTypeComment
idintprimary key
command_typetinyintCommand type: 0 start workflow, 1 start execution from current node, 2 resume fault-tolerant workflow, 3 resume pause process, 4 start execution from failed node, 5 complement, 6 schedule, 7 rerun, 8 pause, 9 stop, 10 resume waiting thread
process_definition_idintprocess definition id
command_paramtextjson command parameters
task_depend_typetinyintNode dependency type: 0 current node, 1 forward, 2 backward
failure_strategytinyintFailed policy: 0 end, 1 continue
warning_typetinyintAlarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent
warning_group_idintwarning group
schedule_timedatetimeschedule time
start_timedatetimestart time
executor_idintexecutor id
dependencevarchardependence
update_timedatetimeupdate time
process_instance_priorityintprocess instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest
worker_group_idintworker group id