Modify the value of a variable in a Python recipe
![bored_panda](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar22.png)
bored_panda
Registered Posts: 11 ✭✭✭✭
Hello,
I'm asking this question again, because I need an answer quickly and I'm not sure my comment in the original thread will be seen.
"I would like to modify the value of a variable that I declared in my project (Settings > Variables) in a Python recipe. Is it possible ?"
Thanks.
Answers
-
The DSS public API allows you to do that, including via its python client: see DSSProject.set_variable. You'll need to install the python package in the DSS Python environment though.
Depending on the use case, you may find it simpler to use a Set project settings step in a Scenario, even if you have a custom python step before to compute the value.
-
I would appreciate an example rather than a link to a documentation, where it is quite hard to navigate and search.