dolphinscheduler-sdk-python icon indicating copy to clipboard operation
dolphinscheduler-sdk-python copied to clipboard

How to set Startup Parameter?

Open kevinkelin opened this issue 2 years ago • 5 comments

image

When run a workflow by webUI, user can set Startup Parameter, but how to set Startup Parameter by python sdk?

I try to use param but it does't work

with Workflow(name="api_python_test5", param={"data": "hello"}) as workflow:
   workflow.start()

kevinkelin avatar Dec 04 '23 11:12 kevinkelin

Hi @kevinkelin

I think locally and it works for me. could you share which version of dolphinscheduler and pydolphinscheduler do you use?

image image

zhongjiajie avatar Dec 09 '23 07:12 zhongjiajie

Hi @kevinkelin

I think locally and it works for me. could you share which version of dolphinscheduler and pydolphinscheduler do you use?

image image

Thanks, but I mean when user already set Start Parms by webUI, for example set KEY1 value1, then user use sdk to start a worlflow, then user want to make KEY1 to value2.

with Workflow(name="api_python_test5", param={"KEY1": "value2"}) as workflow:
   workflow.start()

only call workflow.start() , doesn't call workflow.commit(), the value of KEY1 is still value1 in flow instance.

Is this the feature of sdk? or I must call commit method?

kevinkelin avatar Dec 14 '23 03:12 kevinkelin

hi @kevinkelin I have test base on your case, but I can update the workflow parameter already fine in web ui. BTW, when you can method workflow.start() it will call workflow.submit() implicitly

zhongjiajie avatar Dec 25 '23 04:12 zhongjiajie

please make sure your parameter set in web UI and SDK with same name. You need to carefully compare whether there are spaces in parameter

zhongjiajie avatar Dec 25 '23 04:12 zhongjiajie

could you share what version do you use for dolphinschduler and sdk?

zhongjiajie avatar Dec 25 '23 07:12 zhongjiajie