databricks bundle wheel job add Parameters

334 views Asked by At

Here is an example resources yaml i am using with asset bundle:

 name: "clientscoretestdatageneratorusingparams"
        tasks:
           task_key: "mytask
            python_wheel_task:
              package_name: "workflows"
              entry_point: clientscoretestdatagenerator

I want to add a parameter to this so that I can access it using sys.arg[1].

I have both tried named_parameters (as suggested here) and just parameters.

1

There are 1 answers

1
Koedlt On BEST ANSWER

You might have gone wrong with your syntax somewhere. The parameters field needs to be an array, so something like this should work:

 name: "clientscoretestdatageneratorusingparams"
        tasks:
           task_key: "mytask
            python_wheel_task:
              package_name: "workflows"
              entry_point: clientscoretestdatagenerator
              parameters: ["string1", "string2"]

Also make sure its indentation is correct. It should be 1 indentation level deeper than your python_wheel_task.