class TTaskMultipleOutputs(TTask): t_types = parameter(default=[1, 2])[List] t_output = output.folder(output_factory=_partitions) def run(self): for t_name, t_target in six.iteritems(self.t_output): t_target.write("%s" % t_name)
class TTaskMultipleOutputs(TTask): t_types = parameter.value([1, 2]) t_output = output.folder() def band(self): root = self.__class__.t_output.build_output(self) self.t_output = { t: root.partition(name="t_output/%s" % t) for t in self.t_types } def run(self): for t_name, t_target in six.iteritems(self.t_output): t_target.write("%s" % t_name)
class TProdImmutbaleOutputs(PythonTask): splits = output.folder(output_mode=OutputMode.prod_immutable).target def run(self): self.splits.write("a")