Procedure

Task procedure.

class pydolphinscheduler.tasks.procedure.Procedure(name: str, datasource_name: str, method: str, datasource_type: str | None = None, *args, **kwargs)[source]

Bases: BatchTask

Task Procedure object, declare behavior for Procedure task to dolphinscheduler.

It should run database procedure job in multiply sql lik engine, such as: - ClickHouse - DB2 - HIVE - MySQL - Oracle - Postgresql - Presto - SQLServer You provider datasource_name contain connection information, it decisions which database type and database instance would run this sql.

_downstream_task_codes: set[int]
_task_custom_attr: set = {'method'}
_task_relation: set[TaskRelation]
_timeout: timedelta | int
_upstream_task_codes: set[int]
property datasource: dict

Get datasource for procedure task.

property task_params: dict

Override Task.task_params for produce task.

produce task have some specials attribute for task_params, and is odd if we directly set as python property, so we Override Task.task_params here.

YAML file example

# Define the workflow
workflow:
  name: "Procedure"

# Define the tasks within the workflow
tasks:
  - name: task
    task_type: Procedure
    datasource_name: db
    method: show tables;