Data Meshとは
Data Meshは、データ管理を分散化し、各ドメインチームが自身のデータを所有・管理するアーキテクチャアプローチです。2025年、Data Meshは理論からビジネスクリティカルな戦略へと進化しました。
4つの基本原則
1. ドメイン指向の分散データ所有
従来(中央集権型):
全データ → 中央データチーム → 消費者
Data Mesh:
営業データ → 営業チーム → 消費者
マーケティングデータ → マーケチーム → 消費者
製品データ → 製品チーム → 消費者
2. データをプロダクトとして扱う
data_product:
name: "customer-360"
owner: "customer-domain-team"
description: "統合顧客プロファイル"
sla:
freshness: "< 1 hour"
availability: "99.9%"
quality_score: "> 95%"
schema:
version: "2.0"
fields:
- name: customer_id
type: string
description: "一意の顧客識別子"
- name: lifetime_value
type: decimal
description: "顧客生涯価値"
access:
discovery: "data-catalog"
interface: ["SQL", "API", "Event Stream"]
documentation: "https://docs.company.com/customer-360"
3. セルフサービスデータインフラ
プラットフォームチームが提供:
・データストレージ(自動プロビジョニング)
・パイプラインツール(Airflow, dbt)
・品質チェック(Great Expectations)
・カタログ・発見(DataHub, Atlan)
・アクセス制御(統合IAM)
ドメインチームが利用:
・インフラの詳細を意識せず
・データプロダクトの構築に集中
4. フェデレーテッド計算ガバナンス
# 連合ガバナンスの概念
class FederatedGovernance:
"""
グローバルポリシーをローカルで実行
"""
def __init__(self):
self.global_policies = load_global_policies()
self.domain_policies = {}
def validate_data_product(self, product):
"""
データプロダクトのコンプライアンスチェック
"""
results = []
# グローバルポリシー適用
for policy in self.global_policies:
results.append(policy.evaluate(product))
# ドメイン固有ポリシー適用
domain_policy = self.domain_policies.get(product.domain)
if domain_policy:
results.append(domain_policy.evaluate(product))
return all(r.passed for r in results)
アーキテクチャ比較
従来のデータアーキテクチャ
graph TB
subgraph 従来のアーキテクチャ
A1[営業DB] --> DWH[中央データウェアハウス<br/>中央チームが管理]
A2[マーケDB] --> DWH
A3[製品DB] --> DWH
DWH --> Consumer[消費者]
end
Data Meshアーキテクチャ
graph TB
subgraph Data_Meshアーキテクチャ["Data Meshアーキテクチャ"]
subgraph D1["営業ドメイン"]
P1[データプロダクト]
end
subgraph D2["マーケドメイン"]
P2[データプロダクト]
end
subgraph D3["製品ドメイン"]
P3[データプロダクト]
end
P1 --> Platform[セルフサービスプラットフォーム<br/>プラットフォームチーム]
P2 --> Platform
P3 --> Platform
end
実装例
dbtによるデータプロダクト
-- models/marts/customer_360.sql
{{
config(
materialized='table',
schema='customer_domain',
tags=['data_product', 'customer_360'],
meta={
'owner': 'customer-team',
'sla_freshness_hours': 1,
'pii_columns': ['email', 'phone']
}
)
}}
WITH customers AS (
SELECT * FROM {{ ref('stg_customers') }}
),
orders AS (
SELECT * FROM {{ ref('stg_orders') }}
),
customer_metrics AS (
SELECT
customer_id,
COUNT(*) as total_orders,
SUM(amount) as lifetime_value,
MAX(order_date) as last_order_date
FROM orders
GROUP BY customer_id
)
SELECT
c.customer_id,
c.email,
c.segment,
m.total_orders,
m.lifetime_value,
m.last_order_date
FROM customers c
LEFT JOIN customer_metrics m ON c.customer_id = m.customer_id
データ品質チェック
# Great Expectationsによる品質保証
from great_expectations.core import ExpectationSuite
customer_360_suite = ExpectationSuite(
expectation_suite_name="customer_360_quality"
)
# 必須フィールドの検証
customer_360_suite.add_expectation(
expectation_type="expect_column_values_to_not_be_null",
kwargs={"column": "customer_id"}
)
# 値の範囲検証
customer_360_suite.add_expectation(
expectation_type="expect_column_values_to_be_between",
kwargs={
"column": "lifetime_value",
"min_value": 0,
"max_value": 10000000
}
)
# 鮮度検証
customer_360_suite.add_expectation(
expectation_type="expect_column_max_to_be_between",
kwargs={
"column": "last_order_date",
"min_value": datetime.now() - timedelta(days=1),
"max_value": datetime.now()
}
)
データカタログ登録
# DataHub登録例
- entityUrn: "urn:li:dataset:(urn:li:dataPlatform:snowflake,customer_domain.customer_360,PROD)"
entityType: dataset
aspectName: datasetProperties
aspect:
description: "統合顧客プロファイル - Customer 360ビュー"
customProperties:
domain: "customer"
owner: "customer-team"
sla: "1 hour freshness"
data_product: "true"
- entityUrn: "urn:li:dataset:(urn:li:dataPlatform:snowflake,customer_domain.customer_360,PROD)"
entityType: dataset
aspectName: glossaryTerms
aspect:
terms:
- urn: "urn:li:glossaryTerm:PII"
- urn: "urn:li:glossaryTerm:CustomerData"
導入のチャレンジ
組織的課題
課題:
・文化的シフト(中央集権→分散)
・チームのスキルアップ
・データ所有権の明確化
・調整コストの増加
対策:
・段階的な移行
・教育とサポート
・明確なガイドライン
・プラットフォームチームの支援
技術的課題
challenges:
complexity:
description: "アーキテクチャの複雑化"
mitigation: "セルフサービスプラットフォームで抽象化"
consistency:
description: "データの一貫性確保"
mitigation: "フェデレーテッドガバナンスと標準化"
discovery:
description: "データの発見性"
mitigation: "統合カタログとメタデータ管理"
市場動向
Gartnerレポートによると:
2025年までに85%の組織がクラウドファースト戦略を採用し、Data Meshはスケーラビリティ、効率性、ガバナンスにおいて重要な役割を果たす。
ベストプラクティス
成功の鍵
1. 小さく始める
- 1-2ドメインでパイロット
- 成功事例を作る
- 段階的に拡大
2. プラットフォームに投資
- セルフサービス化
- 開発者体験の向上
- 自動化の推進
3. ガバナンスのバランス
- 過度な制御を避ける
- 標準化と柔軟性のバランス
- 実用的なポリシー
4. 文化の醸成
- データリテラシー向上
- 所有権意識の育成
- コラボレーション促進
まとめ
2025年のData Meshは、分散型データ管理のスタンダードとして確立されました。ドメイン指向の所有権、データプロダクト思考、セルフサービスインフラ、フェデレーテッドガバナンスの4原則を実践することで、スケーラブルで俊敏なデータアーキテクチャを実現できます。組織の成熟度に応じた段階的導入が成功の鍵です。
← 一覧に戻る