{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yunqi/json-schema/yunqi-task-adhoc-execute-request-schema.json",
  "title": "TaskAdhocExecuteRequest",
  "description": "临时查询执行请求",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yunqi-scheduletask-api-openapi.yml#/components/schemas/TaskAdhocExecuteRequest",
  "type": "object",
  "properties": {
    "taskId": {
      "type": "integer",
      "description": "数据文件 ID",
      "format": "int64"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "VIRTUAL",
        "PROJECT_EMPTY_TASK",
        "DATA_INTEGRATION",
        "SPARK",
        "HIVE",
        "LAKE_HOUSE",
        "SHELL",
        "HTTP_CONTROLLER",
        "PYTHON3",
        "PYTHON2",
        "JDBC",
        "CDC",
        "CDC_REALTIME",
        "STREAMING_INTEGRATION",
        "DYNAMIC_TABLE",
        "CONTINUOUS_JOB",
        "FLOW"
      ],
      "description": "枚举说明：\n- `VIRTUAL`: 虚拟节点\n- `PROJECT_EMPTY_TASK`: 项目空间空跑任务\n- `DATA_INTEGRATION`: 数据集成\n- `SPARK`: SPARK SQL\n- `HIVE`: HIVE SQL\n- `LAKE_HOUSE`: LAKE_HOUSE SQL\n- `SHELL`: SHELL\n- `HTTP_CONTROLLER`: 外部事件控制点\n- `PYTHON3`: PYTHON3\n- `PYTHON2`: PYTHON2\n- `JDBC`: JDBC\n- `CDC`: CDC\n- `CDC_REALTIME`: CDC_REALTIME\n- `STREAMING_INTEGRATION`: 实时数据集成\n- `DYNAMIC_TABLE`: 动态表\n- `CONTINUOUS_JOB`: 流式SQL任务\n- `FLOW`: 组合任务"
    },
    "taskName": {
      "type": "string",
      "description": "数据文件名称"
    },
    "taskContent": {
      "type": "string",
      "description": "数据文件内容"
    },
    "params": {
      "type": "object",
      "description": "参数映射",
      "additionalProperties": true,
      "properties": {}
    },
    "executeInstanceId": {
      "type": "integer",
      "format": "int64",
      "description": "执行实例 ID"
    },
    "projectInstanceId": {
      "type": "integer",
      "format": "int64",
      "description": "项目实例 ID"
    },
    "executedSQLIndex": {
      "type": "integer",
      "description": "已执行的 SQL 索引"
    },
    "dataSequenceId": {
      "type": "integer",
      "description": "数据序列 ID"
    },
    "showAdHocResultType": {
      "type": "integer",
      "description": "即席查询结果展示类型"
    },
    "executeFinished": {
      "type": "boolean",
      "description": "执行是否完成"
    },
    "adhocSchemaName": {
      "type": "string",
      "description": "即席查询 schema 名称"
    },
    "sessionSchemaName": {
      "type": "string",
      "description": "会话 schema 名称"
    },
    "schemaName": {
      "type": "string",
      "description": "Schema 名称"
    },
    "adhocVcCode": {
      "type": "string",
      "description": "即席查询虚拟计算代码"
    },
    "adhocVcId": {
      "type": "string",
      "description": "即席查询虚拟计算 ID"
    },
    "updateBy": {
      "type": "string",
      "description": "更新人"
    },
    "maxRowSize": {
      "type": "integer",
      "format": "int64",
      "description": "最大行数限制"
    },
    "sessionId": {
      "type": "string",
      "description": "会话 ID"
    },
    "dsType": {
      "type": "integer",
      "description": "数据源类型"
    },
    "datasourceId": {
      "type": "integer",
      "format": "int64",
      "description": "数据源 ID"
    },
    "offsetLine": {
      "type": "integer",
      "description": "行偏移量"
    },
    "offsetCol": {
      "type": "integer",
      "description": "列偏移量"
    },
    "multiDataSource": {
      "type": "array",
      "description": "多数据源配置",
      "items": {
        "$ref": "#/$defs/CommonDs"
      }
    },
    "nodeId": {
      "type": "integer",
      "format": "int64",
      "description": "节点 ID"
    },
    "collectType": {
      "type": "integer",
      "description": "收集类型 (1: 普通作业 2: 复合任务子节点)",
      "enum": [
        1,
        2
      ]
    },
    "env": {
      "type": "string",
      "description": "环境"
    },
    "flowParamValuesDto": {
      "description": "流程参数值 DTO",
      "$ref": "#/$defs/FlowParamValues"
    },
    "sqlVcId": {
      "type": "string",
      "description": "SQL 虚拟计算 ID"
    },
    "sqlVcCode": {
      "type": "string",
      "description": "SQL 虚拟计算代码"
    },
    "diVcId": {
      "type": "string",
      "description": "DI 虚拟计算 ID"
    },
    "diVcCode": {
      "type": "string",
      "description": "DI 虚拟计算代码"
    },
    "workspace": {
      "type": [
        "string",
        "null"
      ],
      "title": "工作空间"
    },
    "tenantId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "title": "账号ID"
    },
    "userId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "title": "用户ID"
    },
    "instance": {
      "type": [
        "string",
        "null"
      ],
      "title": "实例名"
    }
  },
  "required": [
    "workspace",
    "instance"
  ],
  "$defs": {
    "CommonDs": {
      "type": "object",
      "title": "CommonDs",
      "description": "通用数据源 DTO",
      "properties": {
        "datasourceId": {
          "type": "integer",
          "format": "int64",
          "description": "数据源 ID"
        },
        "dsType": {
          "type": "integer",
          "description": "数据源类型"
        },
        "dsName": {
          "type": "string",
          "description": "数据源名称"
        },
        "schemaName": {
          "type": "string",
          "description": "Schema 名称"
        },
        "sessionSchemaName": {
          "type": "string",
          "description": "会话 Schema 名称"
        }
      }
    },
    "FlowParamValues": {
      "type": "object",
      "title": "FlowParamValues",
      "description": "流程参数值 DTO",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "ID"
        },
        "name": {
          "type": "string",
          "description": "名称"
        },
        "paramValueList": {
          "type": "array",
          "description": "参数值列表",
          "items": {
            "$ref": "#/$defs/ParamValue"
          }
        },
        "children": {
          "type": "array",
          "description": "子流程参数配置",
          "items": {
            "$ref": "#/$defs/FlowParamValues"
          }
        }
      }
    },
    "ParamValue": {
      "type": "object",
      "title": "ParamValue",
      "description": "参数值 DTO",
      "properties": {
        "paramKey": {
          "type": "string",
          "description": "参数键"
        },
        "paramValue": {
          "type": "string",
          "description": "参数值"
        },
        "dependencyId": {
          "type": "string",
          "description": "上下文传参依赖的关联上游任务 ID"
        },
        "showParamValue": {
          "type": "string",
          "description": "展示的参数值"
        },
        "ignore": {
          "type": "boolean",
          "description": "是否忽略"
        },
        "paramType": {
          "type": "string",
          "description": "参数类型 (manual: 手动识别，auto: 自动识别)",
          "enum": [
            "manual",
            "auto"
          ]
        },
        "encrypt": {
          "type": "boolean",
          "description": "是否加密"
        },
        "id": {
          "type": "string",
          "description": "ID"
        },
        "ref": {
          "type": "integer",
          "description": "引用计数"
        },
        "description": {
          "type": "string",
          "description": "描述说明"
        }
      }
    }
  }
}