Renaming Scenario name using Python

Options
Savan_Hipara
Savan_Hipara Dataiku DSS Core Concepts, Registered Posts: 3 ✭✭✭

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

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,716 Neuron
    edited 4:18PM Answer ✓
    Options

    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()

Answers

Setup Info
    Tags
      Help me…