Using global variables in API Designer
Usersyed
Partner, Registered Posts: 29 Partner
Hi all,
Need help in accessing global variables inside the API Designer.
We tried using it this way but none of it worked.
dataiku.set_remote_dss("https://DSS HOST:PORT/", "") def api_py_function(param1): #approach 1 global_variable = os.environ.get('var1', ${var1}) #approach 2 param3 = dataiku.get_custom_variables(project_key="PROJECTKEY")["var1"] return param3
Tagged:
Answers
-
JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 297 Dataiker
Hi @Usersyed
,Please see the solutions provided in this community post: https://community.dataiku.com/t5/Using-Dataiku/How-to-reference-global-variables-in-API/m-p/8318
Let us know if you have any questions.
Thanks!
Jordan