File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -961,20 +961,6 @@ def get_variables(self):
961961 return self .client ._perform_json (
962962 "GET" , "/projects/%s/variables/" % self .project_key )
963963
964- def get_resolved_variables (self , typed = False ):
965- """
966- Get a dictionary of resolved variables of this project.
967-
968- :param bool typed: if True, the variable values will be typed in the returned dict, defaults to False
969- :returns: a dictionary with instance and project variables merged
970- """
971- return self .client ._perform_json (
972- "GET" ,
973- "/projects/%s/variables-resolved" % self .project_key ,
974- params = {
975- "typed" : "true" if typed else "false"
976- })
977-
978964 def set_variables (self , obj ):
979965 """
980966 Sets the variables of this project.
Original file line number Diff line number Diff line change @@ -794,6 +794,22 @@ def set_variables(self, variables):
794794 warnings .warn ("set_variables is deprecated, please use get_global_variables().save()" , DeprecationWarning )
795795 return DSSInstanceVariables (self , variables ).save ()
796796
797+ def get_resolved_variables (self , projectKey = None , typed = False ):
798+ """
799+ Get a dictionary of resolved variables of the project.
800+
801+ :param str projectKey: the project key, defaults to the current project if any
802+ :param bool typed: if True, the variable values will be typed in the returned dict, defaults to False
803+ :returns: a dictionary with instance and project variables merged
804+ """
805+ import dataiku
806+ return self ._perform_json (
807+ "GET" ,
808+ "/projects/%s/variables-resolved" % (dataiku .default_project_key () if projectKey is None else projectKey ),
809+ params = {
810+ "typed" : "true" if typed else "false"
811+ })
812+
797813
798814 ########################################################
799815 # General settings
You can’t perform that action at this time.
0 commit comments