Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

can you update datasets using loops in an SQL recipe

jaronarboleda
Level 1
can you update datasets using loops in an SQL recipe

I have a dataset which I would like to update several times to give me monthly records, for 12 months, for example.  can this be done in an SQL recipe using loops?  Or can it be done?  pls let me know how.  Thanks

0 Kudos
2 Replies
tgb417

@jaronarboleda ,

Welcome to the Dataiku Community.

Although from your description it is hard to tell exactly what your use case is.  Here are some thoughts  that may help.

Although there is no loop construct across visual and code recipes in DSS.  I will suggest 3 features of Dataiku DSS that may be helpful to achieving what you are trying to do.

  • The option to append to recipes input/output tab.  For output datasets, there is an "append instead of overwrite" check box, which means that the recipe will continually add to the dataset.
  • The use of project variables on recipes, that can change the behavior or a recipe from one run to the next.
  • The use of Scenarios, that can schedule repeated building of datasets, and the setting of variables.

Those three features of DSS give you some basic "looping" features.

That said if you actually need to loop something you can always write some Python or even R code.  SQL can be called from each of these languages.  

Hope those clues may help you a little bit.

--Tom

--Tom
0 Kudos
jaronarboleda
Level 1
Author

thanks for the suggestions