Ready for Dataiku 10? Try out the Crash Course on new features!GET STARTED

Update a Jupyter notebook as a Scenario Step

Solved!
VFL
Level 2
Update a Jupyter notebook as a Scenario Step

Hi,

I am creating a Dataiku Application and part of the pipeline includes the Running of a Notebook, as a Scenario step.

As such a "Run a Notebook" step is not available in Scenarios, I was thinking that maybe I could use the "Execute python code" step and a code like the following, but with a Notebook instead of a Recipe.

project = client.get_project('MY_PROJECT')
recipe = project.get_recipe("my_recipe") ##### MY NOTEBOOK INSTEAD
recipe.run()

Thanks

0 Kudos
1 Solution
Ignacio_Toledo

Hi @VFL,

Did you check the step called "Export Notebook"?

 

Screenshot 2021-11-12 221233.png

While the main goal of this step is to create an "Export" of a notebook, so it can be presented as a report, you can still use it to run the Notebook, even if you don't need the export.

Hope this helps,

Ignacio

View solution in original post

2 Replies
Ignacio_Toledo

Hi @VFL,

Did you check the step called "Export Notebook"?

 

Screenshot 2021-11-12 221233.png

While the main goal of this step is to create an "Export" of a notebook, so it can be presented as a report, you can still use it to run the Notebook, even if you don't need the export.

Hope this helps,

Ignacio

View solution in original post

RoyE
Dataiker
Dataiker

Hi,

There are two options that you can try to complete this workflow.

  • The first would be to simply copy the code from your notebook to the "Execute Python" step in your scenario and let the scenario run the code instead of the notebook. 
  • Second, you could "Create Recipe" from the notebook and add arbitrary inputs/outputs and use the code that you provided to simply run the "recipe" but is just the contents of your notebook.

Roy

 

A banner prompting to get Dataiku DSS