Skip to content

Commit bf07561

Browse files
committed
add option to pass recipe script in constructor
1 parent c2b42c7 commit bf07561

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dataikuapi/dss/recipe.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,17 @@ def __init__(self, name, project):
258258
class CodeRecipeCreator(DSSRecipeCreator):
259259
def __init__(self, name, type, project):
260260
DSSRecipeCreator.__init__(self, type, name, project)
261+
self.script = None
262+
263+
def with_script(self, script):
264+
self.script = script
265+
return self
261266

262267
def _finish_creation_settings(self):
263-
pass
268+
super(CodeRecipeCreator, self)._finish_creation_settings()
269+
# DSSRecipeCreator._finish_creation_settings(self)
270+
self.creation_settings['script'] = self.script
271+
264272

265273
class SQLQueryRecipeCreator(SingleOutputRecipeCreator):
266274
def __init__(self, name, project):

0 commit comments

Comments
 (0)