def node( self, function: Union[DataFunctionLike, str], key: Optional[str] = None, params: Dict[str, Any] = None, inputs: Dict[str, StreamLike] = None, input: StreamLike = None, graph: Optional[DeclaredGraph] = None, output_alias: Optional[str] = None, schema_translation: Optional[Dict[str, Union[Dict[str, str], str]]] = None, upstream: Union[StreamLike, Dict[str, StreamLike]] = None, # TODO: DEPRECATED ) -> Node: dn = node( function=function, key=key, params=params, inputs=inputs, input=input, graph=graph, output_alias=output_alias, schema_translation=schema_translation, upstream=upstream, ) n = dn.instantiate(self.env, self) self.add_node(n) return n
def node( self, snap: Union[SnapLike, str], key: Optional[str] = None, params: Dict[str, Any] = None, inputs: Dict[str, StreamLike] = None, input: StreamLike = None, graph: Optional[DeclaredGraph] = None, output_alias: Optional[str] = None, schema_translation: Optional[Dict[str, Union[Dict[str, str], str]]] = None, upstream: Union[StreamLike, Dict[str, StreamLike]] = None, # TODO: DEPRECATED ) -> DeclaredNode: dn = node( snap=snap, key=key, params=params, inputs=inputs, input=input, graph=graph, output_alias=output_alias, schema_translation=schema_translation, upstream=upstream, ) self.add_node(dn) return dn
def node( self, pipe: Union[PipeLike, str], key: Optional[str] = None, config: Dict[str, Any] = None, upstream: Union[StreamLike, Dict[str, StreamLike]] = None, graph: Optional[DeclaredGraph] = None, output_alias: Optional[str] = None, schema_translation: Optional[Dict[str, Union[Dict[str, str], str]]] = None, ) -> DeclaredNode: dn = node( pipe=pipe, key=key, config=config, upstream=upstream, graph=graph, output_alias=output_alias, schema_translation=schema_translation, ) self.add_node(dn) return dn