{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yunqi/json-schema/yunqi-rule-query-request-schema.json",
  "title": "RuleQueryRequest",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yunqi-dqc-api-openapi.yml#/components/schemas/RuleQueryRequest",
  "type": "object",
  "properties": {
    "datasourceType": {
      "type": "string",
      "title": "DatasourceEnum",
      "description": "数据源类型\n\n枚举说明：\n- `LakeHouse`: Clickzetta Lakehouse\n- `Databricks`: Databricks",
      "enum": [
        "LakeHouse",
        "Databricks"
      ]
    },
    "datasourceId": {
      "type": "string"
    },
    "objectType": {
      "type": "string",
      "title": "ObjectTypeEnum",
      "description": "DQC 规则作用的对象类型\n\n枚举说明：\n- `TABLE`: 表\n- `PIPE`: pipe\n- `VIEW`: view\n- `VOLUME`: Volume\n- `DYNAMIC_TABLE`: Dynamic Table\n- `TABLE_STREAM`: Table Stream\n- `MATERIALIZED_VIEW`: materialized View",
      "enum": [
        "TABLE",
        "PIPE",
        "VIEW",
        "VOLUME",
        "DYNAMIC_TABLE",
        "TABLE_STREAM",
        "MATERIALIZED_VIEW"
      ]
    },
    "objectName": {
      "type": "string"
    },
    "fuzzyObjectName": {
      "type": "string"
    },
    "tagCode": {
      "type": "string",
      "title": "TagEnum",
      "description": "DQC 规则标签类型（type=0 表级，type=1 字段级）\n\n枚举说明：\n- `defined_sql`: 表级 (type=0)\n- `table_count`: 表级 (type=0)\n- `avg`: 字段级 (type=1)\n- `count`: 字段级 (type=1)\n- `null_count`: 字段级 (type=1)\n- `max`: 字段级 (type=1)\n- `min`: 字段级 (type=1)\n- `sum`: 字段级 (type=1)\n- `count_distinct`: 字段级 (type=1)\n- `count_repetition`: 字段级 (type=1)\n- `pipe_kafka_latency`: 表级 (type=0)\n- `table_stream_kafka_latency`: 表级 (type=0)\n- `volume_file_count`: 表级 (type=0)",
      "enum": [
        "defined_sql",
        "table_count",
        "avg",
        "count",
        "null_count",
        "max",
        "min",
        "sum",
        "count_distinct",
        "count_repetition",
        "pipe_kafka_latency",
        "table_stream_kafka_latency",
        "volume_file_count"
      ]
    },
    "triggerType": {
      "type": [
        "string",
        "null"
      ],
      "title": "TriggerEnum",
      "description": "规则触发方式\n\n枚举说明：\n- `TEST`: 手动触发，仅测试，不发送告警\n- `TEST_ALERT`: 手动触发，测试并发送告警\n- `REST`: 通过 REST 接口手动触发\n- `SCHEDULE_TASK`: 由调度器定时触发\n- `PLAN`: 由执行计划触发",
      "enum": [
        "TEST",
        "TEST_ALERT",
        "REST",
        "SCHEDULE_TASK",
        "PLAN",
        null
      ]
    },
    "level": {
      "type": "integer",
      "format": "int32",
      "description": "0=non-blocking, 1=blocking, 2=non-scheduled"
    },
    "owner": {
      "type": "integer",
      "format": "int64"
    },
    "status": {
      "type": "integer",
      "format": "int32",
      "description": "0=enabled, 1=disabled"
    },
    "env": {
      "type": "string"
    },
    "instanceName": {
      "type": "string"
    },
    "workspaceName": {
      "type": "string"
    },
    "pageSize": {
      "type": "integer"
    },
    "pageNum": {
      "type": "integer"
    }
  },
  "required": [
    "pageSize",
    "pageNum"
  ]
}