Open GaniMarquez opened 12 months ago
Suggestion:
I have already did a quick patch in my local dbx
set-up by refactoring the function to this:
def setup_arguments(self, arguments: Union[Dict, List[Any]]):
if isinstance(arguments, dict):
task_props = ["python"] + [f"--{arg}={value}" for arg, value in arguments.items()]
else:
task_props = ["python"] + [str(arg) for arg in arguments]
setup_command = f"""
import sys
sys.argv = {task_props}
"""
self._client.execute_command(setup_command, verbose=False)
But I wanted to know your thought if there's a better way to resolve this.
Expected Behavior
Whenever I send
named_parameters
as part of mydbx execute
, I want the workflow to use these parameters during runtime. This is already the case if I simply use just the normal positional parameters.Current Behavior
DBX only parses that keys from the dict and not the values when it formats the arguments used by the task. It always assumes that a list of strings are sent as CLI arguments similar to what you would expect for positional parameters. The source code that performs this formatting is referenced here.
Steps to Reproduce (for bugs)
named_parameter
as part of the workflow definition.Context
I am using a working with workflows using python wheels as tasks.
Your Environment