ProcessOps Repository

orion_notebook.graph.repositories.process_ops_repository.build_children_count_query(data: orion_notebook.graph.nodes.node_data.NodeData, operation_id: int)str

Retrieves the count of the children events given a node_id

Parameters
  • data (NodeData) – The node that we are going to ask for

  • operation_id (int) – The operation id of the node

Returns

A dictionary with the details of the edge

Return type

dict

orion_notebook.graph.repositories.process_ops_repository.get_generic_process_info(data: orion_notebook.graph.nodes.node_data.ProcessNodeData, operation_id: int)dict

Retrieves the details info of a GenericProcessNode by the its main values

Parameters
  • data (ProcessNodeData) – Data specific to the target event

  • operation_id (int) – Operation id of the process

Returns

A dataframe with the details of the GenericProcessNode

Return type

dict

orion_notebook.graph.repositories.process_ops_repository.get_process_edge_info_with_md5(data: orion_notebook.graph.edges.edge_data.ProcessEdgeData)dict

Retrieves the details info for a ProcessEdgeWithMd5 type Edge by its main values

Parameters

data (ProcessEdgeData) – Data related to target Edge

Returns

A dictionary with the details of the edge

Return type

dict

orion_notebook.graph.repositories.process_ops_repository.get_process_edge_info_without_md5(data: orion_notebook.graph.edges.edge_data.ProcessEdgeData)dict

Retrieves the details info for a ProcessEdgeWithoutMd5 type Edge by its main values

Parameters

data (ProcessEdgeData) – Data related to target Edge

Returns

A dictionary with the details of the edge

Return type

dict

orion_notebook.graph.repositories.process_ops_repository.get_process_execution_children(pid: int, muid: str, md5: str, date_from: orion_notebook.date.OrionDate, date_to: orion_notebook.date.OrionDate, parent_id: str, operations: List[int])Tuple[List[orion_notebook.graph.nodes.process_node.ProcessNode], List[orion_notebook.graph.edges.process_edge.ProcessEdge], int]

Retrieves and returns a set of nodes, edges and total number of results that represents children of the target node whose main values are the passed parameters

Parameters
  • pid (int) – Pid of the target process

  • muid (str) – MUID of the target process

  • md5 (str) – Md5 hash of the target process

  • date_from (OrionDate) – Lower bound date to search for data

  • date_to (OrionDate) – Upper bound date to search for data

  • parent_id (str) – Id of the node to search the children from

  • operations (List[int]) – List of operations ids to consider as children nodes

Returns

A tuple with a list of ProcessNodes, its edges and the total number of results

Return type

Tuple[List[ProcessNode], List[ProcessEdge], int]

orion_notebook.graph.repositories.process_ops_repository.get_process_execution_parent(pid: int, muid: str, md5: str, date_from: orion_notebook.date.OrionDate, date_to: orion_notebook.date.OrionDate, child_id: str)Tuple[Optional[orion_notebook.graph.nodes.process_node.ProcessNode], Optional[orion_notebook.graph.edges.process_edge.ProcessEdge], Optional[str], Optional[str]]

Retrieves and returns the parent node with its edge and datetime of the node represented by the values provided

Parameters
  • pid (int) – Pid of the target process

  • muid (str) – MUID of the target process

  • md5 (str) – Md5 hash of the target process

  • date_from (OrionDate) – Lower bound date to search for data

  • date_to (OrionDate) – Upper bound date to search for data

  • child_id (str) – Id of the node to search the parent from

Returns

A tuple with the parent ProcessNode, its edge, its datetime and its timestamp

Return type

Tuple[Optional[ProcessNode], Optional[ProcessEdgeWithMd5], Optional[str], Optional[str]

orion_notebook.graph.repositories.process_ops_repository.get_process_graph(pid: int, muid: str, md5: str, date_from: orion_notebook.date.OrionDate, date_to: orion_notebook.date.OrionDate)Tuple[List[orion_notebook.graph.nodes.process_node.ProcessNode], List[orion_notebook.graph.edges.edge.Edge], int]

Retrieves and returns a set of nodes, edges and total number of results that represents a process graph. This process graph is obtained based on the values of a target node

Parameters
  • pid (int) – Pid of the target process

  • muid (str) – MUID of the target process

  • md5 (str) – Md5 hash of the target process

  • date_from (OrionDate) – Lower bound date to search for data

  • date_to (OrionDate) – Upper bound date to search for data

Returns

A tuple with a list of ProcessNodes, its edges and the total number of results (representing a graph)

Return type

Tuple[List[ProcessNode], List[Edge], int]

orion_notebook.graph.repositories.process_ops_repository.initialize_children_count(nodes: List[orion_notebook.graph.nodes.node.Node])

Sets the children count for a Generic Process Node

Parameters

nodes (List) – List of nodes for which to get the children count