Powered by Zoomin Software. For more details please contactZoomin

MarkLogic Data Hub

エンベロープパターン

  • Last Updated: April 5, 2026
  • 3 minute read

エンベロープパターン

概要

MarkLogicデータハブは、エンベロープパターンを使用してデータをカプセル化します。エンベロープパターンでは、元のコンテンツと関連するメタデータが同じエンベロープ(エンティティ)に格納されますが、分離性は維持されます。これにより、元のコンテンツを維持しながら、メタデータを追加できます。

JSON

{ "envelope": { "headers": [], "triples": [], "instance": { "your original data": "goes here" } } }

XML

<envelope><headers/><triples/><instance> your original data goes here </instance></envelope>

例:エンベロープパターン

MarkLogicデータハブでは、元のデータを維持しながら、メタデータをエンベロープに追加して、フィールド名や形式の異なるデータをハーモナイズできます。

例えば、2つのデータソースに性別情報があり、格納されているフィールドの名前と形式が異なっている場合を考えます。

source-1.json source-2.json
```json { "gender": "f", "age": "32", ..., "firstName": "Rebecca" } ``` ```json { "gndr": "female", "age": "39", ..., "firstName": "Leona" } ```

エンベロープを使用すると、フィールドを1つのフィールドに標準化して、同じエンベロープ内にメタデータとして保存できます。

harmonized-1.json harmonized-2.json
```json { "headers": [ { "normalizedGender": "female" } ], "triples": [], "instance": { "gender": "f", "age": "32", ..., "firstName": "Rebecca" } } ``` ```json { "headers": [ { "normalizedGender": "female" } ], "triples": [], "instance": { "gndr": "female", "age": "39", ..., "firstName": "Leona" } } ```

アプリケーションは、データソースにかかわらず、同じフィールド名(normalizedGender)を使用してデータハブに対してクエリを実行し、同じ形式(female)で結果を取得できるようになります。

TitleResults for “How to create a CRG?”Also Available inAlert