Edit compute source

Updated at:

You can use natural language to instruct a code agent, such as Qoder or CodeX, to edit the configuration of an existing Dataphin compute source. This topic describes the feature, provides usage examples, and lists the required inputs.

Overview

The edit compute source feature lets you use natural language to modify the configuration of an existing compute source. For example, you can update its name and description, rotate access credentials, adjust connection parameters, or change the compute project it points to. This feature is for adjusting the configurations of existing compute sources and is separate from the creation process.

Use cases:

  • Modify the name or description of a compute source.

  • Update configuration items for a compute source, such as rotating an AccessKey or adjusting the connection endpoint.

  • Change the target MaxCompute project for a compute source. Use this with caution, as it may affect running tasks.

Note

When updating a compute source, you must submit the complete list of configuration items, not just the ones you want to modify. Any unsubmitted configuration items will be cleared. Therefore, we recommend you first retrieve the current configuration and use it as a basis for your changes. The compute source type generally cannot be changed. To change the type, you typically must delete the compute source and create a new one. Changing the target compute project only redirects the compute source's connection; tasks already published to the original project are not automatically migrated. The compute source ID is a long integer. Ensure it is not truncated during transmission.

Usage examples

You can instruct the agent directly by using natural language. Here are some example commands:

  • Change the description for this compute source.

  • Rotate the AccessKey for this MaxCompute compute source, and keep all other settings the same.

  • Adjust the connection endpoint for this compute source.

Steps:

  1. After you issue an edit command, the agent confirms the target compute source and which configuration items to modify.

  2. To avoid omissions, the agent typically retrieves the existing configuration of the compute source to use as a baseline before applying your changes.

  3. The agent presents the complete proposed configuration changes for your confirmation. Once you confirm, the agent starts the update.

  4. After the update is complete, the agent typically performs a connectivity check on the compute source.

Appendix: Input information

The following table lists the information required when you edit a compute source. In practice, the agent automatically identifies the necessary information from your commands and prompts you if any information is missing. You do not need to provide system-generated values.

Parameter

Required

Description

Example

tenant ID

Yes

The 19-digit ID of the target Dataphin tenant.

1234567890123456789

compute source ID

Yes

The ID of the compute source to edit. You can obtain this ID by querying the compute source list.

—

compute source name

Yes

The compute source name. Even if you do not change it, you must submit it with its original value.

my_compute_source

description

Yes

The compute source description. Even if you do not change it, you must submit it with its original value.

MaxCompute compute source for production

compute source type

Yes

The type of the compute source. This must match the original type and generally cannot be modified.

MaxCompute

complete configuration items

Yes

The complete list of configuration items for the compute source, such as the endpoint, project, and AccessKey. You must submit all items at once. Any omitted items will be cleared.

—