Solved

revert to parent version of pipeline using python sdk

  • 26 February 2023
  • 4 replies
  • 56 views

I want to delete the latest published version of a pipeline and want to revert back e.g from v 2.1 to v2.0. 2.0 would be the latest version available… How would I do it using control hub?

icon

Best answer by saleempothiwala 27 February 2023, 12:40

View original

4 replies

Userlevel 5
Badge +1

@Yumura 

Please click on the version history and select the version do you want to delete and click on the option delete commit which will delete the particular version .

 

As per below screen shot i have committed til version 4 and version 5 is in draft mode , i want to delete the version 4 ,so clicked on 3 dots on the right side where its asking to delete the commit and its delete the version 4.

Kindly refer the below screenshots where the selected version has been deleted and let me know if it helps.

 

 

Thanks & Regards

Bikram_

Thank you Bikram, I can’t edit my question but unfortunately I wanted to do it using Python SDK for streamsets.

Userlevel 4
Badge

@Yumura 

 

In order to delete the last version of any pipeline, you will need this:

 

 pipeline=sch.pipelines.get(name="DeleteTest")
 sch.delete_pipeline(pipeline, only_selected_version=True)

 

here, sch is the instance of your Control Hub. The above two lines will delete the last version (committed or draft, any)

If you specify only_selected_version=False then the whole pipeline will be deleted.

 

Thankyou, it worked

 

Reply