diff --git a/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py b/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py index 255d599781..68f2a57548 100644 --- a/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py +++ b/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py @@ -34,8 +34,7 @@ task_dependent: task_dependent(this task dependent on task_dependent_external.task_1 and task_dependent_external.task_2). """ -from constants import ProcessDefinitionDefault - +from pydolphinscheduler.constants import ProcessDefinitionDefault from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.tasks.dependent import And, Dependent, DependentItem, Or from pydolphinscheduler.tasks.shell import Shell diff --git a/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py b/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py index 418d5692e6..5ab2aa50ad 100644 --- a/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py +++ b/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py @@ -29,10 +29,9 @@ parent -> switch -> . """ -from tasks.switch import Branch, Default, Switch, SwitchCondition - from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.tasks.shell import Shell +from pydolphinscheduler.tasks.switch import Branch, Default, Switch, SwitchCondition with ProcessDefinition( name="task_dependent_external",