Querying the Result of a Data Source Task
Function
This API is used to query the result of an offline task in a specified data source, including data format, data detection, data exploration, and effect evaluation.
URI
GET /v2.0/{project_id}/workspaces/{workspace_id}/data-sources/{resource_id}/detail
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details on how to obtain the project ID, see Obtaining a Project ID. |
| resource_id | Yes | String | Resource ID |
| workspace_id | Yes | String | Workspace ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication. |
| type | Yes | String | Task type. The options are:
|
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Content type. The value is application/json. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| error_count | error_count object | Number of errors |
| data_struct | data_struct object | Data format (returned when the request type is DATA_STRUCT) |
| error_samples | Array of error_sample objects | Error example (returned when the request type is DATA_INSPECTION) |
| inspect_result | Array of inspect_result objects | Data detection result (returned when the request type is DATA_INSPECTION) |
| is_success | Boolean | Whether the request is successful |
| message | String | Response message |
| legal_rate | Double | Validity rate (returned when the request type is DATA_INSPECTION) |
| inspect_rst_generated_time | String | The generation time of detection result (returned when the request type is DATA_INSPECTION) |
| final_report | FinalReport object | Data exploration report (returned when the request type is DATA_EXPLORATION) |
| Parameter | Type | Description |
|---|---|---|
| behaviors | BehaviorsConfig object | Behavior |
| item_attrs | Array of item_attrs objects | Item parameter |
| user_attrs | Array of user_attrs objects | User parameter |
| user_dynamic_attr | UserDynamicAttr object | Dynamic user parameter |
| Parameter | Type | Description |
|---|---|---|
| positive_behaviors | Array of behaviorWeights objects | Positive behavior |
| negative_behaviors | Array of behaviorWeights objects | Negative behavior |
| Parameter | Type | Description |
|---|---|---|
| behavior_type | String | Behavior type |
| weight | Integer | Behavior weight |
| other_uses | Array of strings | Other usage |
| Parameter | Type | Description |
|---|---|---|
| data_type | String | Data type |
| name | String | Item |
| other_uses | Array of strings | Other usage |
| Parameter | Type | Description |
|---|---|---|
| user_interested_attrs | Attribute object | User interest feature |
| user_interested_action_type | Attribute object | User-concerned behavior type |
| Parameter | Type | Description |
|---|---|---|
| name | String | Name |
| data_type | String | Data type |
| other_uses | Array of strings | Other usage |
| Parameter | Type | Description |
|---|---|---|
| source | String | Detection source description |
| count | Integer | Total number of errors |
| msg | String | Error data and error message |
| Parameter | Type | Description |
|---|---|---|
| type | String | Data type |
| count_num | Integer | Total number of records |
| multiplicity | Double | Repetition |
| legal_rate | Double | Validity |
| Parameter | Type | Description |
|---|---|---|
| generated_time | String | Report generation time |
| wide_table_num | Long | Number of entries in a wide table, which is the number of deduplicated behavior data records. |
| user_complete_degree | Double | Completeness of user information. Whether a user has a profile when a behavior record is generated. |
| item_complete_degree | Double | Completeness of item information. Whether an item has a profile when a behavior record is generated. |
| bhv_count | Map<String,Integer> | Number of behaviors |
| user_long_feature_report | Array of NumFeatureReport objects | Long user feature |
| user_float_feature_report | Array of NumFeatureReport objects | Float user feature |
| user_str_feature_report | Array of StrFeatureReport objects | String user feature |
| user_strArray_feature_report | Array of StrFeatureReport objects | StrArray user feature |
| item_long_feature_report | Array of NumFeatureReport objects | Long item feature |
| item_float_feature_report | Array of NumFeatureReport objects | Float item feature |
| item_str_feature_report | Array of StrFeatureReport objects | String item feature |
| item_strArray_feature_report | Array of StrFeatureReport objects | StrArray item feature |
Example Requests
This API is used to query the result of a specified type of task.
/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/data-source/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/detail?type=DATA_STRUCT -
Example Responses
Status code: 200
OK
{
"is_success" : true,
"data_sturct" : {
"user_attrs" : [ {
"name" : "age",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "extend_float",
"data_type" : "float",
"modify_able" : false
}, {
"name" : "extend_long",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "extend_strArray",
"data_type" : "strArray",
"modify_able" : false
}, {
"name" : "extend_string",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "gender",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "location",
"data_type" : "location",
"modify_able" : false
}, {
"name" : "tags",
"data_type" : "strArray",
"modify_able" : false
}, {
"name" : "userId",
"data_type" : "string",
"modify_able" : false
} ],
"item_attrs" : [ {
"name" : "author",
"data_type" : "strArray",
"modify_able" : false
}, {
"name" : "category",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "expireTime",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "extend_float",
"data_type" : "float",
"modify_able" : false
}, {
"name" : "extend_long",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "extend_strArray",
"data_type" : "strArray",
"modify_able" : false
}, {
"name" : "extend_string",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "itemId",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "itemType",
"data_type" : "string",
"modify_able" : false
}, {
"name" : "location",
"data_type" : "location",
"modify_able" : false
}, {
"name" : "publishTime",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "score",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "status",
"data_type" : "long",
"modify_able" : false
}, {
"name" : "tags",
"data_type" : "strArray",
"modify_able" : false
} ],
"behaviors" : {
"positive_behaviors" : [ {
"behavior_type" : "click",
"weight" : 0.3
}, {
"behavior_type" : "like",
"weight" : 0.8
} ],
"negative_behaviors" : [ {
"behavior_type" : "view",
"weight" : 0.1
}, {
"behavior_type" : "dislike",
"weight" : 0.8
} ]
}
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Deleting a Data Source
Next Article: Scheduling
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.