Create id for each run

Solved!
Kevin_dataiku8
Level 2
Create id for each run

Hello to all,

I write to you to know if it is possible to create an id for each run (increment of a number for example for each run: 1, 2, 3 )

Indeed, I created in my dataset a now() column which allows me to have a date on each run. The goal is to create a number that I increment to make it easier to find the last version.

If you have an idea, I'm interested, thanks a lot

 

0 Kudos
1 Solution
AlexT
Dataiker

Hi,


You could add a "version" column reading project variables and incrementing with one each time.
โ€ƒScreenshot 2023-04-25 at 4.23.36 PM.png
IN preparing a recipe for example add a formula with variables["run_version"] + 1

Screenshot 2023-04-25 at 4.27.00 PM.png

To increment this, you would need to run via a scenario and set the variable value to current ["run_version"]  + 1 

Screenshot 2023-04-25 at 4.28.55 PM.png

Thanks

View solution in original post

0 Kudos
2 Replies
AlexT
Dataiker

Hi,


You could add a "version" column reading project variables and incrementing with one each time.
โ€ƒScreenshot 2023-04-25 at 4.23.36 PM.png
IN preparing a recipe for example add a formula with variables["run_version"] + 1

Screenshot 2023-04-25 at 4.27.00 PM.png

To increment this, you would need to run via a scenario and set the variable value to current ["run_version"]  + 1 

Screenshot 2023-04-25 at 4.28.55 PM.png

Thanks

0 Kudos
Kevin_dataiku8
Level 2
Author

Dear AlexT,

 

Thank you very much !!

0 Kudos