I recently encounter an issue with legacy dbx databricks cli installed via pip when running below command somehow the notebook parameters passed in environment variable is not picking up.
databricks jobs run-now --job-id '$db_id' --notebook-params '$db_job_np' --version "2.1"
Error: Error: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Found that databricks retired the legacy CLI and I currently migrated to this CLI but wondering how to pass the notebook parameters in the latest Databricks CLI.
Any help on this would be great.
2
Answers
In the latest Databricks CLI, you can provide
--notebook-params
with key values as shown in the below format.Or else create a
.Json
file with the required parameters and provide the parameter file path with--notebook-params
argument.Sample.json
:it can be achieved using below
Syntax:
Usage (Example):