Skip to content

Commit

Permalink
Namespace dataflow plan subgraphs by prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
tlento committed May 23, 2024
1 parent 7de9254 commit 45cf01f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions metricflow-semantics/metricflow_semantics/dag/id_prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class StaticIdPrefix(IdPrefix, Enum, metaclass=EnumMetaClassHelper):
VALUES_GROUP_BY_ITEM_RESOLUTION_NODE = "vr"

DATAFLOW_PLAN_PREFIX = "dfp"
DATAFLOW_PLAN_SUBGRAPH_PREFIX = "dfpsub"
OPTIMIZED_DATAFLOW_PLAN_PREFIX = "dfpo"
SQL_QUERY_PLAN_PREFIX = "sqp"
EXEC_PLAN_PREFIX = "ep"
Expand Down
4 changes: 3 additions & 1 deletion metricflow/dataflow/dataflow_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def as_plan(self) -> DataflowPlan:
inside of each node, we make those properties of the DataflowPlan, and this node-level converter makes
such properties easily accessible.
"""
return DataflowPlan(sink_nodes=(self,))
return DataflowPlan(
sink_nodes=(self,), plan_id=DagId.from_id_prefix(id_prefix=StaticIdPrefix.DATAFLOW_PLAN_SUBGRAPH_PREFIX)
)

@abstractmethod
def accept(self, visitor: DataflowPlanNodeVisitor[VisitorOutputT]) -> VisitorOutputT:
Expand Down

0 comments on commit 45cf01f

Please sign in to comment.