Join us at the Everyday AI Conference in London, New York & Bengaluru! REGISTER NOW

Passing inputs to Shell Recipes

yashpuranik
Level 2
Level 2
Passing inputs to Shell Recipes

According to https://doc.dataiku.com/dss/latest/code_recipes/shell.html, input and output dataset names are shared as environment variable names to the shell recipe.

Assume my input dataset name is "my_input" and output dataset is "my_output". How would I specify them to my shell recipe?

Something like:

cat $my_input > $my_output ?

P.S: I know I don't need to explicitly provide these names for the cat command in Dataiku. I am trying to write a more complex shell recipe and need to figure out how to specify the datasets explicitly.


Operating system used: Linux

yashpuranik
0 Kudos
1 Reply
Jurre
Neuron
Neuron

Hi @yashpuranik ,

In the shell-recipe, left top of your screen (see attached screenshot) you'll find "variables" next to "datasets". Select "variables", in the list you will find "DKU_INPUT_0_DATASET_ID" or something like it >  click on it and it will be used in your recipe. When your output will be a new file it might be wise to specify the output-folder (also mentioned in the variables list) as that saves time searching for it. 

Hope this helps, have fun!

variables.jpg