Thank you Hubert. Happy to say that this example has helped. I was able to figure it out.

Corrected deployment.json:

{
  "default": {
    "jobs": [
      {
        "name": "parameter-test",
        "spark_python_task": {
          "python_file": "parameter-test.py",
          "parameters": [
            "test1",
            "test2"
          ]
        }
      }
    ]
  }
}

Output of the Python code posted originally, above:

Total arguments passed: 3
Script name python
 
Arguments passed: test1 test2

For some reason, the name of my Python script is returned as just "python", but the actual name is "parameter-test.py". Any idea why Databricks/DBX does that? Any way to get the actual script name from sys.argv[0]?

P.S. Again, there are not enough clear, working examples in the manuals (just a feedback, take it FWIW).

View solution in original post