{
  "parameters": {
    "type": "object",
    "properties": {
      "partitionBy": {
        "type": "array",
        "description": "Fields that partition the input rows.",
        "items": {
          "type": "string"
        }
      },
      "orderBy": {
        "type": "array",
        "description": "Fields that define ordering within each partition.",
        "items": {
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "description": "Field to order by."
            },
            "direction": {
              "type": "string",
              "description": "Sort direction.",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          }
        }
      },
      "functions": {
        "type": "array",
        "description": "Window functions to compute.",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Window function kind.",
              "enum": [
                "row_number",
                "rank",
                "dense_rank",
                "running_sum",
                "running_count"
              ],
              "default": "row_number"
            },
            "target": {
              "type": "string",
              "description": "Output field name to write."
            },
            "field": {
              "type": "string",
              "description": "Source field for value-based running functions."
            }
          }
        }
      }
    }
  },
  "inputs": [
    {
      "key": "in",
      "label": "Input",
      "required": true
    }
  ],
  "outputs": [
    {
      "key": "out",
      "label": "Output",
      "required": true
    }
  ],
  "lineage": {
    "mode": "row_preserving"
  },
  "deterministic": true,
  "runtimeSupported": true
}
