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:ย 

Does the Jobs API allow executing an older version of a Notebook using version history?

aladda
Honored Contributor II
Honored Contributor II

I see the revision_timestamp paramater on NotebookTask https://docs.databricks.com/dev-tools/api/latest/jobs.html#jobsnotebooktask. An example of how to invoke it would be helpful

1 ACCEPTED SOLUTION

Accepted Solutions

aladda
Honored Contributor II
Honored Contributor II

You can use the databricks built in version control feature, coupled with the NotebookTask Jobs API to specify a specific version of the notebook based on the timestamp of the save defined in unix timestamp format

curl -n -X POST -H 'Content-Type: application/json' -d \
'{
  "name": "API Revision Timestamp Test V3",
  "existing_cluster_id": "cluster-id",
  "notebook_task": {
            "notebook_path": "notebookpath",
            "revision_timestamp": "1624048530"
        }
}' https://<databricks-instance>/api/2.0/jobs/create

View solution in original post

1 REPLY 1

aladda
Honored Contributor II
Honored Contributor II

You can use the databricks built in version control feature, coupled with the NotebookTask Jobs API to specify a specific version of the notebook based on the timestamp of the save defined in unix timestamp format

curl -n -X POST -H 'Content-Type: application/json' -d \
'{
  "name": "API Revision Timestamp Test V3",
  "existing_cluster_id": "cluster-id",
  "notebook_task": {
            "notebook_path": "notebookpath",
            "revision_timestamp": "1624048530"
        }
}' https://<databricks-instance>/api/2.0/jobs/create

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group