Skip to content
Cloud & Infrastructure
Skill

/manage-lookup-table

管理 Dataphin 数据标准码表(Lookup Table)的完整生命周期:创建、查询、更新、删除,码值列表整体覆盖式维护。 触发场景:创建码表 / 新建标准代码 / 维护码值 / 更新码表 / 删除码表 / 查看码表详情 / lookup table。 流程:get-standard-lookup-table 查询 → create-standard-lookup-table 创建 → update-standard-lookup-table 更新 → delete-standard-lookup-table 删除。 关键点:码值元素为 JSON

From plugin
alibabacloud-aiops-skills
213200 skills
Install
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill manage-lookup-table --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/manage-lookup-table

Context preview

The summary Claude sees to decide when to auto-load this skill.

管理 Dataphin 数据标准码表(Lookup Table)的完整生命周期:创建、查询、更新、删除,码值列表整体覆盖式维护。 触发场景:创建码表 / 新建标准代码 / 维护码值 / 更新码表 / 删除码表 / 查看码表详情 / lookup table。 流程:get-standard-lookup-table 查询 → create-standard-lookup-table 创建 → update-standard-lookup-table 更新 → delete-standard-lookup-table 删除。 关键点:码值元素为 JSON

SKILL.md

manage-lookup-table.SKILL.md
name: manage-lookup-table
description: |-
  管理 Dataphin 数据标准码表(Lookup Table)的完整生命周期:创建、查询、更新、删除,码值列表整体覆盖式维护。
  触发场景:创建码表 / 新建标准代码 / 维护码值 / 更新码表 / 删除码表 / 查看码表详情 / lookup table。
  流程:get-standard-lookup-table 查询 → create-standard-lookup-table 创建 → update-standard-lookup-table 更新 → delete-standard-lookup-table 删除。
  关键点:码值元素为 JSON {Value,Name,EnglishName,Description},Value/Name 必填且 ≤64 字符、Value 码表内唯一;码表名称目录内唯一、编码租户内唯一;无 list 型命令,查询按码表 ID 走 get;写操作需 HITL 确认。
  触发词:码表、标准代码、码值、代码值、lookup table、create-standard-lookup-table、LookupTableValueList。

数据标准码表管理 Skill

1. Scenario Description

在 Dataphin 资产治理「数据标准」域中管理**码表(标准代码 / Lookup Table)**。码表是一组「代码值 + 代码名称」的枚举字典(如城市码表、订单状态码表),供数据标准的值域(指定码表)引用,也是智能标准化治理(探查字段 → 抽取码表定义 → 落标)的核心产物。

本 Skill 覆盖码表的创建、查询详情、更新(含码值增删改)、删除四个原子动作。典型上游输入:对表字段做 distinct 探查得到的枚举值清单(唯一值率低、重复覆盖高的字段适合建码表)。

Architecture

用户请求 → 确认参数(名称/编码/码值清单)
  → get-standard-lookup-table 查询已有码表(按 ID,避免重复创建)
  → create-standard-lookup-table 创建(返回码表 Id)
  →(可选)update-standard-lookup-table 更新(码值列表整体覆盖)
  →(可选)delete-standard-lookup-table 删除

涉及 Dataphin OpenAPI

  • `CreateStandardLookupTable` — 创建码表(上线版本 v5.4.2)
  • `GetStandardLookupTable` — 查询码表详情
  • `UpdateStandardLookupTable` — 更新码表
  • `DeleteStandardLookupTable` — 删除码表

2. Installation

# 安装 aliyun CLI(>= 3.4.8)
# 各操作系统一键安装脚本见 ./references/cli-installation-guide.md

# 安装 dataphin-public 插件
aliyun plugin install --names aliyun-cli-dataphin-public

# 验证
aliyun dataphin-public --help

详见 [CLI 安装指南](./references/cli-installation-guide.md)。

3. Environment Variables

> 凭证与环境变量由父 skill `alibabacloud-dataphin-skills` 统一声明并预检(父 §3 + §4 Authentication + §8 Step 0,先于路由到本 skill 执行);本 skill 不重复声明。

4. Authentication

Pre-check: Credentials Required

> **Security Rules:** > - **NEVER** 读取、回显或打印凭证环境变量(禁止对 AccessKey ID / Secret 做任何输出或日志) > - **NEVER** 要求用户在本会话或命令行直接输入 AK/SK > - **NEVER** 使用 `aliyun configure set` 写入字面量凭证 > - **ONLY** 使用 `aliyun configure list` 检查凭证状态 > > ```bash > aliyun configure list > ``` > 检查输出中是否存在有效 profile(AK、STS 或 OAuth 身份)。 > > **如果没有有效 profile,请在此停止。** > 1. 从 [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) 获取凭证 > 2. 在会话外配置(终端执行 `aliyun configure`,或在 shell profile 中设置环境变量) > 3. 重新运行 `aliyun configure list` 确认有效后再继续

