UpdateKnowledgeBaseBuildTask
Updates the configuration of a knowledge base build task without changing the input and configuration snapshots of created instances.
Operation description
Updates a knowledge base build task. The tenant and caller identities are determined by the POP authentication context.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:UpdateKnowledgeBaseBuildTask |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| KnowledgeBaseId |
string |
Yes |
The ID of the associated knowledge base. |
12345678-1234-4234-8234-123456789abc |
| TaskId |
string |
Yes |
The task ID. |
10001 |
| Name |
string |
No |
The new task name. |
Sales Project Knowledge Build |
| Description |
string |
No |
The new description. |
Sales Metrics and Policy Documents |
| ProjectId |
integer |
No |
The workspace used for future runs. |
67890 |
| Input |
object |
No |
Completely replaces the original Input. |
|
| ProjectIds |
array |
No |
The DataWorks workspace IDs selected for workspace-scoped builds. This parameter cannot be empty and must contain unique values. |
|
|
integer |
No |
The DataWorks workspace IDs selected for workspace-scoped builds. This parameter cannot be empty and must contain unique values. |
12345 |
|
| SourceIds |
array |
No |
The IDs of registered sources in the current knowledge base. The values must be unique. Whether this parameter is required and the allowed source types depend on the task input scenario. See the following table. |
|
|
string |
No |
The IDs of registered sources in the current knowledge base. The values must be unique. Whether this parameter is required and the allowed source types depend on the task input scenario. See the following table. |
src-document-001 |
|
| Entities |
array<object> |
No |
The Data Map entities such as databases, schemas, and tables selected for data asset-scoped builds. This parameter cannot be empty and must contain unique values. |
|
|
object |
No |
|||
| EntityId |
string |
No |
The metadata entity ID returned by Data Map. The client must pass this value as-is without concatenating database, schema, or table identifiers. |
maxcompute-table:::project_name:schema_name:table_name |
| EntityType |
string |
No |
The entity level, such as DATABASE, SCHEMA, or TABLE. The server validates this value against Data Map identities. The presence of an enum value does not guarantee support across all engines. |
TABLE |
| YamlUploadId |
string |
No |
The YAML upload session ID in the current knowledge base used for SEMANTIC_MODEL import tasks. This ID is bound when the task is created and cannot be mixed with other input scopes. |
upload-yaml-001 |
| KnowledgeObjectIds |
array |
No |
Required, non-empty, and unique when building from document objects in the current knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
|
|
string |
No |
Required, non-empty, and unique when building from document objects in the current knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
obj-document-001 |
|
| Trigger |
object |
No |
Completely replaces the original Trigger. |
|
| Mode |
string |
No |
The trigger mode. Valid values: |
MANUAL |
| Cron |
string |
No |
The DataWorks scheduling cron expression. This parameter is provided only when Mode is set to PERIODIC. |
0 0 2 * * ? |
| Enabled |
boolean |
No |
Specifies whether to enable or disable automatic periodic triggering. This parameter is provided only when Mode is set to PERIODIC and does not indicate the instance status. |
|
| RuntimeResource |
object |
No |
Updates the runtime resources based on the submitted fields. If ResourceGroupId or Cu is not provided, the original value is retained. |
|
| ResourceGroupId |
string |
No |
The DataWorks resource group ID used by the actual builder nodes. The server validates its availability in the workspace corresponding to the top-level ProjectId of the task. |
rg-001 |
| Cu |
integer |
No |
The compute specifications for the builder. Valid values: 4 to 16. If omitted during creation, the default value is 4. Read operations return the effective value. |
4 |
| LlmModel |
string |
No |
The specific model ID or AUTO. |
AUTO |
| ContentLocale |
string |
No |
The content language. |
zh-CN |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The unique identifier of the request, which can be used for troubleshooting. |
00000000-0000-4000-8000-000000000001 |
| Success |
boolean |
Indicates whether the request is successful. |
|
| Data |
object |
The business data returned when the request is successful. |
|
| TaskId |
string |
The stable task ID. |
10001 |
| KnowledgeBaseId |
string |
The ID of the associated knowledge base. |
12345678-1234-4234-8234-123456789abc |
| Name |
string |
The task name. |
Sales Project Knowledge Build |
| Description |
string |
The task description. This parameter is optional. |
Sales Metrics and Policy Documents |
| Type |
string |
The task type. Valid values: PROJECT_SPACE_BUILD, SEMANTIC_GRAPH, DOCUMENT_GRAPH, DOCUMENT_SYNC, DOCUMENT_SYNC_AND_GRAPH, and SEMANTIC_MODEL. SEMANTIC_MODEL is used only for YAML imports. |
PROJECT_SPACE_BUILD |
| LlmModel |
string |
The specific model ID or AUTO for tasks that require a model. If omitted during creation, the value defaults to AUTO. This parameter is not configured for tasks that do not call a model. |
AUTO |
| ContentLocale |
string |
The content language of the task. This parameter is optional and is explicitly selected when the task is created. |
zh-CN |
| ProjectId |
integer |
The DataWorks workspace ID where the task runs. This is different from the build asset scope specified by Input.ProjectIds. |
67890 |
| Input |
object |
The input scope specified based on the task type. |
|
| ProjectIds |
array |
The DataWorks workspace IDs selected for workspace-scoped builds. This parameter cannot be empty and must contain unique values. |
|
|
integer |
The DataWorks workspace IDs selected for workspace-scoped builds. This parameter cannot be empty and must contain unique values. |
12345 |
|
| SourceIds |
array |
The IDs of registered sources in the current knowledge base. The values must be unique. Whether this parameter is required and the allowed source types depend on the task input scenario. See the following table. |
|
|
string |
The IDs of registered sources in the current knowledge base. The values must be unique. Whether this parameter is required and the allowed source types depend on the task input scenario. See the following table. |
src-document-001 |
|
| Entities |
array<object> |
The Data Map entities such as databases, schemas, and tables selected for data asset-scoped builds. This parameter cannot be empty and must contain unique values. |
|
|
object |
|||
| EntityId |
string |
The metadata entity ID returned by Data Map. The client must pass this value as-is without concatenating database, schema, or table identifiers. |
maxcompute-table:::project_name:schema_name:table_name |
| EntityType |
string |
The entity level, such as DATABASE, SCHEMA, or TABLE. The server validates this value against Data Map identities. The presence of an enum value does not guarantee support across all engines. |
TABLE |
| YamlUploadId |
string |
The YAML upload session ID in the current knowledge base used for SEMANTIC_MODEL import tasks. This ID is bound when the task is created and cannot be mixed with other input scopes. |
upload-yaml-001 |
| KnowledgeObjectIds |
array |
Required, non-empty, and unique when building from document objects in the current knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
|
|
string |
Required, non-empty, and unique when building from document objects in the current knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the current knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
obj-document-001 |
|
| RuntimeResource |
object |
The task runtime resource group and builder compute specifications. |
|
| ResourceGroupId |
string |
The DataWorks resource group ID used by the actual builder nodes. The server validates its availability in the workspace corresponding to the top-level ProjectId of the task. |
rg-001 |
| Cu |
integer |
The compute specifications for the builder. Valid values: 4 to 16. If omitted during creation, the default value is 4. Read operations return the effective value. |
4 |
| Trigger |
object |
The manual or periodic trigger configuration. |
|
| Mode |
string |
The trigger mode. Valid values: |
MANUAL |
| Cron |
string |
The DataWorks scheduling cron expression. This parameter is provided only when Mode is set to PERIODIC. |
0 0 2 * * ? |
| Enabled |
boolean |
Specifies whether to enable or disable automatic periodic triggering. This parameter is provided only when Mode is set to PERIODIC and does not indicate the instance status. |
|
| CreateTime |
integer |
The creation time. |
1790200000000 |
| ModifyTime |
integer |
The time when the definition was last modified. |
1790200300000 |
| Code |
string |
The business error code, which is used to determine the error type when the request fails. |
InvalidParameter |
| Message |
string |
The secure error message returned when the request fails. |
The request parameters are invalid |
Examples
Success response
JSON format
{
"RequestId": "00000000-0000-4000-8000-000000000001",
"Success": false,
"Data": {
"TaskId": "10001",
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"Name": "Sales Project Knowledge Build",
"Description": "Sales Metrics and Policy Documents",
"Type": "PROJECT_SPACE_BUILD",
"LlmModel": "AUTO",
"ContentLocale": "zh-CN",
"ProjectId": 67890,
"Input": {
"ProjectIds": [
12345
],
"SourceIds": [
"src-document-001"
],
"Entities": [
{
"EntityId": "maxcompute-table:::project_name:schema_name:table_name",
"EntityType": "TABLE"
}
],
"YamlUploadId": "upload-yaml-001",
"KnowledgeObjectIds": [
"obj-document-001"
]
},
"RuntimeResource": {
"ResourceGroupId": "rg-001",
"Cu": 4
},
"Trigger": {
"Mode": "MANUAL",
"Cron": "0 0 2 * * ?",
"Enabled": false
},
"CreateTime": 1790200000000,
"ModifyTime": 1790200300000
},
"Code": "InvalidParameter",
"Message": "The request parameters are invalid"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The request parameters are invalid. | |
| 500 | InternalError | The knowledge base operation failed. Use RequestId to contact support. | |
| 403 | Forbidden | You are not authorized to perform this operation. | |
| 403 | DataAgentUnavailable | DataAgent is unavailable; check the product edition and usage quota | |
| 403 | DataAgentNotActivated | Activate DataAgent pay-as-you-go before configuring or starting a knowledge base build | |
| 404 | ResourceNotFound | The requested resource does not exist or is not visible. | |
| 409 | Conflict | The resource state conflicts with this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.