Survey banner
Share your feedback on the Dataiku documentation with this 5 min survey. Thanks! TAKE THE SURVEY

Renaming Scenario name using Python

Solved!
Savan_Hipara
Level 1
Renaming Scenario name using Python

I wanted to change all the scenarios name which listed on my project using Python recipe only. How I can change?

0 Kudos
1 Solution
Turribeach

Here you go:

import dataiku

client_handle = dataiku.api_client()
project_handle = client_handle.get_project('some project key')
scenario_handle = project_handle.get_scenario('some scenario ID')
scenario_settings = scenario_handle.get_settings()
scenario_settings.get_raw()['name'] = 'TestScenarioNewName'
scenario_settings.save()

View solution in original post

2 Replies
Turribeach

Here you go:

import dataiku

client_handle = dataiku.api_client()
project_handle = client_handle.get_project('some project key')
scenario_handle = project_handle.get_scenario('some scenario ID')
scenario_settings = scenario_handle.get_settings()
scenario_settings.get_raw()['name'] = 'TestScenarioNewName'
scenario_settings.save()
Savan_Hipara
Level 1
Author

Thank you very much for the solution.