Esempio n. 1
0
 def visitFugueOutputTask(self, ctx: fp.FugueOutputTaskContext):
     data = self.get_dict(ctx, "dfs", "using", "params", "partition")
     if "dfs" not in data:
         data["dfs"] = WorkflowDataFrames(self.last)
     using = _to_outputter(
         data["using"],
         global_vars=self.global_vars,
         local_vars=self.local_vars,
     )
     self.workflow.output(
         data["dfs"],
         using=using,
         params=data.get("params"),
         pre_partition=data.get("partition"),
     )
Esempio n. 2
0
 def __init__(
     self,
     input_n: int,
     outputter: Any,
     params: Any,
     pre_partition: Any = None,
     deterministic: bool = True,
     lazy: bool = False,
     input_names: Optional[List[str]] = None,
 ):
     assert_or_throw(input_n > 0, FugueWorkflowError("must have at least one input"))
     self._outputter = _to_outputter(outputter)
     self._outputter._params = ParamDict(params)
     self._outputter._partition_spec = PartitionSpec(pre_partition)
     self._outputter.validate_on_compile()
     super().__init__(
         params=params,
         input_n=input_n,
         output_n=1,
         deterministic=deterministic,
         lazy=lazy,
         input_names=input_names,
     )