UpdateCrawler
Updates the resource group, collection scope, scheduling, and extension configurations of a specified metadata crawler.
Operation description
Scenarios
Partially updates the resource group, collection scope, scheduling, AI metadata description, or extension configurations of a specified metadata crawler.
Recommended workflow
Call
GetCrawlerto query the current configurations.Call
GetCrawlerTypeCapabilitiesto check the configuration capabilities supported by the crawler type.Call this operation with only the fields that you want to update.
Edition requirements
DataWorks Basic Edition or a more advanced edition is required.
Precautions
At least one updatable field must be provided. Fields that are not provided remain unchanged.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:UpdateCrawler |
update |
*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 crawler IDs. |
1234 |
| ResourceGroupId |
string |
No |
The ID of the Serverless 2.0 resource group used to run the collection task. Whether this parameter is supported and whether it is required depend on the capabilities returned by GetCrawlerTypeCapabilities. If this parameter is not specified, the existing value remains unchanged. |
Serverless_res_group_1234567890123456_1234567890 |
| Scope |
object |
No |
The collection scope configuration. If this parameter is specified, the collection scope is updated. If this parameter is not specified, the existing value remains unchanged. |
|
| Unit |
string |
Yes |
The collection scope granularity. Valid values are determined by the SupportedScopeUnits returned by GetCrawlerTypeCapabilities. |
DATABASE |
| Items |
array |
No |
The list of database names. This parameter is supported only when Unit is set to DATABASE. A maximum of 1,000 entries are allowed. Names cannot be empty or duplicate. |
|
|
string |
No |
A single database name. The name can be up to 256 characters in length. |
example_database |
|
| ExcludeRegex |
string |
No |
The regular expression used to exclude objects from the collection scope. This parameter is supported only when SupportExcludeRegex returned by GetCrawlerTypeCapabilities is set to true. |
^tmp_.* |
| ScheduleConfig |
object |
No |
The scheduling configuration. If this parameter is specified, the scheduling method is updated. If this parameter is not specified, the existing value remains unchanged. |
|
| Type |
string |
Yes |
The scheduling type. MANUAL indicates manual execution. NORMAL indicates periodic scheduling. Data sources in the development environment support only MANUAL. Whether NORMAL is available depends on the SupportSchedule value returned by GetCrawlerTypeCapabilities. |
NORMAL |
| CronExpress |
string |
No |
The six-field cron expression for periodic scheduling. This parameter is required when Type is set to NORMAL. The seconds field must be 0, and the scheduling frequency cannot exceed once per hour. |
0 0 2 ? * * |
| EnableAiComment |
boolean |
No |
Specifies whether to enable AI metadata description. This parameter is supported only when SupportAiComment returned by GetCrawlerTypeCapabilities is set to true. If this parameter is not specified, the existing value remains unchanged. |
|
| Options |
object |
No |
The extension configurations for the crawler type. Only the specified configuration items are updated. Unspecified configuration items remain unchanged. The supported keys and values are determined by the SupportedOptionKeys returned by GetCrawlerTypeCapabilities. |
|
|
string |
No |
The value of a single crawler extension configuration item. The supported configuration items, value types, and value ranges are determined by the SupportedOptionKeys returned by GetCrawlerTypeCapabilities. |
v1 |
At least one of the following parameters must be provided: ResourceGroupId, Scope, ScheduleConfig, EnableAiComment, or Options. Fields that are not provided remain unchanged.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
9252F32F-D855-549E-8898-61CF5A733050 |
| Success |
boolean |
Indicates whether the request was successful. |
|
| Id |
integer |
The ID of the updated metadata crawler. |
1234 |
Id is the ID of the updated metadata crawler.
Examples
Success response
JSON format
{
"RequestId": "9252F32F-D855-549E-8898-61CF5A733050",
"Success": false,
"Id": 1234
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.