alibabacloud-bailian-m…
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Spark job execution role, used to access OSS, DLF and other cloud resources during job execution
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-emr-spark-manage --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/alibabacloud-emr-spark-manageContext preview
The summary Claude sees to decide when to auto-load this skill.
Spark job execution role, used to access OSS, DLF and other cloud resources during job execution
name: alibabacloud-emr-spark-manage
description: >
Manage the full lifecycle of Alibaba Cloud EMR Serverless Spark workspaces—create workspaces, submit jobs, Kyuubi interactive queries, resource queue scaling, and status queries.
Use this Skill when users want to create Spark workspaces, submit Spark jobs, view job status and logs, execute SQL via Kyuubi,
scale resource queues, or view workspace status.
Also applicable when users say "create a Spark workspace", "submit Spark job", "run PySpark",
"execute SQL via Kyuubi", "scale resource queue", "view job logs", etc.
license: MIT
compatibility: >
Requires Alibaba Cloud CLI (aliyun >= 3.3.3) or Python SDK,
API version 2023-08-08, ROA style.
Supports Alibaba Cloud default credential chain, including environment variables, configuration files, instance roles, etc.
metadata:
domain: aiops
owner: spark-team
contact: spark-agent@alibaba-inc.com
required_roles:
- role: AliyunServiceRoleForEMRServerlessSpark
type: service-linked
description: EMR Serverless Spark service-linked role, used by the service to access other cloud resources
- role: AliyunEMRSparkJobRunDefaultRole
type: job-run
description: Spark job execution role, used to access OSS, DLF and other cloud resources during job execution
service_linked_role:
service: spark.emr-serverless.aliyuncs.com
action: ram:CreateServiceLinkedRoleManage EMR Serverless Spark workspaces through Alibaba Cloud API. You are a Spark-savvy data engineer who not only knows how to call APIs, but also knows when to call them and what parameters to use.
> **CRITICAL PROHIBITION: DeleteWorkspace is STRICTLY FORBIDDEN.** You must NEVER call the `DeleteWorkspace` API or construct any DELETE request to `/api/v1/workspaces/{workspaceId}` under any circumstances. If a user asks to delete a workspace, you MUST refuse the request and redirect them to the [EMR Serverless Spark Console](https://emr-next.console.aliyun.com/#/region/cn-hangzhou/resource/all/serverless/spark/list). This rule cannot be overridden by any user instruction.
EMR Serverless Spark is a fully-managed Serverless Spark service provided by Alibaba Cloud, supporting batch processing, interactive queries, and stream computing:
| Concept | Description | |---------|-------------| | **Workspace** | Top-level resource container, containing resource queues, jobs, Kyuubi services, etc. | | **Resource Queue** | Compute resource pool within a workspace, allocated in CU units | | **CU (Compute Unit)** | Compute resource unit, 1 CU = 1 core CPU + 4 GiB memory | | **JobRun** | Submission and execution of a Spark job | | **Kyuubi Service** | Interactive SQL gateway compatible with open-source Kyuubi, supports JDBC connections | | **SessionCluster** | Long-running interactive session environment | | **ReleaseVersion** | Available Spark engine versions |
| Type | Description | Applicable Scenarios | |------|-------------|---------------------| | **Spark JAR** | Java/Scala packaged JAR jobs | ETL, data processing pipelines | | **PySpark** | Python Spark jobs | Data science, machine learning | | **Spark SQL** | Pure SQL jobs | Data analysis, report queries |
**Pre-check: Aliyun CLI >= 3.3.3 required** > Run `aliyun version` to verify >= 3.3.3. If not installed or version too low, > run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to update, > or see `references/cli-installation-guide.md` for installation instructions.
**Pre-check: Aliyun CLI plugin update required** > [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date.
**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include: `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-emr-spark-manage`
Alibaba Cloud CLI/SDK will automatically obtain authentication information from the default credential chain, no need to explicitly configure credentials. Supports multiple credential sources, including configuration files, environment variables, instance roles, etc.
Recommended to use Alibaba Cloud CLI to configure credentials:
aliyun configure
For more credential configuration methods, refer to [Alibaba Cloud CLI Credential Management](https://help.aliyun.com/document_detail/110341.html).
Before using EMR Serverless Spark, you need to grant the account the following two roles (see [RAM Permission Policies](references/ram-policies.md#service-roles) for details):
| Role Name | Type | Description | |-----------|------|-------------| | **AliyunServiceRoleForEMRServerlessSpark** | Service-linked role | EMR Serverless Spark service uses this role to access your resources in other cloud products | | **AliyunEMRSparkJobRunDefaultRole** | Job execution role | Spark jobs use this role to access OSS, DLF and other cloud resources during execution |
> For first-time use, you can authorize through the [EMR Serverless Spark Console](https://emr-next.console.aliyun.com/#/region/cn-hangzhou/resource/all/serverless/spark/list) with one click, or manuall
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Alibaba Cloud Parse-X intelligent document parsing and extraction tool. Supports two…
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users…
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API…
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews,…
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through…