We're excited to announce that we're launching the second installment of Dataiku Product Days Register Now

Import deleted project from bundle

Raj7974
Level 1
Import deleted project from bundle

Hi, 

 

I have downloaded bundle of project as zip file and deleted that project, how to import that project again through bundle using python api. 

 

Thanks, 

Raj

0 Kudos
1 Reply
AlexT
Dataiker
Dataiker

Hi @Raj7974 ,

You can use the following sample to import the bundle as a project:

https://doc.dataiku.com/dss/latest/python-api/projects.html#importing

 

import dataiku
client = dataiku.api_client()

#include if running outside of DSS
#dataiku.set_remote_dss("http(s/)://dss-hostname:port/", "api-key-here)

with open("/path/to/dss-bundle-PROJECT-bundle-export.zip", "rb") as f:
client.prepare_project_import(f).execute()
0 Kudos
A banner prompting to get Dataiku DSS