We're excited to announce that we're launching the second installment of Dataiku Product Days Register Now

Python API - How to determine the next expected start time of a triggered scenario

Solved!
JohnB
Level 3
Python API - How to determine the next expected start time of a triggered scenario

I would like to know via a trigger defintion when a scenario is next expected to run.

Can this be obtained via the Python API?

0 Kudos
1 Solution
KimmyC
Dataiker
Dataiker

Hi,

Yes, you can obtain it via the Python API. The sample code below will do it:

import dataiku
from dataiku import pandasutils as pdu
import pandas as pd

client = dataiku.api_client()
project = client.get_project("your_project_key")
scenario = project.get_scenario("your_scenario_key")
scenario_def = scenario.get_definition()
scenario_def['triggerDigestItems']

Hope this helps!

View solution in original post

2 Replies
KimmyC
Dataiker
Dataiker

Hi,

Yes, you can obtain it via the Python API. The sample code below will do it:

import dataiku
from dataiku import pandasutils as pdu
import pandas as pd

client = dataiku.api_client()
project = client.get_project("your_project_key")
scenario = project.get_scenario("your_scenario_key")
scenario_def = scenario.get_definition()
scenario_def['triggerDigestItems']

Hope this helps!

View solution in original post

JohnB
Level 3
Author

Hi Kimmy,

Yes that helps a lot. Thanks!

A banner prompting to get Dataiku DSS