New to Dataiku DSS? Try out our NEW Quick Start Programs today and get onboarded on the product in just one hour! Let's go

Duplicate a Project as a Template in Create Project Macro

Solved!
gblack686
Level 4
Level 4
Duplicate a Project as a Template in Create Project Macro

I've set up a project creation macro. Now I want to copy over contents from a "template project". In the new project I'd like to include datasets, plugins, dss insights, dashboards, git history. 

I know there is a duplicate function, but from my understanding this duplicates project contents to a new project --- but the project will already have been created by the macro. 

0 Kudos
1 Solution
ManhulayS
Dataiker
Dataiker

Hello @gblack686,

Using a project creation macro, it is possible to directly create a new project by duplicating an existing project. 

To do so you can use these lines in your "runnable.py" file:

project = client.get_project('TEMPLATE_PROJECT')
project.duplicate('NEW_PROJECT', 'New project from template')

Please refer to the python API doc for further details:  https://doc.dataiku.com/dss/latest/python-api/projects.html#duplicating

View solution in original post

1 Reply
ManhulayS
Dataiker
Dataiker

Hello @gblack686,

Using a project creation macro, it is possible to directly create a new project by duplicating an existing project. 

To do so you can use these lines in your "runnable.py" file:

project = client.get_project('TEMPLATE_PROJECT')
project.duplicate('NEW_PROJECT', 'New project from template')

Please refer to the python API doc for further details:  https://doc.dataiku.com/dss/latest/python-api/projects.html#duplicating

View solution in original post

A banner prompting to get Dataiku DSS