Survey banner
Switching to Dataiku - a new area to help users who are transitioning from other tools and diving into Dataiku! CHECK IT OUT

Script to delete multiple project

Level 3
Script to delete multiple project

Hi Team

is there a way to delete multiple projects in one go

Operating system used: linux

0 Kudos
1 Reply

Hi @saurabh,

You can create a Python script that makes use of Dataiku Python API to delete multiple projects at once. Below is an example code that can be used to delete the projects corresponding to the project keys defined in the input list project_key.

import dataikuapi

apiKey = "*************"
project_keys=["TESTDELETE", "TESTDELETE2"]

def delete_projects(project_keys):
    client = dataikuapi.DSSClient(host,apiKey)
    dss_projects = client.list_project_keys()
    for key in project_keys:
        if key in dss_projects:
            project = client.get_project(key)
            print("Project" + key + "deleted")


Please note that delete project call requires an API key with admin rights.

0 Kudos