Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on March 27, 2018 3:53PM
Likes: 1
Replies: 4
Updating to use default project key (i.e., project key for current project):
project_handle = dataiku.api_client().get_project(dataiku.default_project_key())
vars = project_handle.get_variables()
vars['standard']['varname'] = 'varvalue'
project_handle.set_variables(vars)
Thanks @Marlan
for showing how the default project key works! - I was able to use the "default project key" in my Custom Python step in a Scenario. Now I can make copies of my project and run the scenario without having to update the formerly hard-coded project key!
# obtain a handle on the instance and default project key
client = dataiku.api_client()
project = dataiku.api_client().get_project(dataiku.default_project_key())
vs. hard-coded:
# obtain a handle on your instance and project
client = dataiku.api_client()
project = client.get_project('variables102final')