Pre-check: Aliyun CLI >= 3.4.8 required

> 执行 `aliyun version` 确认版本 >= 3.4.8;不达标见 [references/cli-installation-guide.md](./references/cli-installation-guide.md)。

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.

5. RAM Policy

> **[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process: > 1. Read `../../ram-policies.md` to get the full list of permissions required by this SKILL > 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions > 3. Pause and wait until the user confirms that the required permissions have been granted

本 skill 最小权限见 [../../ram-policies.md](../../ram-policies.md)。

6. IMPORTANT: Parameter Confirmation

> **IMPORTANT: Parameter Confirmation** — Before executing any command or API call, > ALL user-customizable parameters MUST be confirmed with the user. Do NOT assume or > use default values without explicit user approval.

执行任何写操作(create / update / delete)前必须向用户确认以下参数,禁止静默提交:

| 参数 | 必填 | 说明 | |------|------|------| | `--tenant-id` | 是 | 租户 ID(19 位大整数,字符串传参) | | `--standard-lookup-table-name` | 是(create/update) | 码表名称,**归属目录内唯一** | | `--code` | 是(create/update) | 码表编码,**租户内唯一** | | `--id` / `--standard-lookup-table-id` | 是(update/get/delete) | 目标码表 ID | | `--lookup-table-value-list` | 可选 | 码值列表,每个元素一个 JSON 对象(见 §类型分支) | | `--directory-reference` | 可选 | 归属目录,JSON `{"Directory":"/dir1/dir2"}` | | `--description` | 可选 | 码表描述 | | `--owner` | 可选 | 负责人用户 ID,默认为调用者 |

7. Observability

本 Skill 属于 `alibabacloud-dataphin-skills` 套件,**继承父 Skill `alibabacloud-dataphin-skills` 的 session-id**,子 Skill 不再重新生成。

所有调用 Alibaba Cloud API 的 `aliyun` 命令必须携带:

--user-agent AlibabaCloud-Agent-Skills/manage-lookup-table/{session-id}

其中 `{session-id}` 替换为父 Skill 生成的 32 位小写十六进制字符串。本地工具命令(`configure` / `plugin` / `version`)不支持该 flag,不需携带。

8. Core Workflow

TENANT_ID="<19 位租户 ID,字符串>"
SESSION_ID="<继承自 alibabacloud-dataphin-skills>"
USER_AGENT="AlibabaCloud-Agent-Skills/manage-lookup-table/$SESSION_ID"

# 1) 创建码表(返回 Data = 码表 Id,记录下来供后续操作)
aliyun dataphin-public create-standard-lookup-table --tenant-id "$TENANT_ID" \
  --standard-lookup-table-name "<码表名称,如 订单状态码表>" \
  --code "<码表编码,如 ORDER_STATUS>" \
  --description "<码表描述>" \
  --lookup-table-value-list \
    '{"Value":"1","Name":"待支付","EnglishName":"PENDING","Description":"订单已创建未支付"}' \
    '{"Value":"2","Name":"已支付","EnglishName":"PAID"}' \
  --user-agent "$USER_AGENT" --format json

# 2) 查询码表详情(--nullable=false:码表不存在时抛异常而非返回 null,便于判断)
aliyun dataphin-public get-standard-lookup-table --tenant-id "$TENANT_ID" \
  --standard-lookup-table-id "<码表 ID>" --nullable false \
  --user-agent "$USER_AGENT" --format json

# 3) 更新码表(⚠ 码值列表为整体覆盖语义:先 get 拿全量码值,改完整体回传)
aliyun dataphin-public update-standard-lookup-table --tenant-id "$TENANT_ID" \
  --id "<码表 ID>" \
  --standard-lookup-table-name "<码表名称>" \
  --code "<码表编码>" \
  --lookup-table-value-list \
    '{"Value":"1","Name":"待支付","EnglishName":"PENDING"}' \
    '{"Value":"2","Name":"已支付","EnglishName":"PAID"}' \
    '{"Value":"3","Name":"已退款","EnglishName":"REFUNDED"}' \
  --user-agent "$USER_AGENT" --format json

# 4) 删除码表(不可回滚;被标准值域引用的码表删除会失败,先解除引用)
aliyun dataphin-public delete-standard-lookup-table --tenant-id "$TENANT_ID" \
  --standard-lookup-table-id "<码表 ID>" \
  --user-agent "$USER_AGENT" --format json

类型分支:lookup-table-value-list 码值元素

`--lookup-table-value-list` 每个元素是一个 JSON 对象(C

Read more
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Get the whole plugin

Other skills on alibabacloud-aiops-skills.