声明式映射规则生成器

SKILL开发

原名 mapping-dsl-builder · 标识 mapping_dsl_builder

开发 未标注权限 许可证不明确
安装这个技能

用类似 R2RML 的领域映射语言,把结构化数据源转换成图三元组或节点,自动生成声明式映射规则,省去手写映射配置的麻烦。

一句话选型结论

按资料字段整理

声明式映射规则生成器是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_15292d5a/yjkj-mapping-dsl-builder
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_15292d5a仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量9.3 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

0 项能力
上游给出的能力概览与适用场景
生成数据映射规则结构化数据转图模型映射配置编写

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
声明式映射规则生成器当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

9.3 KB
模型实际读到的说明书原文,来自技能仓库

Mapping DSL Builder

Generate declarative mapping rules for transforming data into graph structures.

This skill creates domain-specific language (DSL) mappings that define how data fields from structured sources such as databases, CSV files, JSON, or APIs should be transformed into nodes, relationships, and triples for graph databases or knowledge graphs. The mapping language functions similarly to R2RML, the standard for relational-to-RDF mappings.

Quick Start

Use When

  • Defining mappings between structured datasets and graph models
  • Creating declarative transformation rules
  • Converting relational schemas into RDF triples
  • Building graph ingestion mapping specifications
  • Generating reusable data-to-graph mapping configurations
  • Standardizing ETL transformation definitions

Inputs

  • Source schema definitions (database, CSV, JSON, API)
  • Entity type specifications
  • Column/property definitions
  • Foreign key relationships
  • Identifier specifications
  • Mapping rules and transformations
  • Target graph schema

Outputs

  • Custom Mapping DSL specifications
  • R2RML (RDF Mapping Language) definitions
  • YAML mapping configurations
  • JSON mapping specifications
  • Property graph mappings
  • Executable mapping configurations
  • Data transformation documentation

Example

Input Database Schema:

CREATE TABLE employee (
  id INT,
  name VARCHAR(255),
  email VARCHAR(255),
  company_id INT
);

CREATE TABLE company (
  id INT,
  name VARCHAR(255),
  industry VARCHAR(100)
);

Generated Mapping DSL:

mapping: EmployeeMapping
version: 1.0

source:
  type: database
  table: employee
  connection: postgresql://localhost/company_db

entity:
  type: Person
  identifier: id
  uri_template: "http://example.org/person/{id}"

properties:
  - source: name
    target: http://xmlns.com/foaf/0.1/name
    type: string
  - source: email
    target: http://xmlns.com/foaf/0.1/mbox
    type: string

relationships:
  - name: WORKS_AT
    source: company_id
    target: Company
    target_identifier: id

Mapping DSL Architecture

1. Source Definition

Purpose: Specify where data comes from

Types Supported:
- Database - SQL databases (PostgreSQL, MySQL, Oracle)
- CSV - Comma/delimiter-separated files
- JSON - JSON files or documents
- API - REST API endpoints
- Streaming - Real-time data streams

Configuration:

source:
  type: database|csv|json|api|stream
  connection_string: connection_details
  table_or_location: specification
  format: format_options

2. Entity Mapping

Purpose: Define how records map to graph entities

Components:
- Type - Entity type/label (Person, Organization, etc.)
- Identifier - Column(s) that uniquely identify records
- URI Template - Pattern for generating entity URIs
- Properties - Attributes to include

Configuration:

entity:
  type: EntityType
  identifier: id_column
  uri_template: "http://example.org/type/{id}"
  namespace: http://example.org/

3. Property Mapping

Purpose: Map source attributes to graph properties

Details:
- Source column name
- Target property URI
- Data type
- Transformations (optional)
- Default values (optional)

Configuration:

properties:
  - source: database_column
    target: http://schema.org/propertyName
    type: string|integer|date
    transformation: function_name
    required: true|false

4. Relationship Mapping

Purpose: Define relationships between entities

Details:
- Relationship name/type
- Source column (foreign key)
- Target entity
- Cardinality
- Direction

Configuration:

relationships:
  - name: RELATIONSHIP_TYPE
    source: foreign_key_column
    target: TargetEntity
    target_identifier: target_id
    cardinality: "1..1"|"1..*"|"*..1"|"*..*"
    direction: forward|backward|bidirectional

Mapping Patterns

Database Mapping Pattern

Pattern: Map relational table to graph entity

source:
  type: database
  table: employee
relationships:
  - name: WORKS_AT
    source: company_id (foreign key)
    target: Company entity

CSV Mapping Pattern

Pattern: Map CSV columns to graph properties

source:
  type: csv
  file: data/employees.csv
  delimiter: ","
