client.node =========== .. py:module:: client.node .. autoapi-nested-parse:: A node represents an individual task within a DAG. Attributes ---------- .. autoapisummary:: client.node.logger Classes ------- .. autoapisummary:: client.node.Node Module Contents --------------- .. py:data:: logger .. py:class:: Node(task_template_version: jobmon.client.task_template_version.TaskTemplateVersion, node_args: Dict[str, Any], requester: Optional[jobmon.core.requester.Requester] = None) A node represents an individual task within a Dag. A node represents an individual task within a Dag. This includes its relationship to other nodes that it is dependent upon or nodes that depend upon it. A node stores node arguments (arguments relating to the actual shape of the dag and number of tasks created for a given stage/task template) and can register itself with the database via the Jobmon Query Service and the Jobmon State Manager. :param task_template_version: The associated TaskTemplateVersion. :param node_args: key-value pairs of arg_name and a value. :param requester: Requester object to communicate with the FastApi services. .. py:attribute:: task_template_version .. py:attribute:: node_args .. py:attribute:: mapped_node_args .. py:attribute:: node_args_hash :value: 0 .. py:attribute:: upstream_nodes :type: Set[Node] .. py:attribute:: downstream_nodes :type: Set[Node] .. py:attribute:: requester :value: None .. py:property:: node_id :type: int Unique id for each node. .. py:property:: task_template_version_id :type: int .. py:property:: default_name :type: str The default name of this node in the array. .. py:method:: add_upstream_node(upstream_node: Node) -> None Add a single node to this one's upstream Nodes. :param upstream_node: node to add a dependency on .. py:method:: add_upstream_nodes(upstream_nodes: List[Node]) -> None Add many nodes to this one's upstream Nodes. :param upstream_nodes: list of nodes to add dependencies on .. py:method:: add_downstream_node(downstream_node: Node) -> None Add a node to this one's downstream Nodes. :param downstream_node: Node that will be dependent on this node .. py:method:: add_downstream_nodes(downstream_nodes: List[Node]) -> None Add a list of nodes as this node's downstream nodes. :param downstream_nodes: Nodes that will be dependent on this node.