How can i globally change project ownership when a user has been deleted from dataiku?

rainierms19
rainierms19 Registered Posts: 7 ✭✭✭✭

When user is deleted from dataiku, looks like all the projects/jobs running under that username fails and a notification is sent like every 10 seconds.

How can I globally change the project / job ownership?

Thanks.

Best Answers

  • duphan
    duphan Dataiker, Registered Posts: 32 Dataiker
    Answer ✓

    Hello,

    You can change the project ownership with the API

    import dataiku

    client = dataiku.api_client()

    old_owner = 'OLD_OWNER'
    new_owner = 'NEW_OWNER'

    for project_key in client.list_project_keys():
    project = client.get_project(project_key)
    project_permission = project.get_permissions()
    if project_permission.get('owner') == old_owner:
    print("Changing ownership on project {0}".format(project_key))
    project_permission['owner'] = new_owner
    project.set_permissions(project_permission)

  • duphan
    duphan Dataiker, Registered Posts: 32 Dataiker
    Answer ✓

    Hello, yes that's even easier, you can go to Project -> Security, there will be a dropdown to choose "Project Owner"

    One point that I forgot, you might need to change the "run as user" of the scenarios too. They are in Project -> Scenarios -> You go to each scenario.

    I attach 2 screenshot so that you know where to look for!

Answers

Setup Info
    Tags
      Help me…