entity:
  identifier: person_id (unique column)
properties:
  - source: name
    target: foaf:name

JSON Mapping Pattern

Pattern: Map JSON properties to graph structure

source:
  type: json
  path: $.employees[*]
entity:
  identifier: $.id
properties:
  - source: $.name
    target: http://example.org/name

Nested Object Mapping Pattern

Pattern: Handle nested structures

source:
  type: json
  path: $.employees[*]
relationships:
  - name: HAS_ADDRESS
    source: $.address (nested object)
    target: Address
    inline: true

Output Formats

Custom Mapping DSL

mapping: PersonMapping
version: 1.0

source:
  type: csv
  file: people.csv

entity:
  type: Person
  identifier: person_id

properties:
  - source: name
    target: foaf:name
  - source: email
    target: foaf:mbox

relationships:
  - name: WORKS_AT
    source: company_id
    target: Company

R2RML Format

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.org/> .

ex:EmployeeMapping a rr:TriplesMap ;
  rr:logicalTable [ rr:tableName "employee" ] ;
  rr:subjectMap [
    rr:template "http://example.org/person/{id}" ;
    rr:class foaf:Person
  ] ;
  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [ rr:column "name" ]
  ] ;
  rr:predicateObjectMap [
    rr:predicate foaf:workplaceHomepage ;
    rr:objectMap [
      rr:parentTriplesMap ex:CompanyMapping ;
      rr:joinCondition [ rr:child "company_id" ; rr:parent "id" ]
    ]
  ] .

YAML Format

version: 1.0
mappings:
  - name: PersonMapping
    source:
      type: database
      table: person
    entity:
      type: Person
      id: person_id
    properties:
      name: name
      email: email_address
    relationships:
      works_at:
        target: Company
        foreign_key: company_id

Data Type Support

Supported Types

  • string - Text data
  • integer - Whole numbers
  • decimal - Floating point numbers
  • boolean - True/false values
  • date - Date values (YYYY-MM-DD)
  • datetime - Date and time
  • uri - Uniform resource identifiers
  • custom - User-defined types

Type Mapping

Relational → RDF Type Mapping
INTEGER → xsd:integer
VARCHAR → xsd:string
DATE → xsd:date
DECIMAL → xsd:decimal
BOOLEAN → xsd:boolean

Transformation Functions

Built-in Transformations

concat(field1, field2)    - Concatenate fields
uppercase(field)          - Convert to uppercase
lowercase(field)          - Convert to lowercase
substring(field, 0, 5)    - Extract substring
replace(field, old, new)  - Replace values
regex(field, pattern)     - Regex matching
split(field, delimiter)   - Split string
trim(field)               - Remove whitespace

Execution Steps

  1. Analyze Source Schema – Detect structure and data types
  2. Identify Entities – Find key identifiers
  3. Detect Relationships – Recognize foreign keys
  4. Map Properties – Associate columns to properties
  5. Generate URIs – Create entity identifiers
  6. Define Transformations – Apply any conversions
  7. Validate Mapping – Check for consistency
  8. Generate Output – Produce mapping specifications

Recommended Libraries

  • Mapping Processing: rdflib, r2rml-processor, morph-kgc
  • DSL Generation: pyparsing, lark, textx
  • Schema Analysis: sqlalchemy, pandas, jsonschema
  • RDF Generation: rdflib, sparql-client
  • YAML/Config: pyyaml, toml, configparser
  • Database: sqlalchemy, psycopg2, pymongo

Best Practices

✓ Use consistent URI templates
✓ Choose meaningful identifiers
✓ Document mapping rationale
✓ Normalize property names
✓ Handle missing values explicitly
✓ Test mappings with sample data
✓ Version mapping configurations
✓ Document transformations
✓ Validate schemas before mapping
✓ Keep mappings reusable

Integration with Downstream Skills

Generated mappings are used by:

  • ETL Pipeline Generator – Execute mappings in pipelines
  • JSON to Triples Converter – Transform JSON using mappings
  • CSV Graph Loader Generator – Load CSV with defined mappings
  • Graph Schema Validation – Validate mapped data
  • Graph Constraint Generator – Apply constraints to mapped data

References

See mapping-patterns.md for detailed mapping design patterns and example-mappings.md for complete real-world examples.


Version: 1.0.0

常见问题

5 问
答案由本站依据条目字段整理
声明式映射规则生成器怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_15292d5a/yjkj-mapping-dsl-builder。安装方式为未标注。装完刷新技能列表或重开客户端。

声明式映射规则生成器支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

声明式映射规则生成器权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

声明式映射规则生成器收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

声明式映射规则生成器用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。