Duplicate a Project as a Template in Create Project Macro
gblack686
Partner, Registered Posts: 62 Partner
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.
Best Answer
-
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