0 votes
Hi,

I wanted to ask if in DSS it is possible to define some global variables at workflow level that can be called in different recipes in different points in the flow.

For example, set @SomeVariable = 'VALUE' and then use SomeVariable in the flow in my recipe.

It would be an extremely useful feature! E.g. If I wanted to run the workflow first for product = Y and then product = X, I could define a product variable. Or if I wanted to run my flow for timestamp < DATE I could define the variable DATE = %mydate% and  change this as I like.

Thanks!
asked by

1 Answer

0 votes
Hi,

This is possible. It's usable mostly in code recipes, and also in formulas in visual recipes;

Please see https://doc.dataiku.com/dss/latest/advanced/variables_expansion.html
answered by
Thanks! Can it be used in recipe like Group_by and Prepare?
Prepare recipe: yes using a Formula processor and the "${variable_name}" syntax (make sure to put " quotes around the ${}).
Group recipe: yes using Formulas in Prefilter / Computed Columns / Postfilter if you run the recipe with the DSS or Spark engine. For SQL engine, you may want to convert the recipe to SQL and then do your variable manipulation there.
928 questions
957 answers
958 comments
1,804 users