GetCrawler
Queries the configuration, status, and latest run information of a specified metadata crawler.
Operation description
Scenarios
Queries the configuration, availability status, and latest run information of a specified metadata crawler.
Recommended workflow
Call ListCrawlers to query the crawler ID.
Call this operation to obtain the crawler details.
To query the complete run history, call ListCrawlerRuns.
Edition requirements
You must purchase DataWorks Basic Edition or a more advanced edition to use this operation.
Precautions
If the crawler has not been run, the latest run status and task instance ID may be empty.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetCrawler |
get |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The ID of the metadata crawler. You can call ListCrawlers to query the ID. |
1234 |
You can call ListCrawlers to query the ID.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. You can use the ID to locate logs and troubleshoot issues. |
9252F32F-D855-549E-8898-61CF5A733050 |
| Success |
boolean |
Indicates whether the request is successful. |
|
| Crawler |
object |
The metadata crawler details. |
|
| Id |
integer |
The crawler ID. |
1234 |
| Name |
string |
The crawler name. |
example_crawler |
| DataSourceId |
integer |
The data source ID. |
12345 |
| Type |
string |
The crawler type. |
starrocks |
| Status |
string |
The crawler status. Valid values:
|
VALID |
| MetaEntityId |
string |
The ID of the meta-entity associated with the crawler. You can use this ID in metadata query APIs. |
starrocks:example-instance |
| ProjectId |
integer |
The DataWorks workspace ID. |
100 |
| EnvType |
string |
The DataWorks environment type. Valid values:
|
Prod |
| ResourceGroupId |
string |
The ID of the Serverless 2.0 resource group used to run the crawl task. |
Serverless_res_group_1234567890123456_1234567890 |
| ScheduleConfig |
object |
The schedule settings. |
|
| Type |
string |
The scheduling type. Valid values:
|
NORMAL |
| CronExpress |
string |
The cron expression. |
0 0 2 ? * * |
| LastRunStatus |
string |
The latest run status. Valid values:
|
SUCCESS |
| Owner |
string |
The DataWorks user ID of the crawler owner. |
1000 |
| CreateTime |
integer |
The creation time. The value is a UNIX timestamp in milliseconds. |
1710239005403 |
| ModifyTime |
integer |
The modification time. The value is a UNIX timestamp in milliseconds. |
1710239005403 |
| Scope |
object |
The crawl scope configuration. |
|
| Unit |
string |
The crawl scope granularity. Valid values:
|
DATABASE |
| Items |
array |
The crawl scope items. |
|
|
string |
A single crawl scope item. |
example_database |
|
| ExcludeRegex |
string |
The regular expression used to exclude items from the crawl scope. |
^tmp_.* |
| EnableAiComment |
boolean |
Indicates whether AI metadata descriptions are enabled. |
|
| Options |
object |
The extension configuration for the crawler type. |
{"CollectRecyclebin":"false"} |
|
string |
The value of a single extension configuration item for the crawler. |
true |
|
| LastRunTaskInstanceId |
integer |
The DataWorks task instance ID associated with the latest run. This parameter may be empty if the crawler has not been run. |
1234 |
| TaskId |
integer |
The DataWorks scheduled task ID associated with the crawler. You can call GetTask to query the task definition. |
1234 |
The Crawler response field contains the crawler configuration, availability status, and latest run information.
Examples
Success response
JSON format
{
"RequestId": "9252F32F-D855-549E-8898-61CF5A733050",
"Success": false,
"Crawler": {
"Id": 1234,
"Name": "example_crawler",
"DataSourceId": 12345,
"Type": "starrocks",
"Status": "VALID",
"MetaEntityId": "starrocks:example-instance",
"ProjectId": 100,
"EnvType": "Prod",
"ResourceGroupId": "Serverless_res_group_1234567890123456_1234567890",
"ScheduleConfig": {
"Type": "NORMAL",
"CronExpress": "0 0 2 ? * *"
},
"LastRunStatus": "SUCCESS",
"Owner": "1000",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"Scope": {
"Unit": "DATABASE",
"Items": [
"example_database"
],
"ExcludeRegex": "^tmp_.*"
},
"EnableAiComment": false,
"Options": {
"key": "true"
},
"LastRunTaskInstanceId": 1234,
"TaskId": 1234
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.