Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

Python API sample code for Dataiku release processing automation

Toshi
Level 2
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
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