Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I read on the documentation that global variables can be dynamically modified at project run by auto execution the get_variables() code defined in Administration / Variables Automatic update code.
It seems nice but as I see it is Jython only, is there any way to use some contextual data like custom variables / user property / username / etc from there ?
Thanks in Advance !
You won't be able to access that information using the automatic update code since it uses Jython.
As an alternative, you could use Python code in a scenario to set the global variables. This uses regular Python, so you have full access to Python modules.
Preview of the scenario:
Example code that sets the "my_var" global variable:
from dataiku.scenario import Scenario scenario = Scenario() scenario.set_global_variables( my_var="foo" )
Reference documentation: Scenarios (in a scenario)