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

Python API: Project metadata for bundle activations

Solved!
JohnB
Level 3
Python API: Project metadata for bundle activations

Is there a way to query via the API when the current project bundle was last activated?

I was wondering if I could use that data in a custom trigger to run a scenario when the bundle is activated.

DSS v8.0.3

0 Kudos
1 Solution
JohnB
Level 3
Author

Have found the answer via https://community.dataiku.com/t5/Using-Dataiku-DSS/How-to-know-if-project-has-active-bundle-in-autom...

 

..which leads me to this:

import dataiku
client = dataiku.api_client()
project_key = client.get_default_project().project_key
project_dict = [p for p in client.list_projects() if p['projectKey'] == project_key][0]
active_bundle_state = project_dict.get('activeBundleState',{})
print(active_bundle_state.get('activatedOn'))

 

View solution in original post

2 Replies
JohnB
Level 3
Author

Have found the answer via https://community.dataiku.com/t5/Using-Dataiku-DSS/How-to-know-if-project-has-active-bundle-in-autom...

 

..which leads me to this:

import dataiku
client = dataiku.api_client()
project_key = client.get_default_project().project_key
project_dict = [p for p in client.list_projects() if p['projectKey'] == project_key][0]
active_bundle_state = project_dict.get('activeBundleState',{})
print(active_bundle_state.get('activatedOn'))

 

View solution in original post

CoreyS
Community Manager
Community Manager

Love to see it @JohnB!

Looking for more resources to help you use DSS effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
0 Kudos
A banner prompting to get Dataiku DSS