Create a compute source SKILL

Updated at:

You can use natural language commands to instruct Code Agents, such as Qoder and CodeX, to integrate external compute engines with Dataphin. These engines become compute sources that run data development tasks in your projects. This article explains the features and prerequisites of this SKILL, provides usage examples, and details the expected results. For a comprehensive list of all possible inputs, see the appendix.

Overview

The create compute source SKILL lets you use natural language commands to connect an external compute engine to Dataphin as a compute source. This lets projects run offline and real-time tasks on that engine. A compute source serves as the execution layer for tasks and is distinct from a data source, which reads and writes data. For most compute source types, you can reference an existing compute cluster. The Code Agent automatically populates configuration details like connection addresses and login credentials from the cluster information. You only need to provide a few compute source-level details, such as a database name or schema. For some real-time types that do not have a corresponding compute cluster, you must provide the full connection configuration.

Use cases:

  • Prepare the execution layer for Dataphin projects. For example, you can create separate compute sources for development and production environments, each pointing to a different database to ensure isolation.

  • Create a compute source based on a registered compute cluster by providing only compute source-level settings, such as a database name or schema.

  • Connect to compute engines such as MaxCompute, Doris, StarRocks, Hologres, AnalyticDB for PostgreSQL, GaussDB, Lindorm, Hadoop, EMR Serverless Spark, Databricks, SelectDB, and OushuDB.

  • Connect to real-time compute engines that do not have a corresponding compute cluster, such as open-source Flink, Realtime Compute for Apache Flink, and FusionInsight Flink.

  • Run a connectivity check on the compute source after it is created, if you request it.

Note

Limitations: This SKILL supports a wide range of compute source types, but each type has a unique set of configuration parameters. You can create only verified types with their predefined settings. The Code Agent will not infer configuration parameters for untested types based on API documentation. The Agent will not guess missing information that is not provided by you or returned by the cluster details, such as a database name, port, username, password, or file ID. Instead, it will prompt you for the required information. By default, the Code Agent does not perform a connectivity check after creation. It runs a check only if you explicitly request it. For some types, you can create a compute source without a password, but it remains unusable until you provide the necessary credentials. Uniqueness constraints apply to names and databases: compute source names must be unique within a tenant, even across different types. You cannot bind the same database name to a single cluster more than once. You can typically bind a MaxCompute project to only one compute source.

Prerequisites

  • Your account has the required permissions for compute source management.

  • You have confirmed the target tenant ID, and the name and type for the compute source you want to create.

  • For most types, the target compute cluster must already be registered in Dataphin, and you must have its cluster ID. If the cluster does not exist, you must first create a compute cluster.

  • You have the necessary compute source-level information for the specified type, such as a database name, schema, MaxCompute project name, or task queue or gateway name. This information must correspond to existing resources on the target cluster.

  • For real-time types that do not reference a cluster, you must have the complete connection configuration. This includes the service address, workspace, and access credentials. If Kerberos authentication is enabled, you also need information about the required authentication files.

Examples

You can describe your requirements to the Code Agent using natural language. Here are some example commands you can use directly:

  • Help me create a compute source based on an existing MaxCompute cluster. The project name is ai_prod.

  • Create a compute source on this Doris cluster and use my_db as the database name.

  • Create a set of Hologres compute sources for both the development and production environments, with each pointing to a different database.

  • Create an open-source Flink compute source. I will provide you with the NAS address.

  • After the compute source is created, run a connectivity check for me.

Interaction steps:

  1. After you issue the creation command, the Code Agent confirms the target tenant ID, compute source name, and compute source type with you.

  2. The Code Agent typically only asks for information that you must provide, such as the cluster ID, database name, schema, or access credentials. The Code Agent automatically retrieves other connection settings from the cluster details to prevent redundant input.

  3. If any required information is not provided by you or returned by the cluster details, the Code Agent prompts you for it instead of making assumptions or using default values. Confirm the details before providing them to avoid creating an unusable compute source.

  4. You can provide sensitive information like passwords directly, or you can save it to a local file with restricted permissions and provide only the file path. The Code Agent does not echo or print full access keys.

  5. Before starting the creation, the Code Agent usually restates the compute source name, type, target tenant ID, whether an existing cluster is referenced, and a summary of the connection configuration (with sensitive values masked). It proceeds only after you confirm.

  6. After creation is complete, the Code Agent uses the returned compute source ID to read back the details and verifies that the new source appears in the Compute Source List. By default, it does not perform a connectivity check. The Agent performs this check only if you explicitly request it. If the check fails, the Agent compares it with existing compute sources on the same cluster to help isolate the cause.

Results

After the operation completes, you get the following results:

  • Returned information: The ID of the new compute source, along with a summary of its name, type, and configuration (with sensitive fields masked). If you requested a connectivity check, the Agent also provides the result of the check.

  • Completion status: Creation is successful if the request is processed, you can read back the compute source by using its ID, and it appears in the Compute Source List with the correct name and type.

  • Viewing and verification: You can view the new compute source in the Compute Source List in Dataphin. If you did not provide a password during creation, Dataphin creates the compute source, but it is unusable. You must later update the compute source to add the required credentials and then perform a connectivity check.

Note

A successful response only indicates that the service has accepted the creation request. You must verify the final status by checking the read-back results and the actual content displayed in the Dataphin UI.

Appendix: Input information

The following table lists the information you might need to create a compute source. This is for reference only. In practice, the Code Agent automatically identifies the required information based on your command and prompts you if anything is missing. The system automatically generates items marked "Not Required", and you do not need to provide them.

Parameter

Required

Description

Example

Tenant ID

Yes

The ID of the target Dataphin tenant. It is a 19-digit number.

1234567890123456789

Compute source name

Yes

The name of the compute source. It can contain letters, numbers, and underscores (_). The name must be unique within the tenant, even across different types.

mc_prod_compute

Compute source description

No

A description of the compute source's purpose. This can be left blank.

Production environment MaxCompute compute source

Compute source type

Yes

The type of the compute source you want to create. You must specify this, as the Code Agent will not infer it. The required connection parameters vary by type.

MAX_COMPUTE

Type version

Not Required

This is usually the same as the compute source type and is handled by the Code Agent based on the type.

-

Cluster ID

Required for most types

The ID of a registered compute cluster to reference. It is a 19-digit number. This is not required for types without a corresponding cluster, such as open-source Flink, Realtime Compute for Apache Flink, and FusionInsight Flink.

6789012345678901234

Database name or schema

Depends on the type

The database, schema, or project name that the compute source points to. It must be an existing database on the cluster. For the MaxCompute type, enter the project name.

my_db

Connection configuration

Depends on the type

Types that do not reference a cluster require the complete connection configuration, such as the service address, workspace, task queue, or NAS address.

https://service.cn-shanghai.maxcompute.aliyun.com/api

Access credentials

Depends on the type

Some types require a password or an access key. If not provided, the compute source can still be created but will be unusable until you add the credentials.

-

Kerberos authentication information

Required for some types

Types that use Kerberos authentication require the identifiers for the krb5.conf and keytab files already uploaded to the platform, as well as the principal.

-