调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
类型 |
是否必选 |
示例值 |
描述 |
|
Action | String | 是 | GetQualityRule |
系统规定参数。取值:GetQualityRule。 |
RuleId | Long | 是 | 1234 |
校验规则的ID。您可以调用ListQualityRules接口查看RuleId的相关信息。 |
ProjectName | String | 是 | autotest |
引擎或者数据源的名称。 |
ProjectId | Long | 是 | 12345 |
DataWorks项目空间ID。 |
返回数据
名称 |
类型 |
示例值 |
描述 |
HttpStatusCode | Integer | 200 |
HTTP状态码。 |
RequestId | String | 576b9457-2cf5-4**** |
请求ID。 |
ErrorMessage | String | You have no permission. |
错误信息。 |
ErrorCode | String | 401 |
错误码。 |
Success | Boolean | true |
调用是否成功。 |
Data | Object |
获取的规则信息。 |
|
BlockType | Integer | 1 |
校验规则的强弱。强弱表示规则的重要程度。取值如下:
|
OnDutyAccountName | String | test |
配置校验规则的阿里云账号名称。 |
WarningThreshold | String | 10 |
橙色告警阈值。表示与样本预期的偏离程度,您可以根据业务需求自定义该阈值。 |
Property | String | id |
规则属性的字段,即被校验数据源表的column名称。 |
RuleType | Integer | 0 |
规则的类型。 |
Comment | String | 校验主键唯一 |
校验规则的描述信息。 |
OnDuty | String | 1822931**** |
配置校验规则的账号ID。 |
Checker | Integer | 9 |
校验器ID。该字段对应前端的ID标识,需要由pkId转换。 |
FixCheck | Boolean | true |
固定值校验。 |
MethodId | Integer | 8 |
采集样本数据方法的ID。 |
CriticalThreshold | String | 20 |
红色告警阈值。表示与样本预期的偏离程度。您可以根据业务需求自定义该阈值。使用强规则并触发红色阈值,会阻塞调度任务。 |
PredictType | Integer | 0 |
是否为动态阈值:
|
TemplateName | String | SQL task table rows, 1,7, 30 days fluctuation test |
使用的校验模板的名称。 |
CheckerName | String | compared with a fixed value |
校验器的名称。 |
RuleName | String | 查看表波动 |
规则的名称。 |
MethodName | String | table_count |
采集样本数据方法的名称。包括avg、count、sum、min、max、count_distinct、user_defined、table_count、table_size、table_dt_load_count、table_dt_refuseload_count、null_value、null_value/table_count、(table_count-count_distinct)/table_count、table_count-count_distinct等。 |
EntityId | Long | 165523 |
分区表达式的ID。 |
WhereCondition | String | id>10 |
校验任务使用的过滤条件或自定义SQL语句。 |
Operator | String | >= |
操作符。 |
ExpectValue | String | 30 |
期望值。 |
Trend | String | abs |
校验结果的趋势。 |
TemplateId | Integer | 7 |
使用的校验模板的ID。 |
Id | Long | 123232 |
规则的ID。 |
OpenSwitch | Boolean | true |
规则是否开启 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetQualityRule
&RuleId=1234
&ProjectName=autotest
&ProjectId=12345
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
200
576b9457-2cf5-4****
You have no permission.
401
true
1
test
10
id
0
校验主键唯一
1822931****
9
true
8
20
0
SQL task table rows, 1,7, 30 days fluctuation test
compared with a fixed value
查看表波动
table_count
165523
id>10
>=
30
abs
7
123232
true
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"RequestId" : "576b9457-2cf5-4****",
"ErrorMessage" : "You have no permission.",
"ErrorCode" : 401,
"Success" : true,
"Data" : {
"BlockType" : 1,
"OnDutyAccountName" : "test",
"WarningThreshold" : 10,
"Property" : "id",
"RuleType" : 0,
"Comment" : "校验主键唯一",
"OnDuty" : "1822931****",
"Checker" : 9,
"FixCheck" : true,
"MethodId" : 8,
"CriticalThreshold" : 20,
"PredictType" : 0,
"TemplateName" : "SQL task table rows, 1,7, 30 days fluctuation test",
"CheckerName" : "compared with a fixed value",
"RuleName" : "查看表波动",
"MethodName" : "table_count",
"EntityId" : 165523,
"WhereCondition" : "id>10",
"Operator" : ">=",
"ExpectValue" : 30,
"Trend" : "abs",
"TemplateId" : 7,
"Id" : 123232,
"OpenSwitch" : true
}
}
错误码
访问错误中心查看更多错误码。
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/171179.html