Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

How to call a previous step of the scenario in a Python custom step

Solved!
Yasmine
Level 2
How to call a previous step of the scenario in a Python custom step

Hello,

I need to call a previous step of the scenario in a Python custom step, is it possible please?

I'm using version 9.01 of dataiku.

Thanks in advance,

Best regards,

Yasmine


Operating system used: Python and scenarios

0 Kudos
1 Solution
AlexT
Dataiker
Dataiker

Hi @Yasmine ,

You can run a step in a scenario but not directly by referencing the scenario name/step name.

You create a step definition as suggested here: 

https://doc.dataiku.com/dss/latest/python-api/scenarios-inside.html#dataiku.scenario.Scenario.run_st...

Another approach is to split this into multiple scenarios and call the scenario from your python code instead. 

https://doc.dataiku.com/dss/latest/python-api/scenarios.html#run-a-scenario

Thanks, 

 

View solution in original post

0 Kudos
1 Reply
AlexT
Dataiker
Dataiker

Hi @Yasmine ,

You can run a step in a scenario but not directly by referencing the scenario name/step name.

You create a step definition as suggested here: 

https://doc.dataiku.com/dss/latest/python-api/scenarios-inside.html#dataiku.scenario.Scenario.run_st...

Another approach is to split this into multiple scenarios and call the scenario from your python code instead. 

https://doc.dataiku.com/dss/latest/python-api/scenarios.html#run-a-scenario

Thanks, 

 

0 Kudos