def visitFugueProcessTask( self, ctx: fp.FugueProcessTaskContext) -> WorkflowDataFrame: data = self.get_dict(ctx, "partition", "dfs", "params") if "dfs" not in data: data["dfs"] = WorkflowDataFrames(self.last) p = data["params"] using = _to_processor( p["using"], schema=p.get("schema"), global_vars=self.global_vars, local_vars=self.local_vars, ) return self.workflow.process( data["dfs"], using=using, params=p.get("params"), pre_partition=data.get("partition"), )
def __init__( self, input_n: int, processor: Any, schema: Any, params: Any, pre_partition: Any = None, deterministic: bool = True, lazy: bool = False, input_names: Optional[List[str]] = None, ): self._processor = _to_processor(processor, schema) self._processor._params = ParamDict(params) self._processor._partition_spec = PartitionSpec(pre_partition) super().__init__( params=params, input_n=input_n, output_n=1, deterministic=deterministic, lazy=lazy, input_names=input_names, )