Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I created a flow and converted it to an application-as-recipe. The application designer creates some default variables such as 'variable1'. How do I access these variables in my python recipes so that they can be used in the flow?
My typical approach to accessing project global variables is as such:
client = dataiku.api_client()
projectKey = dataiku.default_project_key()
proj = client.get_project(projectKey)
projVars = proj.get_variables()['standard']
thing1 = projVars['thing1']
thing2 = projVars['thing2']
After I figure out how to access, my next problem will be how do I incorporate it into my flow and still run my entire flow to test it if 'variable1' is supposed to be user input when they use the application as a recipe?
Hi,
the "edit project variables" tile will add the values entered in the UI in the 'local' section of the project variables. This means:
- you can put a value in the 'global' section of the variables in the project where you design the template, to have a default value to develop the app with
- you can access the value in the app with
v = dataiku.get_custom_variables()["variable1"]
# or
proj = dataiku.api_client().(dataiku.default_project_key())
v = proj.get_variables()["local"]["variables1"]
Hi,
the "edit project variables" tile will add the values entered in the UI in the 'local' section of the project variables. This means:
- you can put a value in the 'global' section of the variables in the project where you design the template, to have a default value to develop the app with
- you can access the value in the app with
v = dataiku.get_custom_variables()["variable1"]
# or
proj = dataiku.api_client().(dataiku.default_project_key())
v = proj.get_variables()["local"]["variables1"]
Is the 'edit project variables' tile a DSS 9.0 feature? I'm on DSS 8 so may not have access to that feature.