Renamed aggregation to scripted_metric