
Alibabacloud Dataworks Infra Manage
- 225 installs
- 208 repo stars
- Updated August 4, 2026
- aliyun/alibabacloud-aiops-skills
Manage Alibaba Cloud DataWorks infrastructure resources—compute, networking, storage bindings, and environment dependencies—for stable batch and streaming pipelines.
About
Operations skill for Alibaba Cloud DataWorks infrastructure layers underpinning ETL and orchestration. Guides agents through provisioning, updating, and stabilizing the resources pipelines depend on across dev, test, and prod workspaces.
- DataWorks compute and network setup
- Storage and credential bindings
- Environment promotion patterns
- Capacity and cost guardrails
- Infra change impact assessment
Alibabacloud Dataworks Infra Manage by the numbers
- 225 all-time installs (skills.sh)
- Ranked #442 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-dataworks-infra-manageAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 225 |
|---|---|
| repo stars | ★ 208 |
| Last updated | August 4, 2026 |
| Repository | aliyun/alibabacloud-aiops-skills ↗ |
What it does
Manage Alibaba Cloud DataWorks infrastructure resources—compute, networking, storage bindings, and environment dependencies—for stable batch and streaming pipelines.
Files
DataWorks Infrastructure Management
Unified management of Data Sources, Compute Resources, and Resource Groups in Alibaba Cloud DataWorks workspaces, supporting create and query operations.
Architecture
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---
Global Rules
Prerequisites
1. Aliyun CLI >= 3.3.1: aliyun version (Installation guide: references/cli-installation-guide.md) 2. First-time use: aliyun configure set --auto-plugin-install true 3. jq (required for resource group operations): which jq 4. Credential status: aliyun configure list, verify valid credentials exist 5. DataWorks edition: Basic edition or above required
Security Rules: DO NOT read/print/echo AK/SK values, DO NOT let users input AK/SK directly, ONLY use aliyun configure list to check credential status.Command Formatting
- User-Agent (mandatory): All
aliyunCLI commands must include the--user-agent AlibabaCloud-Agent-Skillsparameter to identify the source. - Single-line commands: When executing Bash commands, must construct as a single-line string; do not use
\for line breaks. - jq step-by-step execution: First execute the
aliyuncommand to get JSON, then format withjq(to avoid multi-line security prompts). - Endpoint mandatory: When specifying the
--regionparameter, you must also add--endpoint dataworks.<REGION_ID>.aliyuncs.com. Not needed when--regionis not specified.
Parameter Confirmation
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.
⚠️ Write API Execution Gate — MUST Check Before Every Write Operation
MANDATORY: Before calling any Write API (Create / Update / Delete / Bind / Unbind / Associate / Dissociate / Test), you MUST perform the following checks in order:
>
1. Scan the entire SKILL.md for a Security Restriction or Disabled Operations notice that mentions the target API or module.
2. 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)
3. 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:
| Module | Blocked APIs | Reason |
|--------|-------------|--------|
| Data Sources (Module 1) |UpdateDataSource,DeleteDataSource| Prevent accidental data loss, credential exposure, disruption of running tasks |
| Compute Resources (Module 2) |UpdateComputeResource,DeleteComputeResource| Prevent disruption of running development and scheduling tasks |
>
Allowed Write APIs:CreateDataSource,CreateComputeResource,CreateResourceGroup,AssociateProjectToResourceGroup,DissociateProjectFromResourceGroup,TestDataSourceConnectivity
RAM Permissions
All operations require dataworks:<APIAction> permissions. Creating resource groups additionally requires AliyunBSSOrderAccess and vpc:DescribeVpcs, vpc:DescribeVSwitches.
Full permission matrix: references/ram-policies.md
---
Quick Start: New Workspace Infrastructure Initialization
When the user is unsure about specific operations or has vague requirements, guide them through the following process:
1. Environment check — Check CLI and credentials per Prerequisites 2. Confirm workspace — Use ListProjects to locate the workspace, GetProject to confirm the mode (Simple/Standard) 3. Create compute resources — Guide engine type selection; the system will automatically create corresponding data sources. Standard Mode requires Dev+Prod pairs. Only pure storage-type data sources (MySQL, Kafka, etc.) need separate data source creation 4. Create/bind resource groups — Query existing resource groups → let user select → bind. Guide creation when no resource groups are available 5. Test connectivity — Test with bound resource groups; when all pass, inform "Infrastructure configuration complete"
After each step, proactively suggest the next action.
---
Next Step Guidance
After each write operation is completed and verified, proactively suggest follow-up actions:
| Completed Operation | Recommended Next Step |
|---|---|
| Create compute resource | Standard 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 failed | Analyze the error cause, guide the fix |
| Unbind resource group | "Bind to another workspace?" |
---
Trigger Rules
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.
Interaction Flow
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}
---
Module 0: Workspace Query
If the alibabacloud-dataworks-workspace-manage skill is available, prefer using it for workspace queries. The following is only a fallback.aliyun dataworks-public ListProjects --user-agent AlibabaCloud-Agent-Skills --Status Available --PageSize 100When searching by name, first get the full list then filter .PagingInfo.Projects[] by Name/DisplayName using jq.
---
Module 1: Data Source Management
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: hdfsConnection 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
⚠️ Security Restriction — See Write API Execution Gate (Global Rules) for mandatory pre-check
IMPORTANT: TheDeleteDataSourceandUpdateDataSourceAPIs 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.
Connection Mode Quick Reference
ConnectionPropertiesMode selection determines required fields. InstanceMode is preferred when both are available.
| Mode | Types | Count |
|---|---|---|
| Both | mysql, postgresql, sqlserver, polardb, polardbo, polardb-x-2-0, apsaradb_for_oceanbase, drds, starrocks, analyticdb_for_mysql, analyticdb_for_postgresql, milvus, mongodb, redis, elasticsearch, kafka | 16 |
| InstanceMode only | hologres, dlf, opensearch | 3 |
| UrlMode only | oracle, 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, bigquery | 31 |
hdfs — not supported via OpenAPI.Full details: references/data-sources/README.md
Workspace Mode
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
Task 1.1: Create Data Source (CreateDataSource)
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:
- UrlMode:
{"envType":"Prod","address":[{"host":"<IP>","port":<PORT>}],"database":"<DB>","username":"<USER>","password":"<PWD>"} - InstanceMode:
{"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
Task 1.2: Get Data Source (GetDataSource)
aliyun dataworks-public GetDataSource --user-agent AlibabaCloud-Agent-Skills --Id <DATASOURCE_ID> [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com]Task 1.3: List Data Sources (ListDataSources)
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.Task 1.4: Test Connectivity (TestDataSourceConnectivity)
Process: Query resource group list → Let user select a resource group → Execute test.
# 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).
---
Module 2: Compute Resource Management
Supports Hologres, MaxCompute, Flink, Spark, and other types. The system will automatically create corresponding data sources upon creation.
⚠️ Security Restriction — See Write API Execution Gate (Global Rules) for mandatory pre-check
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 Rules
- Dev environment:
authTypeis fixed asExecutor - Prod environment: Options are
PrimaryAccount(recommended),TaskOwner,SubAccount,RamRole. Default recommendation isPrimaryAccountunless user has special requirements
authType details and guidance: references/compute-resources/README.md
Type-Specific Notes
- Hologres: Only supports InstanceMode, requires
instanceId,securityProtocol - MaxCompute: Only supports UrlMode, requires
project,endpointMode
Full ConnectionProperties examples: references/compute-resources/README.md
Task 2.1: Create Compute Resource (CreateComputeResource)
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 ListDataSources to verify the corresponding data source was auto-generated.Task 2.2: Get Compute Resource (GetComputeResource)
aliyun dataworks-public GetComputeResource --user-agent AlibabaCloud-Agent-Skills --Id <ID> --ProjectId <PROJECT_ID>Task 2.3: List Compute Resources (ListComputeResources)
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.---
Module 3: Resource Group Management
Manages the full lifecycle of Serverless resource groups.
Task 3.1: Create Resource Group (CreateResourceGroup)
Requires AliyunBSSOrderAccess permission.Interaction flow (let user choose at each step, DO NOT auto-select):
1. Query and select VPC:
aliyun vpc DescribeVpcs --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --PageSize 50If the list is empty, guide the user to create a VPC; DO NOT auto-create.
2. Query and select VSwitch:
aliyun vpc DescribeVSwitches --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --VpcId "<VPC_ID>" --PageSize 503. Confirm name and specification → Execute creation:
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).
Task 3.2: Get Resource Group (GetResourceGroup)
aliyun dataworks-public GetResourceGroup --user-agent AlibabaCloud-Agent-Skills --Id "<ID>"Task 3.3: List Resource Groups (ListResourceGroups)
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills [--ProjectId <PROJECT_ID>] [--Statuses '["Normal"]'] --PageSize 100Task 3.4: Bind Resource Group (AssociateProjectToResourceGroup)
Process: Query available resource groups → Display list for user to select → Bind after user confirms.
aliyun dataworks-public AssociateProjectToResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"Task 3.5: Query Binding Relationships
aliyun dataworks-public ListResourceGroupAssociateProjects --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>"Task 3.6: Unbind Resource Group (DissociateProjectFromResourceGroup)
aliyun dataworks-public DissociateProjectFromResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"---
Success Verification
After all write operations, use the corresponding Get/List command to verify the result.
Common Errors
| Error Code | Solution |
|---|---|
| Forbidden.Access / PermissionDenied | Check RAM permissions, see references/ram-policies.md |
| InvalidParameter | Check ConnectionProperties JSON and required parameters |
| EntityNotExists | Verify the ID and Region are correct |
| QuotaExceeded | Delete unused resources or request a quota increase |
| Duplicate* | Use a different name |
Region
Common: cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen. Endpoint: dataworks.<region-id>.aliyuncs.com
Full list: references/related-apis.md
Best Practices
1. Query before action — Confirm current state before create operations 2. Manage by environment — Manage Dev and Prod resources separately 3. Verify operations — Use Get/List to verify after each write operation 4. Proactive guidance — Suggest the next step after each step completes 5. Protect data sources and compute resources — Never modify or delete data sources or compute resources via this skill; use the DataWorks console for such operations
Reference Links
| Reference | Description |
|---|---|
| references/data-sources/README.md | Data source type list and ConnectionProperties examples |
| references/data-sources/ | Detailed configuration docs for each data source type (50 files) |
| references/cross-account-datasources.md | Cross-account data source configuration guide |
| references/compute-resources/README.md | Compute resource ConnectionProperties examples |
| references/cli-installation-guide.md | Aliyun CLI installation guide |
| references/ram-policies.md | RAM permission configuration and policy examples |
| references/related-apis.md | API parameter details and Region Endpoints |
Aliyun CLI Installation & Configuration Guide
Aliyun CLI 3.3.1+ required for full plugin ecosystem support.
Installation
macOS (Homebrew)
brew install aliyun-cli
brew upgrade aliyun-cli
aliyun version # verify >= 3.3.1macOS (Binary)
wget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz
tar -xzf aliyun-cli-macosx-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/
aliyun versionLinux
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/
aliyun versionWindows (PowerShell)
Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip"
Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli
$env:Path += ";C:\aliyun-cli"
aliyun versionConfiguration
# Interactive configuration
aliyun configure
# Or set via environment variables (see official docs for details)
# Note: AK/SK should be configured through `aliyun configure` or credential files,
# not echoed/printed in chat. See SKILL.md security rules.
export ALIBABA_CLOUD_REGION_ID=cn-hangzhouEnable Auto Plugin Install
aliyun configure set --auto-plugin-install trueVerification
aliyun ecs describe-regions --user-agent AlibabaCloud-Agent-Skills # test authentication
aliyun configure list # show current configurationReferences
- Official Documentation: https://help.aliyun.com/zh/cli/
- RAM Console: https://ram.console.aliyun.com/
- Access Key Management: https://ram.console.aliyun.com/manage/ak
Compute Resource ConnectionProperties Reference
Workspace Mode and Compute Resource Configuration
Important: Workspace mode (Simple Mode / Standard Mode) affects the quantity and authType configuration of compute resources.
Query Workspace Mode
aliyun dataworks-public GetProject --user-agent AlibabaCloud-Agent-Skills --Id <PROJECT_ID> 2>/dev/null | jq '.Project | {Id, Name, DevEnvironmentEnabled}'DevEnvironmentEnabled: false→ Simple ModeDevEnvironmentEnabled: true→ Standard Mode
Simple Mode vs Standard Mode
| Dimension | Simple Mode | Standard Mode |
|---|---|---|
| Number of environments | 1 (Production environment) | 2 (Development + Production) |
| Number of compute resources | 1 | 2 |
| envType | Prod only | Dev + Prod |
Compute Resource Creation Strategy
Simple Mode Workspace
Create 1 compute resource with envType: Prod:
{
"envType": "Prod",
"authType": "PrimaryAccount",
...
}Standard Mode Workspace
Create 2 compute resources. Different environments use different authType:
Production environment:
{
"envType": "Prod",
"authType": "PrimaryAccount",
...
}Development environment:
{
"envType": "Dev",
"authType": "Executor",
...
}---
authType Rules (by environment)
- Dev environment (
envType: "Dev"):authTypeis fixed as `Executor` - Prod environment (
envType: "Prod"):authTypesupports the following values:
| AuthType | Description |
|---|---|
| PrimaryAccount | Access using primary account identity (Recommended) |
| TaskOwner | Access using task owner identity |
| SubAccount | Access using specified sub-account identity |
| RamRole | Access using specified RAM role identity |
---
Hologres (InstanceMode only)
Prod environment example:
{
"envType": "Prod",
"regionId": "cn-hangzhou",
"instanceId": "hgprecn-cn-xxxxx",
"database": "mydb",
"securityProtocol": "authTypeNone",
"authType": "PrimaryAccount"
}Dev environment example:
{
"envType": "Dev",
"regionId": "cn-hangzhou",
"instanceId": "hgprecn-cn-xxxxx",
"database": "mydb",
"securityProtocol": "authTypeNone",
"authType": "Executor"
}MaxCompute (UrlMode only)
Prod environment example:
{
"envType": "Prod",
"regionId": "cn-hangzhou",
"project": "my_maxcompute_project",
"authType": "PrimaryAccount",
"endpointMode": "SelfAdaption"
}Dev environment example:
{
"envType": "Dev",
"regionId": "cn-hangzhou",
"project": "my_maxcompute_project_dev",
"authType": "Executor",
"endpointMode": "SelfAdaption"
}Flink (InstanceMode)
{
"envType": "Prod",
"regionId": "cn-hangzhou",
"instanceId": "flink-xxxxx",
"workspaceName": "my_flink_workspace",
"authType": "PrimaryAccount"
}Spark (InstanceMode)
{
"envType": "Prod",
"regionId": "cn-hangzhou",
"clusterId": "spark-xxxxx",
"authType": "PrimaryAccount"
}---
Important Notes
- All compute resource types use camelCase for ConnectionProperties fields
- Dev environment authType is fixed as
Executor; Prod environment supportsPrimaryAccount/TaskOwner/SubAccount/RamRole - Hologres compute resources support InstanceMode only
- MaxCompute compute resources support UrlMode only
Cross-Account Data Source Configuration Guide
Use cross-account mode when you need to access resources under other Alibaba Cloud accounts.
---
Cross-Account Configuration Process
Step 1: Resource Account (Target Account) Preparation
In the account where the resource resides (e.g., <TARGET_ACCOUNT_ID>):
1. Create a RAM role (e.g., <CROSS_ACCOUNT_ROLE_NAME>) 2. Configure trust policy to allow the source account (e.g., <SOURCE_ACCOUNT_ID>) to assume 3. Grant the role permissions to access target resources (e.g., MaxCompute project access)
Trust Policy Example:
{
"Statement": [{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"RAM": ["acs:ram::<SOURCE_ACCOUNT_ID>:root"],
"Service": ["<SOURCE_ACCOUNT_ID>@engine.dataworks.aliyuncs.com"]
}
}],
"Version": "1"
}Step 2: Create Data Source in the DataWorks Account (Source Account)
Create a data source in the DataWorks account and configure cross-account parameters:
crossAccountOwnerId: Alibaba Cloud UID of the resource accountcrossAccountRoleName: RAM role name in the resource accountauthType:RamRole(required for MaxCompute/Hologres cross-account scenarios)
---
Cross-Account Data Source Type Quick Reference
| Data source type | Type | Connection mode | authType | Required parameters | Special notes |
|---|---|---|---|---|---|
| MaxCompute | maxcompute | UrlMode | RamRole | project, regionId, endpointMode | Does not require username/password |
| Hologres | hologres | InstanceMode | RamRole | instanceId, regionId, database | Does not require username/password |
| MySQL | mysql | InstanceMode | - | instanceId, regionId, database, username, password | Standard cross-account |
| PostgreSQL | postgresql | InstanceMode | - | instanceId, regionId, database, username, password | Standard cross-account |
| PolarDB | polardb | InstanceMode | - | clusterId, regionId, database, dbType, username, password | Uses clusterId instead of instanceId |
| SQLServer | sqlserver | InstanceMode | - | instanceId, regionId, database, username, password | Standard cross-account |
| AnalyticDB MySQL | analyticdb_for_mysql | InstanceMode | - | instanceId, regionId, database, username, password | Standard cross-account |
| AnalyticDB PostgreSQL | analyticdb_for_postgresql | InstanceMode | - | instanceId, regionId, database, username, password | Standard cross-account |
| StarRocks | starrocks | InstanceMode | - | instanceId, instanceType, regionId, database, username, password | Must provide instanceType (emr-olap or serverless) |
Note: Only MaxCompute and Hologres require explicitly setting authType: RamRole for cross-account. Other types do not need to set authType.---
Cross-Account Configuration Examples
MaxCompute Cross-Account
{
"project": "target_mc_project",
"regionId": "cn-zhangjiakou",
"endpointMode": "SelfAdaption",
"authType": "RamRole",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}Hologres Cross-Account
{
"instanceId": "hgpostcn-cn-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"authType": "RamRole",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}MySQL Cross-Account
{
"instanceId": "rm-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}PolarDB Cross-Account
{
"clusterId": "pc-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"dbType": "mysql",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}PostgreSQL Cross-Account
{
"instanceId": "pgm-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "postgres",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}SQLServer Cross-Account
{
"instanceId": "rm-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}AnalyticDB MySQL Cross-Account
{
"instanceId": "am-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}AnalyticDB PostgreSQL Cross-Account
{
"instanceId": "gp-xxxxx",
"regionId": "cn-zhangjiakou",
"database": "postgres",
"username": "myuser",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}StarRocks Cross-Account
{
"instanceId": "c-xxxxx",
"instanceType": "serverless",
"regionId": "cn-zhangjiakou",
"database": "mydb",
"username": "sr_user",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<TARGET_ACCOUNT_ID>",
"crossAccountRoleName": "<CROSS_ACCOUNT_ROLE_NAME>",
"envType": "Prod"
}---
CLI Command Examples
Complete command for creating a cross-account data source:
aliyun dataworks-public CreateDataSource --user-agent AlibabaCloud-Agent-Skills \
--region cn-zhangjiakou \
--ProjectId 12345 \
--Name cross_account_mysql \
--Type mysql \
--ConnectionPropertiesMode InstanceMode \
--ConnectionProperties '{"envType":"Prod","instanceId":"rm-xxxxx","regionId":"cn-zhangjiakou","database":"mydb","username":"myuser","password":"<PASSWORD>","crossAccountOwnerId":"<TARGET_ACCOUNT_ID>","crossAccountRoleName":"<CROSS_ACCOUNT_ROLE_NAME>"}' \
--Description "Cross-account MySQL datasource"---
Detailed Configuration Documentation
For detailed cross-account configuration of each data source type, please refer to:
- data-sources/maxcompute.md
- data-sources/hologres.md
- data-sources/mysql.md
- data-sources/postgresql.md
- data-sources/polardb.md
- data-sources/sqlserver.md
- data-sources/analyticdb_for_mysql.md
- data-sources/analyticdb_for_postgresql.md
- data-sources/starrocks.md
AnalyticDB MySQL Datasource Documentation
Overview
Last Updated: October 17, 2024, 10:22:06
Property Definition
- Datasource Type:
analyticdb_for_mysql - Supported Configuration Modes (ConnectionPropertiesMode):
- UrlMode (Connection String Mode)
- InstanceMode (Instance Mode)
---
Same Account Instance Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The Region where the ADB MySQL instance is located. |
| instanceId | String | am-xxxxx | Yes | The ADB MySQL instance ID. |
| database | String | database_demo | Yes | ADB MySQL database name. |
| username | String | xxxxx | Yes | Username for ADB MySQL database access. |
| password | String | xxxxx | Yes | Password for ADB MySQL database access. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>• Dev: Development environment.<br>• Prod: Production environment. |
Configuration Example - Same Account Instance Mode
{
"database": "database",
"password": "***",
"instanceId": "am-xxxxx",
"regionId": "cn-shanghai",
"envType": "Dev",
"username": "username"
}---
Cross-Account Instance Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The Region where the ADB MySQL instance is located. |
| instanceId | String | am-xxxxx | Yes | The ADB MySQL instance ID. |
| database | String | database_demo | Yes | ADB MySQL database name. |
| username | String | xxxxx | Yes | Username for ADB MySQL database access. |
| password | String | xxxxx | Yes | Password for ADB MySQL database access. |
| crossAccountOwnerId | String | <ACCOUNT_ID> | Yes | The cross-AliCloud master account ID of the other party; required in cross-account scenarios. |
| crossAccountRoleName | String | dw-ds2.0-role | Yes | The role name under the other party's account in cross-account scenarios. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>• Dev: Development environment.<br>• Prod: Production environment. |
Configuration Example - Cross-Account Instance Mode
{
"database": "database",
"password": "***",
"instanceId": "am-xxxxx",
"regionId": "cn-shanghai",
"envType": "Dev",
"username": "username",
"crossAccountOwnerId": "<ACCOUNT_ID>",
"crossAccountRoleName": "dw-ds2.0-role"
}---
Connection String Mode (UrlMode)
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| database | String | database_demo | Yes | ADB MySQL database name. |
| username | String | xxxxx | Yes | Username for ADB MySQL database access. |
| password | String | xxxxx | Yes | Password for ADB MySQL database access. |
| address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Structured as an array, but only allows configuration of 1 set of host and port. |
| properties | JSONObject | - | No | JDBC connection advanced parameters. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>• Dev: Development environment.<br>• Prod: Production environment. |
Configuration Example - Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx",
"envType": "Dev"
}---
Summary
| Configuration Mode | Use Case | Key Parameters |
|---|---|---|
| Same Account Instance Mode | Connect to ADB MySQL within the same AliCloud account | regionId, instanceId, database, username, password, envType |
| Cross-Account Instance Mode | Connect to ADB MySQL in another AliCloud account | regionId, instanceId, database, username, password, crossAccountOwnerId, crossAccountRoleName, envType |
| Connection String Mode | Connect using direct host/port connection | address, database, username, password, properties (optional), envType |
AnalyticDB PostgreSQL DataSource Documentation
Overview
- DataSource Type:
analyticdb_for_postgresql - Supported Configuration Modes:
UrlMode(Connection String Mode)InstanceMode(Instance Mode)
---
Configuration Modes
1. Same-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | ADB PostgreSQL instance Region. |
instanceId | String | gp-xxxxx | Yes | ADB PostgreSQL instance ID. |
database | String | database_demo | Yes | ADB PostgreSQL database name. |
username | String | xxxxx | Yes | ADB PostgreSQL database access username. |
password | String | xxxxx | Yes | ADB PostgreSQL database access password. |
envType | String | Dev | Yes | Datasource environment info. Values: Dev (Development), Prod (Production). |
Example:
{
"database": "dw",
"password": "***",
"instanceId": "gp-xxxxx",
"regionId": "cn-hangzhou",
"envType": "Prod",
"username": "dw"
}---
2. Cross-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | ADB PostgreSQL instance Region. |
instanceId | String | gp-xxxxx | Yes | ADB PostgreSQL instance ID. |
database | String | database_demo | Yes | ADB PostgreSQL database name. |
username | String | xxxxx | Yes | ADB PostgreSQL database access username. |
password | String | xxxxx | Yes | ADB PostgreSQL database access password. |
crossAccountOwnerId | String | <ACCOUNT_ID> | Yes | Cross-account target Alibaba Cloud main account ID (required for cross-account scenarios). |
crossAccountRoleName | String | dw-ds2.0-role | Yes | Role name under the target account for cross-account scenarios. |
envType | String | Dev | Yes | Datasource environment info. Values: Dev (Development), Prod (Production). |
Example:
{
"crossAccountOwnerId": "<ACCOUNT_ID>",
"crossAccountRoleName": "dw-role",
"database": "dw",
"password": "***",
"instanceId": "gp-xxxxx",
"regionId": "cn-shanghai",
"envType": "Prod",
"username": "dw"
}---
3. Connection String Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
database | String | database_demo | Yes | ADB PostgreSQL database name. |
username | String | xxxxx | Yes | ADB PostgreSQL database access username. |
password | String | xxxxx | Yes | ADB PostgreSQL database access password. |
address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Array format, but only allows 1 set of host and port configuration. |
properties | JSONObject | - | No | JDBC connection advanced parameters. |
envType | String | Dev | Yes | Datasource environment info. Values: Dev (Development), Prod (Production). |
Example:
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx",
"envType": "Dev"
}---
Summary Table
| Mode | Required Parameters |
|---|---|
| Same-Account Instance | regionId, instanceId, database, username, password, envType |
| Cross-Account Instance | regionId, instanceId, database, username, password, crossAccountOwnerId, crossAccountRoleName, envType |
| Connection String | address, database, username, password, envType (optional: properties) |
OceanBase ConnectionProperties Documentation
Property Definition
- Datasource Type:
apsaradb_for_oceanbase - Supported Configuration Modes (ConnectionPropertiesMode):
- UrlMode (Connection String Mode)
- InstanceMode (Instance Mode)
---
Same-Account Instance Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The Region where the instance belongs. |
| instanceId | String | ob5nj51ns6qjr4 | Yes | OceanBase cluster instance ID. |
| tenant | String | t5nnecr8dppi8 | Yes | OceanBase tenant ID. |
| database | String | ob_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| readOnlyDBInstance | String | t62zwpvyehmps-ro0.cn-beijing.oceanbase.aliyuncs.com:1521 | No | Standby database address. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Cross-Account Instance Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The Region where the instance belongs. |
| instanceId | String | ob5nj51ns6qjr4 | Yes | OceanBase cluster instance ID. |
| tenant | String | t5nnecr8dppi8 | Yes | OceanBase tenant ID. |
| database | String | ob_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| crossAccountOwnerId | String | 1 | Yes | Cross-account target cloud account ID. |
| crossAccountRoleName | String | cross-role | Yes | Cross-account target RAM role name. |
| readOnlyDBInstance | String | t62zwpvyehmps-ro0.cn-beijing.oceanbase.aliyuncs.com:1521 | No | Standby database address. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Connection String Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
| dbMode | String | mysql | No | Database mode. Valid values:<br>- mysql<br>- oracle |
| address | Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Only a single address is allowed. |
| database | String | ob_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
| envType | String | Dev | Yes | envType indicates the datasource environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Datasource Configuration Examples
Same-Account Instance Mode
{
"envType": "Prod",
"instanceId": "obxxxxxxxxxx",
"tenant": "txxxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx"
}Cross-Account Instance Mode
{
"envType": "Prod",
"instanceId": "obxxxxxxxxxx",
"tenant": "txxxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx",
"crossAccountOwnerId": "1234567890",
"crossAccountRoleName": "my_ram_role"
}Connection String Mode
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": "5432"
}
],
"dbMode": "mysql",
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/oceanbase
BigQuery Datasource Documentation
Overview
- Datasource Type:
bigquery - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
ConnectionProperties Parameters
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
bigQueryProjectId | String | bigquery_id | Yes | The ID of the BigQuery Project. |
bigQueryAuth | String | 123 | Yes | BigQuery authentication credentials. Enter the file ID. |
envType | String | Dev | Yes | Indicates the datasource environment information. <br>• Dev: Development environment <br>• Prod: Production environment |
---
Configuration Example
Connection String Mode
{
"bigQueryProjectId": "bigquery_id",
"bigQueryAuth": "123",
"envType": "Dev"
}---
API Reference Summary
| Property | Value |
|---|---|
Datasource Type (type) | bigquery |
| ConnectionPropertiesMode | UrlMode |
| Required Parameters | bigQueryProjectId, bigQueryAuth, envType |
---
Source: Aliyun DataWorks Developer Reference - BigQuery Last Updated: 2024-10-15
ClickHouse Datasource Documentation
Property Definition
- Datasource Type:
clickhouse - Supported Configuration Mode (ConnectionPropertiesMode):
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description & Notes |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": 8123}] | Yes | Only a single address is allowed. ClickHouse HTTP port is typically 8123, native port is 9000. |
database | String | xxx_db | Yes | ClickHouse database name. |
properties | JSONObject | {"useSSL": "false"} | No | Driver properties. |
username | String | xxx_username | Yes | Username for ClickHouse database access. |
password | String | xxx_password | Yes | Password for ClickHouse database access. |
securityProtocol | String | authTypeNone | No | Authentication method. Enum values:<br>• authTypeNone: No SSL configuration<br>• authTypeSsl: SSL enabled<br>Default: authTypeNone |
sslRootCertificateFile | String | 123 | No | SSL certificate ID. Required when securityProtocol is authTypeSsl. |
envType | String | Dev | Yes | Datasource environment information.<br>• Dev: Development environment<br>• Prod: Production environment |
---
Datasource Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 8123
}
],
"securityProtocol": "authTypeNone",
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx",
"envType": "Dev"
}DataHub ConnectionProperties Documentation
Overview
- Data Source Type:
datahub - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The region where DataHub is located. |
endpoint | String | http://dh-cn-shanghai.aliyuncs.com | Yes | DataHub access endpoint. |
project | String | project-name | Yes | DataHub project name. |
accessId | String | xxxxx | Yes | The accessId used to access the data source in AK mode. Required when using AK mode. |
accessKey | String | xxxxx | Yes | The accessKey used to access the data source in AK mode. Required when using AK mode. |
envType | String | Dev | Yes | Indicates the data source environment information. Valid values: <br>- Dev: Development environment <br>- Prod: Production environment |
---
Configuration Example
Connection String Mode
{
"envType": "Prod",
"endpoint": "http://dh-cn-shanghai.aliyuncs.com",
"project": "jiangcheng-test1",
"accessId": "xxx",
"accessKey": "xxx"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/datahub
DB2 ConnectionProperties Documentation
Overview
- Datasource Type:
db2 - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Formally an array, but only allows configuration of one set of host and port. |
database | String | mysql_database | Yes | Database name. |
jdbcDriver | String | db2_1 | Yes | DB2 model type. Valid values: db2_1, as400_1, db2_2 |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
properties | JSON Object | {"currentSchema": "abc"} | No | Driver properties. |
envType | String | Dev | Yes | Represents the datasource environment information. Valid values: Dev (Development environment), Prod (Production environment). |
---
Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"currentSchema": "abc"
},
"jdbcDriver": "db2_1",
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/db2
Data Lake Formation Datasource Documentation
Property Definition
- Datasource type:
dlf - Supported configuration mode (ConnectionPropertiesMode):
InstanceMode(Instance Mode)
---
Property Parameters
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
regionId | String | cn-hangzhou | Yes | Region ID. |
catalogId | String | clg-paimon-xxx | Yes | DLF catalog ID. |
catalogName | String | xxx | Yes | DLF catalog name. |
catalogType | String | Paimon | Yes | DLF catalog type. Only supports Paimon. |
database | String | db1 | Yes | Database name. |
authType | String | Executor | Yes | DLF access identity. Enumerated values:<br>• Executor: Executor (Development environment)<br>• PrimaryAccount: Primary account (Production environment)<br>• SubAccount: Specified sub-account (Production environment)<br>• RamRole: Specified RAM role (Production environment) |
authIdentity | String | 123123 | No | Sub-account ID or Role ID. Required when authType is SubAccount or RamRole. |
envType | String | Dev | Yes | Datasource environment information.<br>• Dev: Development environment<br>• Prod: Production environment |
endpoint | String | http://cn-hangzhou-vpc.dlf.aliyuncs.com | Yes | DLF access endpoint. |
---
Datasource Configuration Example
{
"envType": "Prod",
"authType": "SubAccount",
"database": "testdb01",
"catalogId": "clg-paimon-xx",
"catalogName": "xx",
"catalogType": "Paimon",
"endpoint": "http://cn-hangzhou-vpc.dlf.aliyuncs.com",
"authIdentity": "xxx"
}DM (Dameng) Datasource ConnectionProperties Documentation
Overview
- Datasource Type:
dm - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Formally an array, but only allows configuration of 1 set of host and port. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
properties | JSON Object | {"schema": "db1"} | No | Driver properties. |
envType | String | Dev | Yes | Indicates the datasource environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"properties": {
"schema": "db1"
},
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/dm
Doris Datasource Documentation
Overview
- Datasource Type:
doris - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection Properties (UrlMode)
| Name | Type | Required | Description |
|---|---|---|---|
address | Array | Yes | Query address. Only a single address is allowed. |
loadAddress | String | Yes | FE Endpoint. Multiple addresses are allowed. |
database | String | Yes | Database name. |
username | String | Yes | Username for authentication. |
password | String | Yes | Password for authentication. |
properties | JSON Object | No | Driver properties. |
envType | String | Yes | Datasource environment information. Values: Dev (Development environment) or Prod (Production environment). |
---
Field Details
address
- Type: Array
- Required: Yes
- Example:
[
{
"host": "127.0.0.1",
"port": 3306
}
]- Note: Only a single address is allowed.
loadAddress
- Type: String
- Required: Yes
- Example:
[
{
"host": "127.0.0.1",
"port": 3306
}
]- Note: FE Endpoint; multiple addresses are allowed.
database
- Type: String
- Required: Yes
- Example:
dbName - Description: The database name to connect to.
username
- Type: String
- Required: Yes
- Example:
xxxxx - Description: Username for authentication.
password
- Type: String
- Required: Yes
- Example:
xxxxx - Description: Password for authentication.
properties
- Type: JSON Object
- Required: No
- Example:
{
"useSSL": "false"
}- Description: Additional driver properties.
envType
- Type: String
- Required: Yes
- Example:
Dev - Description: Represents the datasource environment information.
Dev: Development environmentProd: Production environment
---
Configuration Example (UrlMode)
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": "3306"
}
],
"loadAddress": [
{
"host": "127.0.0.2",
"port": "8031"
}
],
"database": "my_database",
"username": "my_username",
"password": "<PASSWORD>",
"properties": {
"socketTimeout": "2000"
}
}---
API Reference Summary
| Property | Type | Required | Description |
|---|---|---|---|
address | Array | Yes | Query endpoint (single address only) |
loadAddress | String | Yes | FE endpoint (multiple addresses allowed) |
database | String | Yes | Target database name |
username | String | Yes | Authentication username |
password | String | Yes | Authentication password |
properties | JSON Object | No | Optional driver properties (e.g., useSSL, socketTimeout) |
envType | String | Yes | Environment type: Dev or Prod |
---
Source: Aliyun DataWorks Developer Reference - Doris Last Updated: 2024-10-15
DRDS Datasource Documentation
Property Definition
- Datasource Type:
drds - Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode,UrlMode
---
InstanceMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | DRDS instance region. |
instanceId | String | drdsfacbzeu9f7z2 | Yes | DRDS instance ID. |
database | String | db1 | Yes | Database name. |
username | String | user1 | Yes | Username. |
password | String | pass1 | Yes | Password. |
crossAccountOwnerId | String | <ACCOUNT_ID> | No | Cross-account target Alibaba Cloud main account ID. |
crossAccountRoleName | String | role-name | No | Cross-account role name. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
UrlMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": "3306"}] | Yes | Connection address. Only single host/port configuration allowed. |
database | String | db1 | Yes | Database name. |
username | String | user1 | Yes | Username. |
password | String | pass1 | Yes | Password. |
properties | JSON Object | {"prop1": "value1"} | No | Driver properties. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
Configuration Examples
InstanceMode
{
"envType": "Prod",
"regionId": "cn-shanghai",
"instanceId": "drds-xxxxx",
"database": "mydb",
"username": "root",
"password": "<PASSWORD>"
}InstanceMode (Cross-Account)
{
"envType": "Prod",
"regionId": "cn-shanghai",
"instanceId": "drds-xxxxx",
"database": "mydb",
"username": "root",
"password": "<PASSWORD>",
"crossAccountOwnerId": "<ACCOUNT_ID>",
"crossAccountRoleName": "cross-account-role"
}UrlMode
{
"envType": "Prod",
"address": [{"host": "192.168.1.100", "port": "3306"}],
"database": "mydb",
"username": "root",
"password": "<PASSWORD>"
}Elasticsearch Datasource Documentation
Property Definition
- Datasource Type:
elasticsearch - Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode,UrlMode
---
InstanceMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | Instance region. |
instanceId | String | es-xxxxx | Yes | Elasticsearch instance ID. |
instanceType | String | cloudNative | Yes | Instance type. Values:<br>• cloudNative: Cloud-native<br>• serverless: Serverless |
username | String | elastic | Yes | Username. |
password | String | xxx | Yes | Password. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
UrlMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
endpoint | String | http://esxxx.elasticsearch.aliyuncs.com:9200 | Yes | Elasticsearch connection endpoint. |
authEnable | String | enable | Yes | Enable authentication. Values: enable, disable. Default: enable. |
username | String | elastic | Conditional | Username. Required when authEnable=enable. |
password | String | xxx | Conditional | Password. Required when authEnable=enable. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
Configuration Examples
InstanceMode
{
"envType": "Prod",
"regionId": "cn-shanghai",
"instanceId": "es-xxxxx",
"instanceType": "cloudNative",
"username": "elastic",
"password": "<PASSWORD>"
}UrlMode (With Authentication)
{
"envType": "Prod",
"endpoint": "http://esxxx.elasticsearch.aliyuncs.com:9200",
"authEnable": "enable",
"username": "elastic",
"password": "<PASSWORD>"
}UrlMode (Anonymous)
{
"envType": "Prod",
"endpoint": "http://192.168.1.100:9200",
"authEnable": "disable"
}FTP Data Source Connection Properties Documentation
Overview
- Data Source Type:
ftp - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
protocol | String | ftp | Yes | Protocol type. Valid values: ftp, sftp, ftps. |
host | String | 10.0.0.1 | Yes | Host address. |
port | String | 22 | Yes | Port number. |
baseDir | String | /root/ | No | Base path/directory. |
securityProtocol | String | passwordAuth | No | Required when using SFTP protocol. Authentication option, valid values: passwordAuth, authTypeSshKey. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | No | Password. Required when: protocol is SFTP with passwordAuth authentication, or protocol is FTP/FTPS. |
sshKeyFile | String | 1 | No | Authentication file ID. Required when authentication option is authTypeSshKey. |
---
Configuration Example
Connection String Mode
{
"host": "127.0.0.1",
"port": "5432",
"protocol": "sftp",
"securityProtocol": "passwordAuth",
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/ftp
Last Updated: 2024-10-17
GBASE 8A ConnectionProperties Documentation
Data Source Type
- Type:
gbase8a
Supported Configuration Modes
- ConnectionPropertiesMode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description & Notes |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Formally an array, but only 1 set of host and port is allowed. |
database | String | mysql_database | Yes | Database name. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
envType | String | Dev | Yes | Represents the data source environment information.<br>- Dev: Development environment.<br>- Prod: Production environment. |
---
Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/gbase-8a
Graph Database Connection Properties Documentation
Overview
- Data Source Type:
graph_database - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
host | String | 10.0.0.1 | Yes | Graph instance domain name. |
port | String | 22 | Yes | Graph instance port number. |
username | String | xxxxx | No | Graph instance account. |
password | String | xxxxx | No | Graph instance password. |
envType | String | Dev | Yes | Indicates the data source environment information. Possible values: <br>- Dev: Development environment <br>- Prod: Production environment |
---
Configuration Example
Connection String Mode
{
"host": "127.0.0.1",
"port": "5432",
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/graph-database
Last Updated: 2024-10-15 09:31:48
HBase Datasource Documentation
Overview
Datasource Type: hbase
Supported Configuration Mode: UrlMode (Connection String Mode)
---
ConnectionProperties Parameters (UrlMode)
| Name | Type | Example Value | Required | Description & Notes |
|---|---|---|---|---|
hbaseConfig | JSON Object | {"hbase.zookeeper.quorum":"localhost:2181", "hbaseVersion":"0.9.4"} | Yes | HBase configuration. |
securityProtocol | String | authTypeNone | No | Authentication option. Valid values: authTypeNone, authTypeClientPassword, authTypeKerberos |
username | String | xxxx | No | Username. Required when authTypeClientPassword is used. |
password | String | xxxx | No | Password. Required when authTypeClientPassword is used. |
kerberosFileConf | String | <FILE_ID> | No | Kerberos authentication Conf file (reference). Required when authTypeKerberos is used. |
kerberosFileKeytab | String | <FILE_ID> | No | Kerberos authentication Keytab file (reference). Required when authTypeKerberos is used. |
principal | String | xxx@com | No | Principal. |
envType | String | Dev | Yes | Indicates the datasource environment. Valid values: Dev (Development environment), Prod (Production environment). |
---
Configuration Example (UrlMode)
{
"hbaseConfig": {
"hbase.zookeeper.quorum": "localhost:2181",
"hbaseVersion": "0.9.4"
},
"securityProtocol": "authTypeClientPassword",
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Authentication Types Summary
| Type | Description | Required Additional Parameters |
|---|---|---|
authTypeNone | No authentication | None |
authTypeClientPassword | Username/password authentication | username, password |
authTypeKerberos | Kerberos authentication | kerberosFileConf, kerberosFileKeytab, principal |
---
Last Updated: 2024-11-06
Hive Datasource Documentation
Property Definition
- Datasource Type:
hive - Supported Configuration Modes (ConnectionPropertiesMode):
UrlMode(Connection String Mode)InstanceMode(Instance Mode)CdhMode(CDH Cluster Mode)
---
1. Same-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | Region ID |
clusterId | String | c-d1a993bbcd298315 | Yes | Instance ID |
database | String | db1 | Yes | Database name |
version | String | 2.3.9 | Yes | Hive version |
authType | String | Executor | Yes | OSS access identity. Options: Executor (development environment), PrimaryAccount (production environment), SubAccount (specified sub-account), RamRole (specified RAM role) |
authIdentity | String | 123123 | No | Sub-account ID or Role ID. Required when authType is SubAccount or RamRole |
loginMode | String | Anonymous | Yes | Hive login method. Only supports: Anonymous, LDAP |
username | String | xxx | No | Username. Required when using username/password login |
password | String | xxx | No | Password. Required when using username/password login |
securityProtocol | String | authTypeNone | No | SSL authentication. Options: authTypeNone (no auth), authTypeSsl (enable SSL), authTypeKerberos (enable Kerberos) |
truststoreFile | String | 1 | No | Truststore certificate file (reference) |
truststorePassword | String | apasara | No | Truststore password |
keystoreFile | String | 2 | No | Keystore certificate file (reference) |
keystorePassword | String | apasara | No | Keystore password |
kerberosFileConf | String | 123123 | No | Kerberos configuration file (reference) |
kerberosFileKeytab | String | 123123 | No | Kerberos Keytab file (reference) |
principal | String | xxx@com | No | Kerberos principal |
hiveConfig | JSON Object | {"fs.oss.accessKeyId": "xxx"} | No | Extended parameters |
envType | String | Dev | Yes | Environment type. Options: Dev (development), Prod (production) |
---
2. Cross-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
crossAccountOwnerId | String | 11111 | Yes | Target Alibaba Cloud primary account UID |
crossAccountRoleName | String | xx-role | Yes | Target RAM role name |
regionId | String | cn-shanghai | Yes | Region ID |
clusterId | String | c-d1a993bbcd298315 | Yes | Instance ID |
database | String | db1 | Yes | Database name |
version | String | 2.3.9 | Yes | Hive version |
authType | String | RamRole | Yes | OSS access identity (fixed as RamRole) |
loginMode | String | Anonymous | Yes | Hive login method. Only supports: Anonymous, LDAP |
username | String | xxx | No | Username. Required when using username/password login |
password | String | xxx | No | Password. Required when using username/password login |
securityProtocol | String | authTypeNone | No | SSL authentication. Options: authTypeNone, authTypeSsl, authTypeKerberos |
truststoreFile | String | 1 | No | Truststore certificate file (reference) |
truststorePassword | String | apasara | No | Truststore password |
keystoreFile | String | 2 | No | Keystore certificate file (reference) |
keystorePassword | String | apasara | No | Keystore password |
kerberosFileConf | String | 123123 | No | Kerberos configuration file (reference) |
kerberosFileKeytab | String | 123123 | No | Kerberos Keytab file (reference) |
principal | String | xxx@com | No | Kerberos principal |
hiveConfig | JSON Object | {"fs.oss.accessKeyId": "xxx"} | No | Extended parameters |
envType | String | Dev | Yes | Environment type. Options: Dev, Prod |
---
3. Connection String Mode (UrlMode)
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host":"127.0.0.1","port":"1234"}] | Yes | Single host address and port only |
database | String | hive_database | Yes | Database name |
metaType | String | HiveMetastore | Yes | Metadata type. Options: HiveMetastore, DLF1.0 |
metastoreUris | String | thrift://123:123 | Yes | Metastore URIs |
version | String | 2.3.9 | Yes | Hive version |
accessId | String | xxxxx | No | AccessKey ID. Required when metaType is DLF |
accessKey | String | xxxxx | No | AccessKey Secret. Required when metaType is DLF |
properties | JSON Object | {"useSSL": "false"} | No | Driver properties |
defaultFS | String | xxx | No | Default FS |
loginMode | String | Anonymous | Yes | Hive login method. Only supports: Anonymous, LDAP |
username | String | xxx | No | Username. Required when using username/password login |
password | String | xxx | No | Password. Required when using username/password login |
securityProtocol | String | authTypeNone | No | SSL authentication. Options: authTypeNone, authTypeSsl, authTypeKerberos |
truststoreFile | String | 1 | No | Truststore certificate file (reference) |
truststorePassword | String | apasara | No | Truststore password |
keystoreFile | String | 2 | No | Keystore certificate file (reference) |
keystorePassword | String | apasara | No | Keystore password |
kerberosFileConf | String | 123123 | No | Kerberos configuration file (reference) |
kerberosFileKeytab | String | 123123 | No | Kerberos Keytab file (reference) |
principal | String | xxx@com | No | Kerberos principal |
hiveConfig | JSON Object | {"fs.oss.accessKeyId": "xxx"} | No | Extended parameters |
envType | String | Dev | Yes | Environment type. Options: Dev, Prod |
---
4. CDH Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
clusterIdentifier | String | cdh_cluster | Yes | CDH cluster identifier |
database | String | db1 | Yes | Database name |
defaultFS | String | xxx | No | Default FS |
loginMode | String | Anonymous | Yes | Hive login method. Only supports: Anonymous, LDAP |
username | String | xxx | No | Username. Required when using username/password login |
password | String | xxx | No | Password. Required when using username/password login |
securityProtocol | String | authTypeNone | No | SSL authentication. Options: authTypeNone, authTypeSsl |
truststoreFile | String | 1 | No | Truststore certificate file (reference) |
truststorePassword | String | apasara | No | Truststore password |
keystoreFile | String | 2 | No | Keystore certificate file (reference) |
keystorePassword | String | apasara | No | Keystore password |
kerberosFileConf | String | 123123 | No | Kerberos configuration file (reference) |
kerberosFileKeytab | String | 123123 | No | Kerberos Keytab file (reference) |
principal | String | xxx@com | No | Kerberos principal |
hiveConfig | JSON Object | {"fs.oss.accessKeyId": "xxx"} | No | Extended parameters |
envType | String | Dev | Yes | Environment type. Options: Dev, Prod |
---
Configuration Examples
Same-Account Instance Mode
{
"clusterId": "c-xxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"loginMode": "Anonymous",
"version": "2.3.9",
"authType": "Executor",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}Cross-Account Instance Mode
{
"clusterId": "c-xxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"loginMode": "LDAP",
"version": "2.3.9",
"authType": "Executor",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 10000
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx",
"metastoreUris": "thrift://127.0.0.1:9083",
"metaType": "HiveMetastore",
"version": "2.3.9",
"loginMode": "Anonymous",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}CDH Mode
{
"clusterIdentifier": "c-xxxxxxxxx",
"database": "db",
"loginMode": "Anonymous",
"authType": "Executor",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}---
Important Notes
⚠️ loginMode Parameter Note: The loginMode parameter for Hive data sources only supports the following two values:- Anonymous: Anonymous login- LDAP: LDAP authentication login>
Other values such assimpleanddisableare not supported and will cause an error:Unsupported loginMode=simple for Hive data source, only Anonymous and LDAP are supported
Hologres Datasource Documentation
Property Definition
- Datasource Type:
hologres - Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode(Instance Mode)
---
Same Account Access Identity Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The Region where the Hologres instance belongs. |
instanceId | String | hgpostcn-cn-xxxxx | Yes | The Hologres instance ID. |
database | String | holo_db | Yes | The Hologres database name. |
warehouseName | String | init_warehouse | No | Hologres compute group information, e.g., the default init_warehouse. Note: If a compute group is configured, the database parameter in downstream findConnection will append @ with compute group info, e.g., "database": "holo_demo@compute_group_name". |
authType | String | Executor | Yes | Datasource access identity. Enum values:<br>• Executor: Executor (Development environment)<br>• PrimaryAccount: Primary account (Production environment)<br>• SubAccount: A specified sub-account (Production environment)<br>• RamRole: A specified RAM role (Production environment) |
authIdentity | String | <ACCOUNT_ID> | No | In the same account scenario, the cloud account ID of the corresponding task submitter. |
securityProtocol | String | authTypeNone | No | Whether to enable SSL transmission for datasource access. Enum values:<br>• authTypeNone: Do not use SSL authentication<br>• authTypeSsl: Use SSL authentication |
sslMode | String | require | No | Verification requirement during SSL transmission:<br>• require: Indicates verification |
envType | String | Dev | Yes | envType indicates the datasource environment information.<br>• Dev: Development environment<br>• Prod: Production environment |
---
Cross-Account Mode
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The Region where the Hologres instance belongs. Note: Historical data for non-engine datasources may not have this value. |
instanceId | String | hgpostcn-cn-xxxxx | Yes | The Hologres instance ID. |
database | String | holo_db | Yes | The Hologres database name. |
warehouseName | String | init_warehouse | No | Hologres compute group information, e.g., the default init_warehouse. Note: If a compute group is configured, the database parameter in downstream findConnection will append @ with compute group info. |
authType | String | RamRole | Yes | Fixed as RamRole. |
crossAccountOwnerId | String | <ACCOUNT_ID> | Yes | The other party's primary account ID for cross-Alibaba Cloud primary account. Required for cross-account scenarios. |
crossAccountRoleName | String | holo-accross-role-name | Yes | The role name under the other party's account in cross-account scenarios. |
securityProtocol | String | authTypeNone | No | Whether to enable SSL transmission for datasource access. Enum values:<br>• authTypeNone: Do not use SSL authentication<br>• authTypeSsl: Use SSL authentication |
sslMode | String | require | No | Verification requirement during SSL transmission:<br>• null: Indicates no verification<br>• require: Indicates verification |
envType | String | Dev | Yes | envType indicates the datasource environment information.<br>• Dev: Development environment<br>• Prod: Production environment |
---
Datasource Configuration Examples
Executor Access Identity Mode
{
"database": "database",
"instanceId": "hgpostcn-cn-xxxxx",
"securityProtocol": "authTypeNone",
"regionId": "cn-beijing",
"envType": "Dev",
"authType": "Executor"
}Cross-Account Mode
{
"crossAccountOwnerId": "<ACCOUNT_ID>",
"crossAccountRoleName": "holo-accross-role-name",
"database": "database",
"instanceId": "hgpostcn-cn-xxxxx",
"securityProtocol": "authTypeNone",
"regionId": "cn-beijing",
"envType": "Dev",
"authType": "RamRole"
}HttpFile Datasource Documentation
Property Definition
- Datasource Type:
httpfile - Supported Configuration Mode (ConnectionPropertiesMode):
UrlMode(Connection String Mode)
---
UrlMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
urlPrefix | String | http://127.0.0.1 | Yes | URL domain/prefix. |
defaultHeaders | String | {} | Yes | HTTP request headers as JSON string. Each key is header name, value is header value. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
Configuration Examples
Basic Configuration
{
"envType": "Prod",
"urlPrefix": "http://example.com",
"defaultHeaders": "{}"
}With Custom Headers
{
"envType": "Prod",
"urlPrefix": "http://example.com",
"defaultHeaders": "{\"Authorization\": \"Bearer <TOKEN>\", \"Content-Type\": \"application/json\"}"
}InstanceMode Data Source Instance Query API Reference
When creating InstanceMode data sources, you can call the corresponding cloud product's OpenAPI to query the instance list for user selection.
Important: The user may not have permissions to call these APIs. If the instance list query fails, do not block the subsequent process; prompt the user to manually input the instance ID.
---
Instance Query API Summary
| Data source type | Product | API | CLI Command |
|---|---|---|---|
mysql | RDS MySQL | DescribeDBInstances | aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --Engine MySQL |
postgresql | RDS PostgreSQL | DescribeDBInstances | aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --Engine PostgreSQL |
sqlserver | RDS SQL Server | DescribeDBInstances | aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --Engine SQLServer |
polardb | PolarDB MySQL | DescribeDBClusters | aliyun polardb DescribeDBClusters --user-agent AlibabaCloud-Agent-Skills --DBType MySQL |
drds | DRDS | DescribeDrdsInstances | aliyun drds DescribeDrdsInstances --user-agent AlibabaCloud-Agent-Skills |
hologres | Hologres | ListInstances | aliyun hologram ListInstances --user-agent AlibabaCloud-Agent-Skills |
analyticdb_for_mysql | AnalyticDB MySQL | DescribeDBClusters | aliyun adb DescribeDBClusters --user-agent AlibabaCloud-Agent-Skills |
analyticdb_for_postgresql | AnalyticDB PostgreSQL | DescribeDBInstances | aliyun gpdb DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills |
starrocks | EMR StarRocks | ListCluster | aliyun emr ListCluster --user-agent AlibabaCloud-Agent-Skills --ClusterType OLAP |
milvus | Milvus | ListInstances | aliyun milvus ListInstances --user-agent AlibabaCloud-Agent-Skills |
mongodb | MongoDB | DescribeDBInstances | aliyun dds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills |
kafka | Kafka | GetInstanceList | aliyun alikafka GetInstanceList --user-agent AlibabaCloud-Agent-Skills |
opensearch | OpenSearch | ListInstances | aliyun searchengine ListInstances --user-agent AlibabaCloud-Agent-Skills |
---
Detailed API Description
RDS MySQL (mysql)
API: DescribeDBInstances - Query Instance List Documentation: https://help.aliyun.com/zh/rds/apsaradb-rds-for-mysql/api-rds-2014-08-15-describedbinstances-mysql
aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --Engine MySQL --PageSize 50 2>/dev/null | jq -r '
.Items.DBInstance[] |
"ID: \(.DBInstanceId) | Name: \(.DBInstanceDescription // .DBInstanceId) | Status: \(.DBInstanceStatus)"
'---
RDS PostgreSQL (postgresql)
API: DescribeDBInstances - Query Instance List Documentation: https://help.aliyun.com/zh/rds/apsaradb-rds-for-postgresql/api-rds-2014-08-15-describedbinstances-postgresql
aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --Engine PostgreSQL --PageSize 50 2>/dev/null | jq -r '
.Items.DBInstance[] |
"ID: \(.DBInstanceId) | Name: \(.DBInstanceDescription // .DBInstanceId) | Status: \(.DBInstanceStatus)"
'---
RDS SQL Server (sqlserver)
API: DescribeDBInstances - Query Instance List Documentation: https://help.aliyun.com/zh/rds/apsaradb-rds-for-sql-server/api-rds-2014-08-15-describedbinstances-sqlserver
aliyun rds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --Engine SQLServer --PageSize 50 2>/dev/null | jq -r '
.Items.DBInstance[] |
"ID: \(.DBInstanceId) | Name: \(.DBInstanceDescription // .DBInstanceId) | Status: \(.DBInstanceStatus)"
'---
PolarDB MySQL (polardb)
API: DescribeDBClusters - Query Cluster List Documentation: https://help.aliyun.com/zh/polardb/api-polardb-2017-08-01-describedbclusters
aliyun polardb DescribeDBClusters --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --DBType MySQL 2>/dev/null | jq -r '
.Items.DBCluster[] |
"ID: \(.DBClusterId) | Name: \(.DBClusterDescription // .DBClusterId) | Status: \(.DBClusterStatus)"
'Note: When creating a data source, use theclusterIdparameter (notinstanceId), and specify thedbTypeparameter (mysqlorpostgresql).
---
DRDS (drds)
API: DescribeDrdsInstances - Query Instance List Documentation: https://help.aliyun.com/zh/drds/api-drds-2019-01-23-describedrdsinstances
aliyun drds DescribeDrdsInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" 2>/dev/null | jq -r '
.Instances.Instance[] |
"ID: \(.DrdsInstanceId) | Name: \(.Description // .DrdsInstanceId) | Status: \(.Status)"
'Note: The returned JSON path is.Instances.Instance[], not.Data.Instances.Instance[].
---
Hologres (hologres)
API: ListInstances - Get Instance List Documentation: https://help.aliyun.com/zh/hologres/developer-reference/api-hologram-2022-06-01-listinstances
aliyun hologram POST /api/v1/instances --user-agent AlibabaCloud-Agent-Skills --region "<REGION>" --body '{}' 2>/dev/null | jq -r '
.InstanceList[] |
"ID: \(.InstanceId) | Name: \(.InstanceName) | Status: \(.InstanceStatus)"
'Note: The Hologres API requires a POST request with an empty body--body '{}'. When creating a data source,username/passwordare not required; theauthTypeparameter is needed.
---
AnalyticDB MySQL (analyticdb_for_mysql)
API: DescribeDBClusters - Query Instance List Documentation: https://help.aliyun.com/zh/analyticdb/analyticdb-for-mysql/developer-reference/api-adb-2019-03-15-describedbclusters
aliyun adb DescribeDBClusters --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" 2>/dev/null | jq -r '
.Items.DBCluster[] |
"ID: \(.DBClusterId) | Name: \(.DBClusterDescription // .DBClusterId) | Status: \(.DBClusterStatus)"
'Note: This API does not support the --PageSize parameter; it returns 30 records by default.---
AnalyticDB PostgreSQL (analyticdb_for_postgresql)
API: DescribeDBInstances - Query Database Instance List Documentation: https://help.aliyun.com/zh/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describedbinstances
aliyun gpdb DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --PageSize 50 2>/dev/null | jq -r '
.Items.DBInstance[] |
"ID: \(.DBInstanceId) | Name: \(.DBInstanceDescription // .DBInstanceId) | Status: \(.DBInstanceStatus)"
'---
StarRocks (starrocks)
API: DescribeInstances - Query Instance List Documentation: https://help.aliyun.com/zh/emr-serverless-starrocks/developer-reference/api-starrocks-2022-10-19-describeinstances
aliyun starrocks DescribeInstances --user-agent AlibabaCloud-Agent-Skills --region "<REGION>" 2>/dev/null | jq -r '
.Data[] |
"ID: \(.InstanceId) | Name: \(.InstanceName) | Status: \(.InstanceStatus)"
'Note: The returned JSON path is.Data[], and field names are lowercase. When creating a data source, specify theinstanceTypeparameter (serverlessoremr-olap).
---
Milvus (milvus)
API: list-instances - Get Instance List Documentation: https://help.aliyun.com/zh/milvus/developer-reference/api-milvus-2023-10-12-listinstances
Prerequisites: You need to install the Milvus CLI plugin first:
```bash
aliyun plugin install --names aliyun-cli-milvus
```
aliyun milvus list-instances --user-agent AlibabaCloud-Agent-Skills --region "<REGION>" 2>/dev/null | jq -r '
.Data[] |
"ID: \(.InstanceId) | Name: \(.ClusterName) | Status: \(.InstanceStatus)"
'Note: The command and parameters are lowercase (list-instances,--region). The returned JSON path is.Data[].
---
MongoDB (mongodb)
API: DescribeDBInstances - Query MongoDB Instance List Documentation: https://help.aliyun.com/zh/mongodb/developer-reference/api-dds-2015-12-01-describedbinstances
aliyun dds DescribeDBInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" 2>/dev/null | jq -r '
.DBInstances.DBInstance[] |
"ID: \(.DBInstanceId) | Name: \(.DBInstanceDescription // .DBInstanceId) | Status: \(.DBInstanceStatus)"
'Note: This API returns 30 records by default; the --PageSize parameter is not needed.---
Kafka (kafka)
API: GetInstanceList - Query Instance Information for a Specific Region Documentation: https://help.aliyun.com/zh/apsaramq-for-kafka/cloud-message-queue-for-kafka/developer-reference/api-alikafka-2019-09-16-getinstancelist
aliyun alikafka GetInstanceList --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" 2>/dev/null | jq -r '
.InstanceList.InstanceVO[] |
"ID: \(.InstanceId) | Name: \(.InstanceName) | Status: \(.Status)"
'---
OpenSearch (opensearch)
API: ListInstances - Get Instance List Documentation: https://help.aliyun.com/zh/open-search/developer-reference/api-searchengine-2021-10-25-listinstances
aliyun searchengine ListInstances --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" 2>/dev/null | jq -r '
.result[] |
"ID: \(.instanceId) | Name: \(.description // .instanceId) | Type: \(.edition)"
'Note: The returned JSON fields are lowercase:result,instanceId, etc.
---
Recommended Process
When creating an InstanceMode data source:
1. Try to query the instance list
aliyun <product> <api> --RegionId "<REGION>" ...2. Query successful → Display list for user to select instance ID
3. Query failed → Prompt user: "Unable to retrieve the instance list, please enter the instance ID directly"
---
Error Handling
Common Errors and Handling:
| Error | Cause | Handling |
|---|---|---|
Forbidden.Access | No API permission for this product | Prompt user to input instance ID |
InvalidRegionId | Region does not exist | Check region parameter |
ServiceUnavailable | Product service unavailable | Prompt user to retry later or input manually |
Key Principle: When instance list query fails, do not block the data source creation process; fall back to letting the user manually input the instance ID.
Kafka Datasource Documentation
Property Definition
- Datasource Type:
kafka - Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode,UrlMode
---
UrlMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "192.168.1.100", "port": "9092"}] | Yes | Kafka connection address. |
version | String | 2.0 | Yes | Client version. Only supports "2.0" or "3.4". |
securityProtocol | String | authTypeNone | Yes | Authentication method. Values:<br>• authTypeNone: No authentication<br>• authTypeSaslSsl: SASL SSL<br>• authTypeSaslPlaintext: SASL Plaintext<br>• authTypeSsl: SSL |
saslMechanism | String | plain | Conditional | SASL mechanism. Required when securityProtocol=authTypeSaslSsl or authTypeSaslPlaintext. Values: gssapi, plain, scram-sha-256, scram-sha-512. |
saslUsername | String | user | No | SASL username. |
saslPassword | String | xxx | No | SASL password. |
truststoreFile | String | <FILE_ID> | Conditional | Truststore certificate file ID. Required when securityProtocol=authTypeSsl or authTypeSaslSsl. |
truststorePassword | String | xxx | No | Truststore password. |
keystoreFile | String | <FILE_ID> | No | Keystore certificate file ID. |
keystorePassword | String | xxx | No | Keystore password. |
keyPassword | String | xxx | No | Private key password. |
kerberosFileKeytab | String | <FILE_ID> | Conditional | Keytab authentication file. Required when using Kerberos. |
kerberosFileConf | String | <FILE_ID> | Conditional | krb5.conf configuration file. Required when using Kerberos. |
jaasFileConf | String | <FILE_ID> | No | JAAS configuration file. |
kafkaConfig | JSON Object | {} | No | Kafka extended parameters. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
InstanceMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | Region where the instance belongs. |
instanceId | String | alikafka-xxxxx | Yes | Kafka cluster ID. |
version | String | 2.0 | Yes | Client version. Only supports "2.0" or "3.4". |
securityProtocol | String | authTypeNone | Yes | Authentication method. |
crossAccountOwnerId | String | <ACCOUNT_ID> | No | Cross-account target Alibaba Cloud main account ID. |
crossAccountRoleName | String | role-name | No | Cross-account role name. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
Configuration Examples
UrlMode (No Authentication)
{
"envType": "Prod",
"address": [{"host": "192.168.1.100", "port": "9092"}],
"version": "2.0",
"securityProtocol": "authTypeNone"
}UrlMode (SASL Plaintext)
{
"envType": "Prod",
"address": [{"host": "192.168.1.100", "port": "9092"}],
"version": "2.0",
"securityProtocol": "authTypeSaslPlaintext",
"saslMechanism": "plain",
"saslUsername": "user",
"saslPassword": "<PASSWORD>"
}InstanceMode
{
"envType": "Prod",
"regionId": "cn-shanghai",
"instanceId": "alikafka-xxxxx",
"version": "2.0",
"securityProtocol": "authTypeNone"
}KingbaseES Datasource ConnectionProperties Documentation
Overview
- Datasource Type:
kingbasees - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | JSON Array | Yes | An array format, but only allows configuration of 1 set of host and port. |
database | String | Yes | Database name. |
username | String | Yes | Username. |
password | String | Yes | Password. |
properties | JSON Object | No | Driver properties. |
envType | String | Yes | Indicates the datasource environment information. Options: Dev (Development environment) or Prod (Production environment). |
---
Parameter Details
address
Type: JSON Array
Example:
[
{
"host": "127.0.0.1",
"port": 3306
}
]Note: Although it's an array format, only one set of host and port is allowed.
---
database
Type: String
Example: mysql_database
Description: The name of the database.
---
username
Type: String
Example: xxxxx
Description: The username for authentication.
---
password
Type: String
Example: xxxxx
Description: The password for authentication.
---
properties
Type: JSON Object
Example:
{
"useSSL": "false"
}Description: Driver properties (optional).
---
envType
Type: String
Example: Dev
Description: Indicates the datasource environment information.
Valid Values:
Dev: Development environmentProd: Production environment
---
Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/kingbasees
Lindorm Datasource Documentation
Last Updated: 2024-10-15 09:31:57
Property Definition
| Property | Value |
|---|---|
| Data Source Type (type) | lindorm |
| Supported Configuration Mode (ConnectionPropertiesMode) | UrlMode (Connection String Mode), InstanceMode (Instance Mode) |
Note:
- Wide Table Engine: Only supports UrlMode (Connection String Mode).- Compute Engine: Supports bothUrlModeandInstanceMode.InstanceModesupports cross-account access.
---
Connection String Mode Parameters (UrlMode)
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
seedserver | String | ld-xxxxxxxxxxxxx.rds.aliyuncs.com:30020 | Yes | Connection address. |
username | String | user | Yes | Username for accessing Lindorm. |
password | String | pass | Yes | Password for accessing Lindorm. |
namespace | String | default | Yes | Namespace / Database name. |
envType | String | Dev | Yes | Environment type: Dev (Development), Prod (Production). |
---
Instance Mode Parameters (InstanceMode)
Applicable to: Compute Engine only.
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
regionId | String | cn-xxxxx | Yes | Region ID. |
instanceId | String | ld-xxxxxxxxxxxxx | Yes | Lindorm instance ID. |
namespace | String | db | Yes | Namespace / Database name. |
username | String | user | Yes | Username for accessing Lindorm. |
password | String | pass | Yes | Password for accessing Lindorm. |
engineType | String | compute | Yes | Engine type. Fixed value: compute (Compute Engine). |
envType | String | Prod | Yes | Environment type: Dev (Development), Prod (Production). |
crossAccountOwnerId | String | 111111111 | No | Target Alibaba Cloud primary account UID (cross-account only). |
crossAccountRoleName | String | xx-role | No | Target RAM role name (cross-account only). |
---
Configuration Examples
Connection String Mode (UrlMode)
{
"seedserver": "ld-xxxxxxxxxxxxx.rds.aliyuncs.com:30020",
"username": "user",
"password": "pass",
"namespace": "default",
"envType": "Dev"
}Instance Mode (InstanceMode) - Compute Engine
{
"envType": "Prod",
"engineType": "compute",
"regionId": "cn-xxxxx",
"instanceId": "ld-xxxxxxxxxxxxx",
"namespace": "db",
"username": "user",
"password": "pass"
}Instance Mode (InstanceMode) - Cross-Account Compute Engine
{
"envType": "Prod",
"engineType": "compute",
"regionId": "cn-xxxxx",
"instanceId": "ld-xxxxxxxxxxxxx",
"namespace": "db",
"username": "user",
"password": "pass",
"crossAccountOwnerId": "111111111",
"crossAccountRoleName": "xx-role"
}---
API Reference Summary
- Source: DataWorks Developer Reference > Appendix > Data Source Connection Information (ConnectionProperties)
- Platform: Alibaba Cloud DataWorks
- Navigation: Previous: KingbaseES | Next: LogHub
Related Lindorm OpenAPIs
| API | Description | Documentation |
|---|---|---|
GetLindormInstance | Get detailed information about a Lindorm instance. | GetLindormInstance |
GetLindormInstanceEngineList | Get the list of engine types supported by a Lindorm instance. | GetLindormInstanceEngineList |
GetLindormInstanceList | Get the list of Lindorm instances. | GetLindormInstanceList |
LogHub Data Source ConnectionProperties
Property Definition
- Data source type:
loghub - Supported configuration mode: UrlMode (Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| regionId | String | cn-sanghai | Yes | Region where LogHub is located. |
| endpoint | String | http://cn-beijing.log.aliyuncs.com | Yes | LogHub access endpoint. |
| project | String | project-name | Yes | LogHub project name. |
| accessId | String | xxxxx | Yes | AccessId used for accessing the data source in AK mode. Required in AK mode. |
| accessKey | String | xxxxx | Yes | AccessKey used for accessing the data source in AK mode. Required in AK mode. |
| envType | String | Dev | Yes | envType indicates data source environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Configuration Examples
Connection String Mode
{
"envType": "Prod",
"endpoint": "http://cn-beijing.log.aliyuncs.com",
"project": "jiangcheng-test1",
"accessId": "xxx",
"accessKey": "xxx"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/loghub
MariaDB DataSource ConnectionProperties Documentation
Attribute Definition
- Datasource type:
mariadb - Supported configuration mode:
UrlMode(Connection String Mode)
---
Connection String Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Formally an array, but only allows configuration of 1 set of host and port. |
| database | String | mysql_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
| envType | String | Dev | Yes | envType indicates datasource environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Datasource Configuration Example
Connection String Mode
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/mariadb
MaxCompute Datasource Documentation
Overview
| Property | Value |
|---|---|
| Datasource Type | maxcompute |
| Supported Configuration Mode | UrlMode (Connection String Mode) |
---
Query MaxCompute Projects
Before creating a MaxCompute data source, you can query the list of available MaxCompute projects.
Reference: MaxCompute ListProjects API
aliyun maxcompute ListProjects --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION>" --maxItem 50 2>/dev/null | jq -r '
.data.projects[] |
"Project Name: \(.name) | Status: \(.status)"
'---
ConnectionProperties Parameters
1. Same-Account Access Identity Mode
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
project | String | Yes | hello_mc_project | MaxCompute project name |
regionId | String | Yes | cn-shanghai | Region identifier where the MaxCompute project resides. Examples: cn-shanghai (Shanghai), cn-beijing (Beijing) |
endpointMode | String | Yes | SelfAdaption | Access address configuration mode. Values: SelfAdaption (adaptive), Custom (custom access address) |
endpoint | String | No | http://service.cn-shanghai.maxcompute.aliyun-inc.com/api | MaxCompute Service access endpoint (classic network). Format: service.${regionId}.maxcompute.aliyun-inc.com/api or service.${regionId}-intranet.maxcompute.aliyun-inc.com/api |
tunnelServer | String | No | http://dt.cn-shanghai.maxcompute.aliyun-inc.com | MaxCompute Tunnel access endpoint (classic network). Format: dt.${regionId}.maxcompute.aliyun-inc.com or dt.${regionId}-intranet.maxcompute.aliyun-inc.com |
authType | String | Yes | Executor | Datasource access identity. Values (case-insensitive): Executor, TaskOwner, PrimaryAccount, SubAccount, RamRole, HadoopUser |
authIdentity | String | No | <ACCOUNT_ID> | Cloud account ID of the task submitter (same-account scenario) |
envType | String | Yes | Dev | Datasource environment. Values: Dev (development), Prod (production) |
---
2. Cross-Account Mode
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
project | String | Yes | hello_mc_project | MaxCompute project name |
regionId | String | Yes | cn-shanghai | Region identifier. Examples: cn-shanghai, cn-beijing |
endpointMode | String | Yes | SelfAdaption | Access address configuration mode: SelfAdaption or Custom |
endpoint | String | No | http://service.cn-shanghai.maxcompute.aliyun-inc.com/api | MaxCompute Service access endpoint (classic network) |
tunnelServer | String | No | http://dt.cn-shanghai.maxcompute.aliyun-inc.com | MaxCompute Tunnel access endpoint (classic network) |
authType | String | Yes | RamRole | Fixed value: RamRole |
crossAccountOwnerId | String | Yes | <ACCOUNT_ID> | Target Alibaba Cloud primary account ID (required for cross-account) |
crossAccountRoleName | String | Yes | mc-accross-role-name | Role name under the target account |
envType | String | Yes | Dev | Datasource environment: Dev or Prod |
---
Configuration Examples
PrimaryAccount Access Identity Mode (Recommended)
Note: MaxCompute data source does not supportExecutoridentity. Please usePrimaryAccount.
{
"envType": "Prod",
"project": "skyfire_20221228",
"regionId": "cn-shanghai",
"endpointMode": "SelfAdaption",
"authType": "PrimaryAccount"
}Custom Endpoint Mode
{
"endpoint": "http://service.cn-shanghai.maxcompute.aliyun-inc.com/api",
"envType": "Prod",
"project": "skyfire_20221228",
"authType": "PrimaryAccount",
"endpointMode": "Custom",
"regionId": "cn-shanghai"
}Cross-Account Mode
{
"project": "skyfire_20221228",
"crossAccountOwnerId": "<ACCOUNT_ID>",
"crossAccountRoleName": "mc-accross-role-name",
"endpointMode": "SelfAdaption",
"envType": "Prod",
"authType": "RamRole",
"regionId": "cn-shanghai"
}AuthType Enum Values
Note: MaxCompute data source does not supportExecutoridentity.PrimaryAccountis recommended.
| Value | Description | MaxCompute Support |
|---|---|---|
Executor | Executor identity | Not Supported |
TaskOwner | Task owner identity | Supported |
PrimaryAccount | Primary account identity | Recommended |
SubAccount | Specified sub-account identity | Supported |
RamRole | Specified RAM role identity | Supported (cross-account scenario) |
HadoopUser | Identity mapping for EMR/Hadoop scenarios | Supported |
Endpoint Format Notes
- Service Endpoint Formats:
- Classic:
service.${regionId}.maxcompute.aliyun-inc.com/api - New format:
service.${regionId}-intranet.maxcompute.aliyun-inc.com/api
- Tunnel Endpoint Formats:
- Classic:
dt.${regionId}.maxcompute.aliyun-inc.com - New format:
dt.${regionId}-intranet.maxcompute.aliyun-inc.com
Memcache Data Source ConnectionProperties
Basic Information
- Data source type:
memcache - Supported configuration mode:
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| proxy | String | 127.0.0.1 | Yes | Proxy Host. |
| port | String | 22 | Yes | Port number. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| envType | String | Dev | Yes | envType indicates data source environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
---
Configuration Examples
Connection String Mode
{
"proxy": "127.0.0.1",
"port": "5432",
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Last updated: 2024-10-15 09:32:01
Source: https://help.aliyun.com/zh/dataworks/developer-reference/memcache
Milvus Data Source ConnectionProperties
Data source type: milvus
Supported configuration modes:
- InstanceMode (Instance Mode)
- UrlMode (Connection String Mode)
---
Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | Region where the instance is located. |
| ConnectionPropertiesMode | String | InstanceMode | Yes | Configuration mode |
| database | String | xxxxx | No | Database name |
| instanceId | String | c-dd8f**** | Yes | Instance ID |
| username | String | xxxxx | Yes | Username |
| password | String | xxxxx | Yes | Password |
| envType | String | Dev | Yes | envType indicates data source environment information.<br>- Dev: Development environment.<br>- Prod: Production environment. |
Instance Mode Configuration Example
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceId": "c-dd8f71372xxxx",
"database": "default",
"username": "root",
"password": "xxxxxxx"
}---
Connection String Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| endpoint | String | http://cmilvusxxxx.com:19530 | Yes | Connection endpoint |
| ConnectionPropertiesMode | String | UrlMode | Yes | Configuration mode |
| database | String | xxxxx | No | Database name |
| username | String | xxxxx | Yes | Username |
| password | String | xxxxx | Yes | Password |
| authType | String | USERNAME_PASSWORD | Yes | Authentication method |
| envType | String | Dev | Yes | envType indicates data source environment information.<br>- Dev: Development environment.<br>- Prod: Production environment. |
Connection String Mode Configuration Example
{
"envType": "Prod",
"endpoint": "http://c-dd8xxxxx.milvus.aliyuncs.com:19530",
"database": "default",
"username": "root",
"password": "xxxx",
"authType": "USERNAME_PASSWORD"
}---
Last updated: 2025-03-27 14:05:17
Source: https://help.aliyun.com/zh/dataworks/developer-reference/milvus
MongoDB Datasource Documentation
Property Definition
- Datasource Type:
mongodb - Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode,UrlMode
---
InstanceMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The region where the MongoDB instance belongs. |
instanceId | String | dds-2zebc89f45b238b4 | Yes | MongoDB instance ID. |
database | String | my_db | Yes | Database name. |
username | String | root | Yes | Username. |
password | String | xxx | Yes | Password. |
authDb | String | admin | Yes | Authentication database. |
engineVersion | String | 4.x | No | MongoDB engine version. Values: 4.x, 5.x, 6.x, 7.x. |
authType | String | authTypeNone | No | Authentication method. Values:<br>• authTypeNone: No SSL<br>• authTypeSsl: SSL authentication |
truststoreFile | String | <FILE_ID> | Conditional | Truststore certificate file ID. Required when authType=authTypeSsl. |
truststorePassword | String | xxx | No | Truststore password. |
properties | JSON Object | {"ssl": "true"} | No | Advanced properties. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
UrlMode Parameters
| Name | Type | Example Value | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": "27017"}] | Yes | MongoDB connection address. |
database | String | my_db | Yes | Database name. |
username | String | root | Yes | Username. |
password | String | xxx | Yes | Password. |
authDb | String | admin | Yes | Authentication database. |
engineVersion | String | 4.x | No | MongoDB engine version. Values: 4.x, 5.x, 6.x, 7.x. |
authType | String | authTypeNone | No | Authentication method. Values:<br>• authTypeNone: No SSL<br>• authTypeSsl: SSL authentication |
truststoreFile | String | <FILE_ID> | Conditional | Truststore certificate file ID. Required when authType=authTypeSsl. |
truststorePassword | String | xxx | No | Truststore password. |
properties | JSON Object | {"ssl": "true"} | No | Advanced properties. |
envType | String | Prod | Yes | Environment type. Values: Dev, Prod. |
---
Configuration Examples
InstanceMode
{
"envType": "Prod",
"instanceId": "dds-xxxxx",
"regionId": "cn-shanghai",
"database": "my_db",
"username": "root",
"password": "<PASSWORD>",
"authDb": "admin",
"engineVersion": "5.x"
}UrlMode
{
"envType": "Prod",
"address": [{"host": "192.168.1.100", "port": "27017"}],
"database": "my_db",
"username": "root",
"password": "<PASSWORD>",
"authDb": "admin",
"engineVersion": "5.x"
}UrlMode with SSL
{
"envType": "Prod",
"address": [{"host": "192.168.1.100", "port": "27017"}],
"database": "my_db",
"username": "root",
"password": "<PASSWORD>",
"authDb": "admin",
"engineVersion": "5.x",
"authType": "authTypeSsl",
"truststoreFile": "<FILE_ID>"
}MySQL DataSource ConnectionProperties Documentation
Overview
- Data Source Type:
mysql - Supported Configuration Modes:
UrlMode(Connection String Mode)InstanceMode(Instance Mode)
---
1. Same-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The region where the instance belongs. Note: Historical non-engine data sources may not have this value. |
instanceId | String | rm-xxxxxxxxx | Yes | Instance ID. |
database | String | mysql_database | Yes | Database name. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
securityProtocol | String | authTypeNone | No | SSL authentication setting. Values: authTypeNone (no authentication), authTypeSsl (enable SSL authentication). |
truststoreFile | String | 1 | No | Truststore certificate file (reference). |
truststorePassword | String | apasara | No | Truststore password. |
keystoreFile | String | 2 | No | Keystore certificate file (reference). |
keystorePassword | String | apasara | No | Keystore password. |
driverVersion | String | 8.2.0 | No | Driver version. Enumerated values: (empty), 8.2.0, 5.1.49, 5.1.46. |
authType | String | PrimaryAccount | No | Required for OSS Binlog reading support. Values: PrimaryAccount, SubAccount, RamRole. |
authIdentity | String | 123456 | No | Required when authType is SubAccount (specify sub-account ID) or RamRole (specify role ID). Not needed for cross-account scenarios. |
readOnlyDBInstance | String | rm-uf65l3bwae8w8r35 | No | Standby instance ID. |
envType | String | Dev | Yes | Environment type. Values: Dev (development environment), Prod (production environment). |
Example
{
"instanceId": "rm-xxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}---
2. Cross-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
regionId | String | cn-shanghai | Yes | The region where the instance belongs. Note: Historical non-engine data sources may not have this value. |
instanceId | String | rm-xxxxxxxxx | Yes | Instance ID. |
database | String | mysql_database | Yes | Database name. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
crossAccountOwnerId | String | 1 | Yes | Cross-account target cloud account ID. |
crossAccountRoleName | String | mysql-role | Yes | Cross-account target RAM role name. |
securityProtocol | String | authTypeNone | No | SSL authentication setting. Values: authTypeNone (no authentication), authTypeSsl (enable SSL authentication). |
truststoreFile | String | 1 | No | Truststore certificate file (reference). |
truststorePassword | String | apasara | No | Truststore password. |
keystoreFile | String | 2 | No | Keystore certificate file (reference). |
keystorePassword | String | apasara | No | Keystore password. |
driverVersion | String | 8.2.0 | No | Driver version. Enumerated values: (empty), 8.2.0, 5.1.49, 5.1.46. |
authType | String | PrimaryAccount | No | Required for OSS Binlog reading support. Values: RamRole. |
readOnlyDBInstance | String | rm-uf65l3bwae8w8r35 | No | Standby instance ID. |
envType | String | Dev | Yes | Environment type. Values: Dev (development environment), Prod (production environment). |
Example
{
"instanceId": "rm-xxxxxxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx",
"crossAccountOwnerId": "1234567890",
"crossAccountRoleName": "my_ram_role",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}---
3. Connection String Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
address | Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Allows configuration of multiple host addresses and ports. |
database | String | mysql_database | Yes | Database name. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
securityProtocol | String | authTypeNone | No | SSL authentication setting. Values: authTypeNone (no authentication), authTypeSsl (enable SSL authentication). |
truststoreFile | String | 1 | No | Truststore certificate file (reference). |
truststorePassword | String | apasara | No | Truststore password. |
keystoreFile | String | 2 | No | Keystore certificate file (reference). |
keystorePassword | String | apasara | No | Keystore password. |
properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
envType | String | Dev | Yes | Environment type. Values: Dev (development environment), Prod (production environment). |
Example
{
"address": [
{
"host": "127.0.0.1",
"port": 3306
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "aliyun",
"password": "xxx",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/mysql
OpenSearch ConnectionProperties Documentation
Overview
Data Source Type: opensearch
Supported Configuration Mode (ConnectionPropertiesMode):
InstanceMode(Instance Mode)
---
Instance Mode Parameters
| Name | Type | Example Value | Required | Description & Notes |
|---|---|---|---|---|
instanceType | String | vectorSearchVersion | Yes | OpenSearch engine type. Options: <br>- vectorSearchVersion (Vector Search Version) <br>- recallEnginVersion (Recall Engine Version) |
regionId | String | cn-shanghai | Yes | The region where the instance is located. |
ConnectionPropertiesMode | String | InstanceMode | Yes | Configuration mode. |
instanceId | String | ha-cn-kve**** | Yes | Instance ID. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
Important Notes
For Vector Search Version and Recall Engine Version, both username/password and AccessKey are required:
- AccessKey: Used by plugins to retrieve table schema and pull table structure information in wizard mode.
- Username/Password: Used for actual runtime data writing.
---
Configuration Example
Instance Mode
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceType": "vectorSearchVersion",
"instanceId": "ha-xxxx",
"username": "admin",
"password": "xxxx"
}---
Document Information
- Last Updated: 2024-12-30 18:28:58
- Source: https://help.aliyun.com/zh/dataworks/developer-reference/opensearch
Oracle DataSource ConnectionProperties Documentation
Property Definition
- Data source type:
oracle - Supported configuration mode (ConnectionPropertiesMode):
UrlMode(Connection String Mode)
---
Connection String Mode Parameters
| Name | Type | Example Value | Required | Description and Notes |
|---|---|---|---|---|
jdbcUrl | String | jdbc:oracle:thin:@host:port:SID | Yes | Oracle's jdbcUrl. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
securityProtocol | String | authTypeNone | No | Authentication option. Valid values: authTypeNone, authTypeSsl. |
truststoreFile | String | 123 | No | Truststore file ID. Required when securityProtocol is authTypeSsl. |
---
DataSource Configuration Example
Connection String Mode
{
"jdbcUrl": "jdbc:oracle:thin:@host:port:SID",
"username": "xxxxx",
"password": "xxxxx",
"securityProtocol": "authTypeNone",
"envType": "Dev"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/oracle
OSS Data Source Documentation
Property Definition
- Data source type:
oss - Supported configuration mode (ConnectionPropertiesMode):
UrlMode(Connection string mode)
Connection String Mode Parameters
| Name | Type | Example | Required | Description and Notes |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The region where OSS is located. |
| endpoint | String | http://oss-beijing.aliyuncs.com | Yes | OSS access endpoint. |
| bucket | String | test-oss-sh | Yes | The OSS bucket name. |
| authType | String | RamRole | Yes | Access identity type. Only supports RamRole and Ak. |
| authIdentity | String | 112345 | No | Role ID. Required when using RamRole access identity. |
| accessId | String | xxxxx | No | AccessId used for accessing the data source in AK mode. Required in AK mode. |
| accessKey | String | xxxxx | No | AccessKey used for accessing the data source in AK mode. Required in AK mode. |
| envType | String | Dev | Yes | envType indicates the data source environment information.<br>- Dev: Development environment<br>- Prod: Production environment |
Data Source Configuration Examples
Connection String Mode (RamRole Recommended)
Note: OSS data source supports bothRamRoleandAkauthentication methods. RamRole is recommended.
Create via RAM Role Mode (Recommended):
{
"envType": "Prod",
"endpoint": "http://oss-beijing.aliyuncs.com",
"bucket": "test-oss-sh",
"authType": "RamRole",
"authIdentity": "1123455"
}Create via AK Mode (Alternative):
{
"envType": "Prod",
"endpoint": "http://oss-beijing.aliyuncs.com",
"bucket": "test-oss-sh",
"authType": "Ak",
"accessId": "xxx",
"accessKey": "xxx"
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/oss
PolarDB-X 2.0 ConnectionProperties Documentation
Attribute Definition
- Datasource type:
polardbx20 - Supported configuration modes (ConnectionPropertiesMode):
- UrlMode (Connection String Mode)
- InstanceMode (Instance Mode)
---
Same-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The region where the instance belongs. Note: Historical non-engine datasource data does not have this value. |
| instanceId | String | pc-xxxxx | Yes | PolarDB-X cluster ID. |
| database | String | mysql_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
| envType | String | Dev | Yes | Datasource environment type. Options: Dev (Development environment), Prod (Production environment). |
---
Cross-Account Instance Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| regionId | String | cn-shanghai | Yes | The region where the instance belongs. Note: Historical non-engine datasource data does not have this value. |
| instanceId | String | pc-xxxxx | Yes | PolarDB-X cluster ID. |
| database | String | polardbx_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| crossAccountOwnerId | String | 1 | Yes | Cross-account target cloud account ID. |
| crossAccountRoleName | String | cross-role | Yes | Cross-account target RAM role name. |
| properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
| envType | String | Dev | Yes | Datasource environment type. Options: Dev (Development environment), Prod (Production environment). |
---
Connection String Mode
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
| address | Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Only a single address is allowed. |
| database | String | polardbx_database | Yes | Database name. |
| username | String | xxxxx | Yes | Username. |
| password | String | xxxxx | Yes | Password. |
| properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
| envType | String | Dev | Yes | Datasource environment type. Options: Dev (Development environment), Prod (Production environment). |
---
Datasource Configuration Examples
Same-Account Instance Mode
{
"envType": "Prod",
"ownerId": "<ACCOUNT_ID>",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "<PASSWORD>",
"properties": {
"socketTimeout": "2000"
}
}Cross-Account Instance Mode
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "<PASSWORD>",
"properties": {
"socketTimeout": "2000"
},
"crossAccountOwnerId": "123123123",
"crossAccountRoleName": "cross-role"
}Connection String Mode
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": "3306"
}
],
"database": "my_database",
"username": "my_username",
"password": "<PASSWORD>",
"properties": {
"socketTimeout": "2000"
}
}---
Source: https://help.aliyun.com/zh/dataworks/developer-reference/polardb-x-2-0
Redshift Datasource Documentation
Overview
- Datasource Type:
redshift - Supported Configuration Mode:
UrlMode(Connection String Mode)
---
ConnectionProperties Parameters (UrlMode)
| Name | Type | Example | Required | Description |
|---|---|---|---|---|
address | JSON Array | [{"host": "127.0.0.1", "port": 3306}] | Yes | Formally an array, but only one set of host and port is allowed. |
database | String | mysql_database | Yes | Database name. |
username | String | xxxxx | Yes | Username. |
password | String | xxxxx | Yes | Password. |
properties | JSON Object | {"useSSL": "false"} | No | Driver properties. |
envType | String | Dev | Yes | Indicates the datasource environment. Valid values: Dev (Development environment), Prod (Production environment). |
---
Configuration Example (UrlMode)
{
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"connectTimeout": "2000"
},
"username": "xxxxx",
"password": "xxxxx",
"envType": "Dev"
}---
Field Details
address
- Type: JSON Array
- Required: Yes
- Notes: Although formatted as an array, it only accepts a single host/port configuration pair.
database
- Type: String
- Required: Yes
- Description: The name of the database to connect to.
username
- Type: String
- Required: Yes
- Description: Authentication username.
password
- Type: String
- Required: Yes
- Description: Authentication password.
properties
- Type: JSON Object
- Required: No
- Description: Additional JDBC driver properties (e.g.,
useSSL,connectTimeout).
envType
- Type: String
- Required: Yes
- Valid Values:
Dev- Development environmentProd- Production environment