調用ListQualityResultsByEntity,根據分區運算式查詢歷史校正結果。
目前該API介面已標記為棄用,推薦使用替代API:dataworks-public(2024-05-18) - ListDataQualityScanRuns。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| EntityId |
integer |
是 |
分區運算式 ID。您可以調用 GetQualityEntity 擷取分區運算式 ID。 |
15232 |
| StartDate |
string |
是 |
業務日期起始時間,格式為 yyyy-MM-dd HH:mm:ss。 |
2020-09-20 00:00:00 |
| EndDate |
string |
是 |
業務日期截止時間,格式為 yyyy-MM-dd HH:mm:ss。 |
2020-09-21 00:00:00 |
| PageSize |
integer |
是 |
每頁顯示的條數,預設為 10 條,最大 20 條。 |
10 |
| PageNumber |
integer |
是 |
頁碼數。 |
1 |
| ProjectName |
string |
是 |
引擎或者資料來源的名稱。您可以從資料來源配置中擷取名稱。 |
autotest |
| ProjectId |
integer |
是 |
DataWorks 專案空間 ID。 |
12345 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
校正結果 |
||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| ErrorMessage |
string |
錯誤資訊。 |
You have no permission. |
| RequestId |
string |
請求 ID。 |
CBA58543-00D4-41**** |
| Success |
boolean |
請求是否成功。 |
true |
| ErrorCode |
string |
錯誤碼。 |
401 |
| Data |
object |
校正結果的頂層結構體。 |
|
| PageNumber |
integer |
頁碼數。 |
1 |
| PageSize |
integer |
每頁顯示的條數,預設為 10 條,最大 100 條。 |
10 |
| TotalCount |
integer |
資料的總記錄數。 |
50 |
| RuleChecks |
array<object> |
校正結果的列表。 |
|
|
array<object> |
校正結果 |
||
| BlockType |
integer |
校正規則的強弱。強弱表示規則的重要程度。取值如下:
|
0 |
| WarningThreshold |
number |
橙色閾值。表示與樣本預期的偏離程度,您可以根據業務需求自訂該閾值。 |
0.1 |
| Property |
string |
規則屬性的欄位,即被校正資料來源表的 column 名稱。 |
type |
| TableName |
string |
進行校正的表名稱。 |
dual |
| Comment |
string |
校正規則的描述。 |
The description of the rule. |
| CheckResultStatus |
integer |
校正結果狀態參數與產品介面中的狀態資訊一致,取值有以下幾種:
|
0 |
| TemplateName |
string |
使用的校正模板的名稱。 |
Expected value verification |
| CheckerName |
string |
校正器的名稱。 |
fulx |
| RuleId |
integer |
規則 ID。 |
123123232 |
| FixedCheck |
boolean |
是否為固定值校正。取值如下:
|
false |
| Op |
string |
比較符。 |
> |
| UpperValue |
number |
預測上限。設定閾值後自動產生。 |
25555 |
| ActualExpression |
string |
被校正的資料來源表的實際分區。 |
ds=20200912 |
| ExternalId |
string |
調度任務的節點 ID。 |
1112323123 |
| TimeCost |
string |
執行校正任務花費的時間,單位為秒。 |
202 |
| Trend |
string |
校正結果的趨勢。 |
abs |
| ExternalType |
string |
調度系統的類型。目前僅支援 CWF。 |
CWF2 |
| BizDate |
integer |
業務日期。如果被校正的業務主體為離線資料,則業務日期通常為執行校正操作的前一天。 |
1600704000000 |
| CheckResult |
integer |
校正結果參數的結果通常與 CheckResultStatus 一致,取值有以下幾種:
|
0 |
| ResultString |
string |
校正結果的字串形式。 |
test |
| MatchExpression |
string |
分區運算式。 |
ds=$[yyyymmdd] |
| CheckerType |
integer |
校正類型。取值如下:
|
1 |
| ProjectName |
string |
需要進行資料品質校正的引擎或者資料來源名稱。 |
autotest |
| BeginTime |
integer |
執行校正操作的開始時間。 |
1600704000000 |
| DateType |
string |
調度周期的類型。通常為 YMD,即年任務、月任務、天任務。 |
YMD |
| CriticalThreshold |
number |
紅色閾值。表示與樣本預期的偏離程度。您可以根據業務需求自訂該閾值。使用強規則並觸發紅色閾值,會阻塞調度任務。 |
0.5 |
| IsPrediction |
boolean |
是否為預測的結果。取值如下:
|
true |
| RuleName |
string |
規則的名稱。 |
The name of the rule. |
| CheckerId |
integer |
校正器的 ID。 |
7 |
| DiscreteCheck |
boolean |
是否為離散校正。取值如下:
|
true |
| EndTime |
integer |
查詢校正結果的截止時間。 |
1600704000000 |
| MethodName |
string |
採集樣本資料的方法。包括 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 等。 |
count_distinct |
| LowerValue |
number |
預測結果的下限。根據您設定的閾值自動產生。 |
2344 |
| EntityId |
integer |
分區運算式 ID。 |
15432322 |
| WhereCondition |
string |
校正任務使用的規則過濾條件。 |
id>0 |
| ExpectValue |
number |
期望值。 |
200 |
| TemplateId |
integer |
使用的校正模板的 ID。 |
5 |
| TaskId |
string |
校正任務的 ID。 |
16008552981681a0d6**** |
| Id |
integer |
主鍵 ID。 |
121212121 |
| ReferenceValue |
array<object> |
歷史樣本值。 |
|
|
object |
校正結果 |
||
| DiscreteProperty |
string |
通過 group by 分組後的樣本欄位取值。例如 group by 性別欄位,則 DiscreteProperty 為男生、女生和 null。 |
0 |
| Value |
number |
校正值。 |
19 |
| BizDate |
string |
業務日期。如果被校正的業務主體為離線資料,則業務日期通常為執行校正操作的前一天。 |
2020-12-03 |
| SingleCheckResult |
integer |
校正結果。 |
0 |
| Threshold |
number |
閾值。 |
0.5 |
| SampleValue |
array<object> |
當前使用的樣本。 |
|
|
object |
校正結果 |
||
| DiscreteProperty |
string |
通過 group by 分組後的樣本欄位取值。例如 group by 性別欄位,則 DiscreteProperty 為男生、女生和 null。 |
0 |
| BizDate |
string |
業務日期。如果被校正的業務主體為離線資料,則業務日期通常為執行校正操作的前一天。 |
2020-12-03 |
| Value |
number |
當前樣本值。 |
19 |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"ErrorMessage": "You have no permission.",
"RequestId": "CBA58543-00D4-41****",
"Success": true,
"ErrorCode": "401",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 50,
"RuleChecks": [
{
"BlockType": 0,
"WarningThreshold": 0.1,
"Property": "type",
"TableName": "dual",
"Comment": "The description of the rule.",
"CheckResultStatus": 0,
"TemplateName": "Expected value verification",
"CheckerName": "fulx",
"RuleId": 123123232,
"FixedCheck": false,
"Op": ">",
"UpperValue": 25555,
"ActualExpression": "ds=20200912",
"ExternalId": "1112323123",
"TimeCost": "202",
"Trend": "abs",
"ExternalType": "CWF2",
"BizDate": 1600704000000,
"CheckResult": 0,
"ResultString": "test",
"MatchExpression": "ds=$[yyyymmdd]",
"CheckerType": 1,
"ProjectName": "autotest",
"BeginTime": 1600704000000,
"DateType": "YMD",
"CriticalThreshold": 0.5,
"IsPrediction": true,
"RuleName": "The name of the rule.",
"CheckerId": 7,
"DiscreteCheck": true,
"EndTime": 1600704000000,
"MethodName": "count_distinct",
"LowerValue": 2344,
"EntityId": 15432322,
"WhereCondition": "id>0",
"ExpectValue": 200,
"TemplateId": 5,
"TaskId": "16008552981681a0d6****",
"Id": 121212121,
"ReferenceValue": [
{
"DiscreteProperty": "0",
"Value": 19,
"BizDate": "2020-12-03",
"SingleCheckResult": 0,
"Threshold": 0.5
}
],
"SampleValue": [
{
"DiscreteProperty": "0",
"BizDate": "2020-12-03",
"Value": 19
}
]
}
]
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。