Unified management of Data Sources, Compute Resources, and Resource Groups in Alibaba Cloud DataWorks workspaces, supporting create and query operations.
text
DataWorks
├── Workspaces ─── Query and search workspaces
│ ├── Data Sources ─── 50 types: MySQL, Hologres, MaxCompute, ...
│ └── Compute Resources ─── Hologres, MaxCompute, Flink, Spark
└── Resource Groups ─── Serverless resource group management (cross-workspace)
Dependencies:
Workspace ◀── Data Sources, Compute Resources (must belong to a workspace)
Workspace ◀── Resource Groups (associated via binding; one resource group can bind to multiple workspaces)
Connectivity Test ──depends on──▶ Resource Group (must be bound to the workspace of the data source)
Standard Mode ──requires──▶ Dev (Development) + Prod (Production) dual data sources and compute resources
aliyun version (Installation guide: references/cli-installation-guide.md)aliyun configure set --auto-plugin-install truewhich jqaliyun configure list, verify valid credentials existSecurity Rules: DO NOT read/print/echo AK/SK values, DO NOT let users input AK/SK directly, ONLY use
aliyun configure listto check credential status.
aliyun CLI commands must include the --user-agent AlibabaCloud-Agent-Skills parameter to identify the source.\ for line breaks.aliyun command to get JSON, then format with jq (to avoid multi-line security prompts).--region parameter, you must also add --endpoint dataworks.<REGION_ID>.aliyuncs.com. Not needed when --region is not specified.Before executing any command, all user-customizable parameters must be confirmed by the user. Do not assume or use default values. Exception: When the user has explicitly specified parameter values in the conversation, use them directly without re-confirmation.
Resource group related parameters (mandatory user selection): VPC, VSwitch, Resource Group ID (for binding/connectivity testing) — involve networking and billing, DO NOT auto-select; must display a list for the user to explicitly choose. Confirm even if there is only one option.
MANDATORY: Before calling any Write API (Create / Update / Delete / Bind / Unbind / Associate / Dissociate / Test), you MUST perform the following checks in order:
Scan the entire SKILL.md for a Security Restriction or Disabled Operations notice that mentions the target API or module.
If a restriction exists: BLOCK the operation immediately. Do NOT call the API. Respond to the user with:
- What operation is blocked and why
- The recommended alternative (e.g., use the DataWorks console, contact administrator)
If no restriction exists: Proceed normally with parameter confirmation and execution.
This check is NOT optional. It applies to every single write operation without exception. Never skip this step.
Quick Reference — Blocked APIs in this skill:
ModuleBlocked APIsReasonData Sources (Module 1)
UpdateDataSource,DeleteDataSourcePrevent accidental data loss, credential exposure, disruption of running tasksCompute Resources (Module 2)UpdateComputeResource,DeleteComputeResourcePrevent disruption of running development and scheduling tasksAllowed Write APIs:
CreateDataSource,CreateComputeResource,CreateResourceGroup,AssociateProjectToResourceGroup,DissociateProjectFromResourceGroup,TestDataSourceConnectivity
All operations require dataworks:<APIAction> permissions. Creating resource groups additionally requires AliyunBSSOrderAccess and vpc:DescribeVpcs, vpc:DescribeVSwitches.
Full permission matrix: references/ram-policies.md
When the user is unsure about specific operations or has vague requirements, guide them through the following process:
ListProjects to locate the workspace, GetProject to confirm the mode (Simple/Standard)After each step, proactively suggest the next action.
After each write operation is completed and verified, proactively suggest follow-up actions:
Completed OperationRecommended Next StepCreate compute resourceStandard Mode: "Create the corresponding Dev resource?"; "Test connectivity?"Create data source separately"Test connectivity?"; Standard Mode: "Create Dev/Prod environment data sources?"Create resource group"Bind to a workspace?"Bind resource group"Test data source connectivity?"Connectivity test passed"Infrastructure is ready."Connectivity test failedAnalyze the error cause, guide the fixUnbind resource group"Bind to another workspace?"
Trigger scenarios: Data source create/query, compute resource create/query, resource group management, infrastructure initialization, colloquial aliases (DW database connection failure, configure holo/mc resources, create rg)
Not triggered: Data development tasks, scheduling configuration, MaxCompute table management, data integration tasks, ECS/RDS/OSS, workspace member management, data quality/lineage/preview. Standalone workspace queries are handled by the alibabacloud-dataworks-workspace-manage skill.
All operations follow: Identify module → Environment check → Collect parameters → Execute command → Verify result → Guide next step
Common aliases: DW=DataWorks, holo=Hologres, mc/MC/odps=MaxCompute, pg=PostgreSQL, rg=Resource Group, ds=Data Source, RDS=InstanceMode MySQL/PG/SQLServer, ADB=AnalyticDB
Naming suggestions: Data source {type}_{business}_{purpose}, Compute resource {type}_{business}, Resource group dw_{purpose}_rg_{env}
If the
alibabacloud-dataworks-workspace-manageskill is available, prefer using it for workspace queries. The following is only a fallback.
bash
aliyun dataworks-public ListProjects --user-agent AlibabaCloud-Agent-Skills --Status Available --PageSize 100
When searching by name, first get the full list then filter .PagingInfo.Projects[] by Name/DisplayName using jq.
Supports 50 data source types. See references/data-sources/README.md for details.
When do you need to create a data source separately? Creating a compute resource (Module 2) will automatically create the corresponding data source. Only pure storage-type databases (MySQL, PostgreSQL, Kafka, MongoDB, etc.) need separate creation.
Note: The following types do not currently support OpenAPI:
hdfs
Connection modes: UrlMode (self-hosted databases, requires host/port) or InstanceMode (Alibaba Cloud managed instances, requires instanceId). When unsure, proactively ask the user. InstanceMode is preferred.
Instance query APIs: references/data-sources/instance-apis.md
IMPORTANT: The
DeleteDataSourceandUpdateDataSourceAPIs are supported by the DataWorks service, but this skill has disabled modifying or deleting data sources for security reasons. Before attempting any write operation, the agent MUST check the Write API Execution Gate section. If you need to modify or delete a data source, please use the DataWorks console directly or contact your administrator.
ConnectionPropertiesMode selection determines required fields. InstanceMode is preferred when both are available.
ModeTypesCountBothmysql, postgresql, sqlserver, polardb, polardbo, polardb-x-2-0, apsaradb_for_oceanbase, drds, starrocks, analyticdb_for_mysql, analyticdb_for_postgresql, milvus, mongodb, redis, elasticsearch, kafka16InstanceMode onlyhologres, dlf, opensearch3UrlMode onlyoracle, mariadb, dm, db2, tidb, vertica, gbase8a, kingbasees, saphana, snowflake, maxcompute, hive, clickhouse, doris, selectdb, redshift, hbase, lindorm, oss, s3, ftp, ssh, tablestore, memcache, graph_database, datahub, loghub, restapi, salesforce, httpfile, bigquery31
hdfs— not supported via OpenAPI. Full details: references/data-sources/README.md
Environment note: Prod (Production) is for production data processing; Dev (Development) is for development and debugging, physically isolated from production.
aliyun dataworks-public GetProject --user-agent AlibabaCloud-Agent-Skills --Id <PROJECT_ID> — check DevEnvironmentEnabled:
false → Simple Mode (1 data source, envType=Prod)true → Standard Mode (2 data sources, Dev + Prod, physically isolated)Full mode comparison: references/data-sources/README.md
bash
aliyun dataworks-public CreateDataSource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <UrlMode|InstanceMode> --ConnectionProperties '<JSON>' --Description "<DESC>"
ConnectionProperties common structure:
{"envType":"Prod","address":[{"host":"<IP>","port":<PORT>}],"database":"<DB>","username":"<USER>","password":"<PWD>"}{"envType":"Prod","instanceId":"<ID>","regionId":"<REGION>","database":"<DB>","username":"<USER>","password":"<PWD>"}Special type structures (Oracle, MaxCompute, HBase, etc.): see references/data-sources/ per-type docs
Cross-account data source configuration: references/cross-account-datasources.md
bash
aliyun dataworks-public GetDataSource --user-agent AlibabaCloud-Agent-Skills --Id <DATASOURCE_ID> [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com]
bash
aliyun dataworks-public ListDataSources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Types '["mysql"]'] [--EnvType <Dev|Prod>] [--PageNumber 1] [--PageSize 20]
Returns nested structure
DataSources[].DataSource[]; Name/Type are in the outer layer, Id/Description in the inner layer.
Process: Query resource group list → Let user select a resource group → Execute test.
bash
# Step 1: Query project resource groups
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID>
# Step 2: Execute test after user selects a resource group
aliyun dataworks-public TestDataSourceConnectivity --user-agent AlibabaCloud-Agent-Skills --DataSourceId <ID> --ProjectId <PROJECT_ID> --ResourceGroupId "<RG_ID>"
If error
"resourceGroupId is not in the project", the resource group needs to be bound first (confirm with user, then executeAssociateProjectToResourceGroup).
Supports Hologres, MaxCompute, Flink, Spark, and other types. The system will automatically create corresponding data sources upon creation.
IMPORTANT: For security reasons, this skill does NOT support modifying or deleting compute resources. Before attempting any write operation, the agent MUST check the Write API Execution Gate section. These operations are disabled to prevent:
- Accidental data loss or service interruption
- Disruption of running data development and scheduling tasks
- Unintended changes to production compute resource configurations
If you need to modify or delete a compute resource, please use the DataWorks console directly or contact your administrator.
authType is fixed as ExecutorPrimaryAccount (recommended), TaskOwner, SubAccount, RamRole. Default recommendation is PrimaryAccount unless user has special requirementsauthType details and guidance: references/compute-resources/README.md
instanceId, securityProtocolproject, endpointModeFull ConnectionProperties examples: references/compute-resources/README.md
bash
aliyun dataworks-public CreateComputeResource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <InstanceMode|UrlMode> --ConnectionProperties '<JSON>' [--Description "<DESC>"]
After creation, use
ListDataSourcesto verify the corresponding data source was auto-generated.
bash
aliyun dataworks-public GetComputeResource --user-agent AlibabaCloud-Agent-Skills --Id <ID> --ProjectId <PROJECT_ID>
bash
aliyun dataworks-public ListComputeResources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Name <FILTER>] [--EnvType <Dev|Prod>] [--PageSize 20] [--SortBy CreateTime] [--Order Desc]
Returns nested structure
ComputeResources[].ComputeResource[]; Name/Type are in the outer layer, Id in the inner layer.
Manages the full lifecycle of Serverless resource groups.
Requires
AliyunBSSOrderAccesspermission.
Interaction flow (let user choose at each step, DO NOT auto-select):
bash
aliyun vpc DescribeVpcs --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --PageSize 50
If the list is empty, guide the user to create a VPC; DO NOT auto-create.
bash
aliyun vpc DescribeVSwitches --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --VpcId "<VPC_ID>" --PageSize 50
bash
aliyun dataworks-public CreateResourceGroup --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --Name "<NAME>" --PaymentType PostPaid --VpcId "<VPC_ID>" --VswitchId "<VSWITCH_ID>" --ClientToken "$(uuidgen 2>/dev/null || echo "token-$(date +%s)")" --Remark "Created by Agent"
After creation, poll GetResourceGroup until status becomes Normal (every 10 seconds, up to 10 minutes).
bash
aliyun dataworks-public GetResourceGroup --user-agent AlibabaCloud-Agent-Skills --Id "<ID>"
bash
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills [--ProjectId <PROJECT_ID>] [--Statuses '["Normal"]'] --PageSize 100
Process: Query available resource groups → Display list for user to select → Bind after user confirms.
bash
aliyun dataworks-public AssociateProjectToResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"
bash
aliyun dataworks-public ListResourceGroupAssociateProjects --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>"
bash
aliyun dataworks-public DissociateProjectFromResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"
After all write operations, use the corresponding Get/List command to verify the result.
Error CodeSolutionForbidden.Access / PermissionDeniedCheck RAM permissions, see references/ram-policies.mdInvalidParameterCheck ConnectionProperties JSON and required parametersEntityNotExistsVerify the ID and Region are correctQuotaExceededDelete unused resources or request a quota increaseDuplicate*Use a different name
Common: cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen. Endpoint: dataworks.<region-id>.aliyuncs.com
Full list: references/related-apis.md
ReferenceDescriptionreferences/data-sources/README.mdData source type list and ConnectionProperties examplesreferences/data-sources/Detailed configuration docs for each data source type (50 files)references/cross-account-datasources.mdCross-account data source configuration guidereferences/compute-resources/README.mdCompute resource ConnectionProperties examplesreferences/cli-installation-guide.mdAliyun CLI installation guidereferences/ram-policies.mdRAM permission configuration and policy examplesreferences/related-apis.mdAPI parameter details and Region Endpoints