Python API sample code for Dataiku release processing automation

Toshi
Level 2
Python API sample code for Dataiku release processing automation
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.
 
 
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
0 Kudos
1 Reply
pmasiphelps
Dataiker

Hi,

 

You can automate this using Scenarios, no need to use python code.

 

First, create a sequence of steps scenario:

Screen_Shot_2022-05-03_at_10_11_29_AM.png

Then add a "Create bundle" step:

Screen_Shot_2022-05-03_at_10_11_43_AM.png

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:

Screen Shot 2022-05-03 at 10.14.08 AM.png

Next, add an "Update project deployment" step:

Screen_Shot_2022-05-03_at_10_11_43_AM.png

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:

Screen_Shot_2022-05-03_at_10_14_15_AM.png

Note that you'll have to deploy your first bundle from the deployer manually. For subsequent deployments, this scenario will work.

 

Best,

Pat

 

0 Kudos