-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae72a15
commit 9891bbf
Showing
3 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...low_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<DataflowPlan> | ||
<WriteToResultDataTableNode> | ||
<!-- description = 'Write to DataTable' --> | ||
<!-- node_id = NodeId(id_str='wrd_0') --> | ||
<WindowReaggregationNode> | ||
<!-- description = 'Re-aggregate Metrics via Window Functions' --> | ||
<!-- node_id = NodeId(id_str='wr_0') --> | ||
<!-- metric_spec = MetricSpec(element_name='trailing_2_months_revenue') --> | ||
<!-- order_by_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) --> | ||
<!-- partition_by_specs = (TimeDimensionSpec(element_name='metric_time', time_granularity=YEAR),) --> | ||
<ComputeMetricsNode> | ||
<!-- description = 'Compute Metrics via Expressions' --> | ||
<!-- node_id = NodeId(id_str='cm_0') --> | ||
<!-- metric_spec = MetricSpec(element_name='trailing_2_months_revenue') --> | ||
<AggregateMeasuresNode> | ||
<!-- description = 'Aggregate Measures' --> | ||
<!-- node_id = NodeId(id_str='am_0') --> | ||
<FilterElementsNode> | ||
<!-- description = --> | ||
<!-- "Pass Only Elements: ['txn_revenue', 'metric_time__year', 'metric_time__day']" --> | ||
<!-- node_id = NodeId(id_str='pfe_0') --> | ||
<!-- include_spec = MeasureSpec(element_name='txn_revenue') --> | ||
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=YEAR) --> | ||
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) --> | ||
<!-- distinct = False --> | ||
<JoinOverTimeRangeNode> | ||
<!-- description = 'Join Self Over Time Range' --> | ||
<!-- node_id = NodeId(id_str='jotr_0') --> | ||
<!-- queried_agg_time_dimension_specs = --> | ||
<!-- ( --> | ||
<!-- TimeDimensionSpec(element_name='metric_time', time_granularity=YEAR), --> | ||
<!-- TimeDimensionSpec(element_name='metric_time', time_granularity=DAY), --> | ||
<!-- ) --> | ||
<!-- window = PydanticMetricTimeWindow(count=2, granularity=MONTH) --> | ||
<MetricTimeDimensionTransformNode> | ||
<!-- description = "Metric Time Dimension 'ds'" --> | ||
<!-- node_id = NodeId(id_str='sma_28007') --> | ||
<!-- aggregation_time_dimension = 'ds' --> | ||
<ReadSqlSourceNode> | ||
<!-- description = "Read From SemanticModelDataSet('revenue')" --> | ||
<!-- node_id = NodeId(id_str='rss_28020') --> | ||
<!-- data_set = SemanticModelDataSet('revenue') --> | ||
</ReadSqlSourceNode> | ||
</MetricTimeDimensionTransformNode> | ||
</JoinOverTimeRangeNode> | ||
</FilterElementsNode> | ||
</AggregateMeasuresNode> | ||
</ComputeMetricsNode> | ||
</WindowReaggregationNode> | ||
</WriteToResultDataTableNode> | ||
</DataflowPlan> |
56 changes: 56 additions & 0 deletions
56
..._builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<DataflowPlan> | ||
<WriteToResultDataTableNode> | ||
<!-- description = 'Write to DataTable' --> | ||
<!-- node_id = NodeId(id_str='wrd_0') --> | ||
<ComputeMetricsNode> | ||
<!-- description = 'Compute Metrics via Expressions' --> | ||
<!-- node_id = NodeId(id_str='cm_1') --> | ||
<!-- metric_spec = MetricSpec(element_name='trailing_2_months_revenue_sub_10') --> | ||
<WindowReaggregationNode> | ||
<!-- description = 'Re-aggregate Metrics via Window Functions' --> | ||
<!-- node_id = NodeId(id_str='wr_0') --> | ||
<!-- metric_spec = MetricSpec(element_name='trailing_2_months_revenue', alias='t2mr') --> | ||
<!-- order_by_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) --> | ||
<!-- partition_by_specs = (TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH),) --> | ||
<ComputeMetricsNode> | ||
<!-- description = 'Compute Metrics via Expressions' --> | ||
<!-- node_id = NodeId(id_str='cm_0') --> | ||
<!-- metric_spec = MetricSpec(element_name='trailing_2_months_revenue', alias='t2mr') --> | ||
<AggregateMeasuresNode> | ||
<!-- description = 'Aggregate Measures' --> | ||
<!-- node_id = NodeId(id_str='am_0') --> | ||
<FilterElementsNode> | ||
<!-- description = --> | ||
<!-- "Pass Only Elements: ['txn_revenue', 'metric_time__month', 'metric_time__day']" --> | ||
<!-- node_id = NodeId(id_str='pfe_0') --> | ||
<!-- include_spec = MeasureSpec(element_name='txn_revenue') --> | ||
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH) --> | ||
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) --> | ||
<!-- distinct = False --> | ||
<JoinOverTimeRangeNode> | ||
<!-- description = 'Join Self Over Time Range' --> | ||
<!-- node_id = NodeId(id_str='jotr_0') --> | ||
<!-- queried_agg_time_dimension_specs = --> | ||
<!-- ( --> | ||
<!-- TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), --> | ||
<!-- TimeDimensionSpec(element_name='metric_time', time_granularity=DAY), --> | ||
<!-- ) --> | ||
<!-- window = PydanticMetricTimeWindow(count=2, granularity=MONTH) --> | ||
<MetricTimeDimensionTransformNode> | ||
<!-- description = "Metric Time Dimension 'ds'" --> | ||
<!-- node_id = NodeId(id_str='sma_28007') --> | ||
<!-- aggregation_time_dimension = 'ds' --> | ||
<ReadSqlSourceNode> | ||
<!-- description = "Read From SemanticModelDataSet('revenue')" --> | ||
<!-- node_id = NodeId(id_str='rss_28020') --> | ||
<!-- data_set = SemanticModelDataSet('revenue') --> | ||
</ReadSqlSourceNode> | ||
</MetricTimeDimensionTransformNode> | ||
</JoinOverTimeRangeNode> | ||
</FilterElementsNode> | ||
</AggregateMeasuresNode> | ||
</ComputeMetricsNode> | ||
</WindowReaggregationNode> | ||
</ComputeMetricsNode> | ||
</WriteToResultDataTableNode> | ||
</DataflowPlan> |