Closed stevenayers-bge closed 9 hours ago
Too bad if your fruit names have a space in them, like "honeydew melon".
Too bad if your fruit names have a space in them, like "honeydew melon".
chaos tbh
Thanks for the report @stevenayers-bge. We'll take this request into consideration for the Workflows product!
One idea could be to support something like {{* job.parameters.fruits}}
for array arguments. Note that this would be an extension of the Workflows parameters feature, not something at the CLI / DABs level. We want to look at that space a bit holistically before doing more extensions right now, especially since there is also the ${ }
notation from DABs.
In the intermediate, you could use a space-separated, comma-separated, or JSON-based value for job.parameters.fruits
. I realize that is not ideal, and we hope to have a better solution for you at a later point.
I'll close this since this doesn't directly relate to the CLI, but let me know if you have further thoughts/questions. You can also leave feedback at https://docs.databricks.com/en/resources/ideas.html.
Describe the issue
Currently, there is a mismatch between task parameters and job parameters support for JSON arrays. There are some situations where this becomes problematic.
Say you have the following python task:
You'd run it like this:
You move it to a workflow ✅
This works correctly and interprets
args.fruits
as a list:But if you want to pass the task some job parameters, this happens: ❌
The job parameter is interpreted as one string:
Other Options I've Considered You could always do
args.fruits.split(' ')
in Python, but it feels pretty hacky.