create publicly accessible read only variable
Tomas
Registered, Neuron 2022 Posts: 121 ✭✭✭✭✭
Hi,
I would like to set on the instance level of the DSS a variable what will be readable by everyone in python. When I store something on the global variables section it is readable only by admins. Other users get:
client=dataiku.api_client()
print(client.get_variables().get('env_specific'))
dataikuapi.utils.DataikuException: com.dataiku.dip.exceptions.UnauthorizedException: Action forbidden, you are not admin
Thanks for any tips/advise,
I would like to set on the instance level of the DSS a variable what will be readable by everyone in python. When I store something on the global variables section it is readable only by admins. Other users get:
client=dataiku.api_client()
print(client.get_variables().get('env_specific'))
dataikuapi.utils.DataikuException: com.dataiku.dip.exceptions.UnauthorizedException: Action forbidden, you are not admin
Thanks for any tips/advise,
Best Answer
-
Hi,
You can use:
import dataiku
dataiku.get_custom_variables()Cheers,
Alex
Answers
-
Supplem question: if I want to store a variable what is visible only for admins, how can I achieve this? Thanks
-
There is no such concept as "a variable visible only for an admin" as an instance variable. You would need to emulate that behavior by creating a project accessible only to the admin group, and store your variables in there as project variables.
-
Thanks!