Python API sample code for Dataiku release processing automation
Toshiaki
Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 5 Partner
I would like to automate the release process of Dataiku.
The manual information referred to below has been linked, but if anyone has a sample code for Python, could you share it? I think it is necessary to implement the following processing.
https://doc.dataiku.com/dss/latest/python-api/project-deployer.html
https://doc.dataiku.com/dss/latest/python-api/projects.html#dataikuapi.dss.project.DSSProject.export_bundle.
Design Node
① Create a project bundle (specify the model, folder, and dataset to be included in the bundle)
Deployer Node
(2) Definitions of Deployments (Variables, Connections, Code envs, Scenerios)
③ Deploy DN → DP bundle
④ Deploy DP → AN bundle
Automation Node
⑤ Activate the project
Tagged:
Answers
-
Hi,
You can automate this using Scenarios, no need to use python code.
First, create a sequence of steps scenario:
Then add a "Create bundle" step:
The options I've chosen below will create a bundle id variable called "bundle_id", and ensure bundle_id is unique, then publish this bundle to the Deployer:
Next, add an "Update project deployment" step:
Your Deployment id should generally be "PROJECT_KEY-on-AUTOMATION_NODE_INFRA_NAME", and this ${bundle_id} will pull from the bundle_id variable you defined in the previous step:
Note that you'll have to deploy your first bundle from the deployer manually. For subsequent deployments, this scenario will work.
Best,
Pat