From 4b3ec6b5566fb09b27f23da76536347195fd2ada Mon Sep 17 00:00:00 2001 From: Jon Bannister Date: Tue, 13 Dec 2022 15:00:42 +0000 Subject: [PATCH] Expose role kwarg within SingleOutputRecipeCreator.with_output() and SingleOutputRecipeCreator.with_existing_output() --- dataikuapi/dss/recipe.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dataikuapi/dss/recipe.py b/dataikuapi/dss/recipe.py index 782d96e3..d3c7b9fd 100644 --- a/dataikuapi/dss/recipe.py +++ b/dataikuapi/dss/recipe.py @@ -658,7 +658,7 @@ def __init__(self, type, name, project): self.create_output_folder = None self.output_folder_settings = None - def with_existing_output(self, dataset_name, append=False): + def with_existing_output(self, dataset_name, append=False, role="main"): """ Add an existing object as output to the recipe-to-be-created @@ -669,7 +669,7 @@ def with_existing_output(self, dataset_name, append=False): """ assert self.create_output_dataset is None self.create_output_dataset = False - self._with_output(dataset_name, append) + self._with_output(dataset_name, append, role=role) return self def with_new_output(self, name, connection_id, typeOptionId=None, format_option_id=None, override_sql_schema=None, partitioning_option_id=None, append=False, object_type='DATASET', overwrite=False): @@ -709,9 +709,9 @@ def with_new_output(self, name, connection_id, typeOptionId=None, format_option_ self._with_output(name, append) return self - def with_output(self, dataset_name, append=False): + def with_output(self, dataset_name, append=False, role="main"): """Alias of with_existing_output""" - return self.with_existing_output(dataset_name, append) + return self.with_existing_output(dataset_name, append, role=role) def _finish_creation_settings(self): self.creation_settings['createOutputDataset'] = self.create_output_dataset