cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks jobs UPdate/Reset API throws an unexpected error

askme
New Contributor II

{

 "error_code": "INVALID_PARAMETER_VALUE",

 "message": "Missing required field: job_id"

}

I have a test job cluster and I need to update the docker image filed with the other version using reset/update job API. I went through the documentation of data bricks and ran all of the commands that are related to the reset but I am getting the above error. attaching the snippet of my JSON file.

curl --netrc --request POST \ https://databricksinstance/api/2.0/jobs/update job_id=1 \ --data @resetjob.json \ |  jq .

{

 "job_id": 1,

 "settings": {

  "name": "testjob",

  "new_cluster": {

   "cluster_name": "",

   "spark_version": "",

   "spark_conf": {

    "spark.sql.legacy.parser.havingWithoutGroupByAsWhere": "=True"

   },

   "aws_attributes": {

    "zone_id": "",

    "first_on_demand": 0,

    "availability": "SPOT_WITH_FALLBACK",

    "instance_profile_arn": "",

    "spot_bid_price_percent": ,

    "ebs_volume_type": "GENERAL_PURPOSE_SSD",

    "ebs_volume_count": 1,

    "ebs_volume_size": 100

   },

   "node_type_id": "i3.xlarge",

   "driver_node_type_id": "i3.xlarge",

   "custom_tags": {

    "Contractor": "",

    "USER": ""

   },

   "cluster_log_conf": {

    "s3": {

     "destination": "",

     "region": "",

     "enable_encryption": true,

     "canned_acl": ""

    }

   },

   "enable_elastic_disk": false,

   "init_scripts": [

    {

     "dbfs": {

      "destination": ""

     }

    },

    {

     "dbfs": {

      "destination": ""

     }

    }

   ],

   "docker_image": {

    "url": "*",

    "basic_auth": {}

   },

   "policy_id": "",

   "num_workers": 12

  },

  "libraries": [

   {

    "egg": ""

   }

  ],

  "email_notifications": {

   "no_alert_for_skipped_runs": false

  },

  "timeout_seconds": 0,

  "notebook_task": {

   "notebook_path": ""

  },

  "max_concurrent_runs": 10

 },

 "created_time": ,

 "creator_user_name": "",

 "run_as_user_name": ""

}

Any idea on this?

2 REPLIES 2

Hubert-Dudek
Esteemed Contributor III
  • please don't specify job_id in url curl --netrc --request POST \ https://databricksinstance/api/2.0/jobs/update job_id=1 \ --data @resetjob.json \ | jq .
  • in update there is "new_settings" not "settings"
  • please consider using version 2.1 instead of 2.0
  • please consider adding JSON header -H "Content-Type: application/json"

Vidula
Honored Contributor

Hey there @radha kilaru​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!