Domain name for API request: wedata.tencentcloudapi.com.
Update Quality Rule Interface
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: ModifyRule. |
Version | Yes | String | Common Params. The value used for this API: 2021-08-20. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
ProjectId | No | String | Project ID |
RuleId | No | Integer | Rule ID |
RuleGroupId | No | Integer | Rule Group ID |
Name | No | String | Rule name |
TableId | No | String | Data Table ID |
RuleTemplateId | No | Integer | Rule Template ID |
Type | No | Integer | Rule type 1.System Template, 2.Custom Definition Template, 3.Custom Definition SQL |
QualityDim | No | Integer | Quality Dimension of Rule (1: Accuracy, 2: Uniqueness, 3: Integrity, 4: Consistency, 5: Timeliness, 6: Validity) |
SourceObjectDataTypeName | No | String | Source Field Detailed Type, int, string |
SourceObjectValue | No | String | Source Field Name |
ConditionType | No | Integer | Detection Range 1.Whole Table 2.Conditional Scan |
ConditionExpression | No | String | Conditional Scan WHERE Condition Expression |
CustomSql | No | String | Custom Definition SQL |
CompareRule | No | CompareRule | Alert Trigger Condition |
AlarmLevel | No | Integer | Alert Trigger Level 1.Low, 2.Medium, 3.High |
Description | No | String | Rule Description |
TargetDatabaseId | No | String | Target Database Id |
TargetTableId | No | String | Target Table Id |
TargetConditionExpr | No | String | Target Filter Condition Expression |
RelConditionExpr | No | String | Source Field and Target Field Association Condition ON Expression |
FieldConfig | No | RuleFieldConfig | Custom Definition Template SQL Expression Field Replacement Parameter |
TargetObjectValue | No | String | Target Field Name CITY |
SourceEngineTypes.N | No | Array of Integer | Execution engine adapted to the rule |
Parameter Name | Type | Description |
---|---|---|
Data | Boolean | Whether Update Successful Note: This field may return null, indicating that no valid value can be obtained. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Update Quality Rule Interface
POST / HTTP/1.1
Host: wedata.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyRule
<Common request parameters>
{
"ProjectId": "1234",
"RuleId": 1,
"RuleGroupId": 1,
"Name": "Rule 1",
"TableId": "867ujhn8i3240eif",
"RuleTemplateId": 1,
"Type": 1,
"QualityDim": 1,
"SourceObjectDataTypeName": "int",
"SourceObjectValue": "name",
"ConditionType": 1,
"ConditionExpression": ">0",
"CustomSql": "abc",
"CompareRule": {
"Items": [
{
"CompareType": 1,
"Operator": "<",
"ValueComputeType": 1,
"ValueList": [
{
"ValueType": 1,
"Value": "10"
}
]
}
],
"CycleStep": 1
},
"AlarmLevel": 1,
"Description": "Rule 1",
"TargetDatabaseId": "97yghbj9ik",
"TargetTableId": "56yujhr57ftuvgjb 78u",
"TargetConditionExpr": "ct='${yyyy-mm-dd-1}'",
"RelConditionExpr": "sourceTable.id=targetTable.id",
"FieldConfig": {
"WhereConfig": [
{
"FieldKey": "param_1",
"FieldValue": "10",
"FieldDataType": "id"
}
],
"TableConfig": [
{
"DatabaseId": "78ughibj8t6ygihb",
"DatabaseName": "dbName",
"TableId": "8iuyhbf2we9fu",
"TableName": "test",
"TableKey": "table_1",
"FieldConfig": [
{
"FieldKey": "table_1.column_1",
"FieldValue": "id",
"FieldDataType": "int"
}
]
}
]
},
"TargetObjectValue": "Table",
"SourceEngineTypes": [
1
]
}
{
"Response": {
"Data": true,
"RequestId": "0ff4e8ae-ebea-4a41-8aa2-1f6bc4b68e69"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation Failure. |
InvalidParameter.RuleNotExist | Rule does not exist. |
Was this page helpful?