{
  "parameters": {
    "type": "object",
    "properties": {
      "groupBy": {
        "type": "array",
        "description": "Columns to group by.",
        "items": {
          "type": "string"
        }
      },
      "metrics": {
        "type": "array",
        "description": "Aggregate metrics to compute.",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Aggregate function.",
              "enum": [
                "count",
                "sum",
                "min",
                "max",
                "avg"
              ],
              "default": "count"
            },
            "field": {
              "type": "string",
              "description": "Source field for value-based aggregates. Leave blank for count."
            },
            "target": {
              "type": "string",
              "description": "Output field name for the computed metric."
            }
          }
        }
      }
    }
  },
  "inputs": [
    {
      "key": "in",
      "label": "Input",
      "required": true
    }
  ],
  "outputs": [
    {
      "key": "out",
      "label": "Output",
      "required": true
    }
  ],
  "lineage": {
    "mode": "explicit"
  },
  "deterministic": true,
  "runtimeSupported": true
}
