Create and verify a MaxCompute data source

Updated at:

This topic covers the prerequisites, usage examples, and expected results. An appendix lists the required input information.

Overview

This feature lets you use natural language commands to add a MaxCompute project to Dataphin as a data source, which enables downstream data development tasks to read and write data in the MaxCompute project. After the agent creates the data source, it verifies its connectivity. This feature supports both Basic and DEV-PROD project modes.

Use cases:

  • Add a new MaxCompute data warehouse to Dataphin.

  • Configure a MaxCompute data source for a Dataphin project.

  • Verify MaxCompute connectivity after data source creation.

Note

Limitations: For a project in Basic project mode, only a production environment data source is created. For a project in DEV-PROD project mode, the process requires two steps: first, create the production data source and obtain its ID; then, create the development data source and associate it with the production data source. A development data source cannot be created independently. For data isolation, we recommend using separate MaxCompute projects for your development and production environments.

Prerequisites

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

  • You have the connection details for your MaxCompute project, including its endpoint, project name, AccessKey ID, and AccessKey Secret.

  • You have identified the project mode (Basic or DEV-PROD) for the target project.

Usage examples

You can describe your requirements to the agent in natural language. Here are some sample commands:

  • Connect this MaxCompute project to Dataphin, create a data source, and verify its connectivity.

  • I have a DEV-PROD project. Help me create the production data source first, and then the development data source.

  • Create a MaxCompute data source, and then test its connectivity.

Interaction steps:

  1. After you issue the creation command, the agent confirms the target tenant, data source name, project mode (Basic or DEV-PROD), and MaxCompute connection settings (endpoint, project, and access credentials).

  2. The agent typically suggests a connectivity pre-check before creating the data source.

  3. Because creation is a write operation, the agent asks for confirmation before proceeding. It summarizes the details—data source name, type, target tenant, project mode, and connection settings (excluding the secret key)—and informs you whether the operation supports rollback.

  4. For a DEV-PROD project, the agent first creates the production data source and records its ID. Then, it creates the development data source and associates it with the production data source. After creation is complete, the agent uses the returned IDs to verify connectivity.

Expected results

The operation returns the following results:

  • Return value: Upon successful creation, the operation returns the production data source ID. For a DEV-PROD project, the development data source ID is also returned.

  • Completion status: A successful command response indicates that the request has been accepted. The agent then typically queries the data source list and performs a connectivity check using the returned ID to confirm its availability.

  • Verification: You can view the new MaxCompute data source and its connectivity status in the Dataphin data source list.

Note

A successful command-line response only indicates that the request has been accepted. The final status shown in the Dataphin UI is the source of truth.

Appendix: Input information

The following table lists potential parameters for creating a MaxCompute data source. The agent automatically identifies required information from your command and prompts for any missing details. You do not need to provide system-generated values.

Parameter

Required

Description

Example

Tenant ID

Yes

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

1234567890123456789

Data source name

Yes

The name of the data source. It can contain letters, numbers, and underscores (_), and must not exceed 64 characters.

mc_prod_ds

Data source description

No

The purpose of the data source. This can be left empty.

MaxCompute data source for the production environment

Project mode

Yes

The mode of the target project: Basic (production only) or DEV-PROD (production and development).

DEV-PROD

Endpoint

Yes

The endpoint of the MaxCompute service.

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

Project name

Yes

The MaxCompute project name for the production environment.

my_project

Development project name

Conditionally required

The MaxCompute project name for the development environment in DEV-PROD mode. It can be the same as the production project.

my_project_dev

Access credentials

Yes

The AccessKey ID and AccessKey Secret required to access MaxCompute.

—