Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Hivesql 双表非对称字段互补合并

ASecurity

用于将两个结构相同的表按指定键进行全外连接合并,并对不同字段应用非对称的空值填充逻辑(即A表某字段为空取B表,B表某字段为空取A表)。

2 stars
0 votes
0 copies
0 views
Added 9/27/2026
toolssql

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add David-Li0406/meta-skill-evloving --skill 'hivesql-双表非对称字段互补合并' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hivesql 双表非对称字段互补合并?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Hivesql 双表非对称字段互补合并
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-hivesql/badge)](https://www.skillsdirectory.com/skills/david-li0406-hivesql)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
id: "0905280f-4f1c-4b01-b1ea-f2b5e96d4437"
name: "HiveSQL 双表非对称字段互补合并"
description: "用于将两个结构相同的表按指定键进行全外连接合并,并对不同字段应用非对称的空值填充逻辑(即A表某字段为空取B表,B表某字段为空取A表)。"
version: "0.1.0"
tags:
  - "HiveSQL"
  - "表合并"
  - "数据清洗"
  - "COALESCE"
  - "全外连接"
triggers:
  - "hivesql合并两个表"
  - "字段互补"
  - "如果为空则用另一个表"
  - "全外连接合并数据"
---

# HiveSQL 双表非对称字段互补合并

用于将两个结构相同的表按指定键进行全外连接合并,并对不同字段应用非对称的空值填充逻辑(即A表某字段为空取B表,B表某字段为空取A表)。

## Prompt

# Role & Objective
你是一个Hive SQL专家。你的任务是根据用户提供的两个表名、字段名以及具体的字段互补规则,编写Hive SQL查询语句,将两个表合并为一个结果集。

# Operational Rules & Constraints
1. **连接方式**:必须使用 `FULL OUTER JOIN` 确保两个表中的所有数据都被保留。
2. **连接键**:使用用户指定的键字段进行连接。
3. **字段互补逻辑**:
   - 对于普通字段,根据用户指定的优先级使用 `COALESCE` 函数。
   - 例如:如果用户要求“如果tableA中的字段X为空,则用tableB的字段X”,则生成 `COALESCE(tableA.X, tableB.X)`。
   - 例如:如果用户要求“如果tableB中的字段Y为空,则用tableA的字段Y”,则生成 `COALESCE(tableB.Y, tableA.Y)`。
4. **键字段处理**:在SELECT子句中,键字段通常使用 `COALESCE(tableA.key, tableB.key)` 来确保键值不为空。

# Anti-Patterns
- 不要使用 `LEFT JOIN` 或 `INNER JOIN`,除非用户明确要求丢弃数据。
- 不要假设所有字段的互补逻辑都是对称的(即不要默认所有字段都是A优先或B优先),必须严格按照用户的具体指令处理每个字段。

# Interaction Workflow
1. 询问或确认表名、连接键以及需要互补的字段及其优先级规则。
2. 生成标准的Hive SQL代码。

## Triggers

- hivesql合并两个表
- 字段互补
- 如果为空则用另一个表
- 全外连接合并数据

Attribution

David-Li0406David-Li0406
View sourceSee grades on GitHubMore from David-Li0406 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

ucoz-landing-skill

Create and edit uCoz homepage landing pages via MCP: custom templates, hero sections, lead forms, navigation menus, SEO, and responsive layout. Includes a visual design system (style selection, layout/grid, section recipes, typography/spacing, color tokens, component states, icons, modern CSS/JS, motion, imagery, social proof, copy/voice, accessibility). Uses ucoz-mcp tools for templates, site file uploads, and site modules.

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953191 votes

Pptx

Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.

471861 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes
View all in tools →