Aller au contenu principal

:::caution Not yet deployed β€” planned for a future phase OpenMetadata has not been deployed on this cluster. This is a design reference doc. :::

OpenMetadata β€” Data Catalog, Lineage & Governance

OpenMetadata is the unified data catalog that auto-discovers all data assets (ClickHouse tables, dbt models, Airflow pipelines, Kafka topics), builds an automatic lineage graph, tracks data quality, and provides a searchable catalog for the entire data team.


What OpenMetadata Provides​

FeatureDescription
Asset DiscoveryAuto-crawls ClickHouse, Kafka, dbt, Airflow, Superset
Data LineageVisual graph: Kafka β†’ ClickHouse β†’ dbt β†’ Superset
Data QualityDefine and run tests on table columns
GlossaryBusiness terms linked to physical columns
OwnershipEvery table has an owner team and contact
PII ClassificationAuto-tags columns containing PII data
Data ContractsDefine expectations for producer/consumer agreements

Install OpenMetadata​

# Add Helm repo
helm repo add open-metadata https://helm.open-metadata.org
helm repo update

values-openmetadata.yaml​

# values-openmetadata.yaml
openmetadata:
config:
authentication:
provider: "custom-oidc"
publicKeyUrls:
- "https://auth.devandre.sbs/application/o/openmetadata/jwks/"
authority: "https://auth.devandre.sbs/application/o/openmetadata/"
clientId: "openmetadata"
callbackUrl: "https://catalog.yourdomain.com/callback"

authorizer:
className: "org.openmetadata.service.security.DefaultAuthorizer"
containerRequestFilter: "org.openmetadata.service.security.JwtFilter"
initialAdmins:
- "platform-admin@yourdomain.com"

ingress:
enabled: true
className: nginx
hosts:
- host: catalog.yourdomain.com
paths:
- path: /
pathType: Prefix

# OpenMetadata requires MySQL + Elasticsearch
mysql:
enabled: true
auth:
rootPassword: "OpenMetaRoot123!"
database: openmetadata_db
username: openmetadata
password: "OpenMetaPass123!"

elasticsearch:
enabled: true
replicas: 1
resources:
requests:
memory: "2Gi"
limits:
memory: "3Gi"
kubectl create namespace data-catalog

helm upgrade --install openmetadata open-metadata/openmetadata \
--namespace data-catalog \
--values values-openmetadata.yaml \
--wait --timeout 15m

Connect Data Sources (Ingestion Connectors)​

ClickHouse Connector​

# Via OpenMetadata UI: Settings β†’ Services β†’ Databases β†’ Add New Service
# Or via API:

source:
type: clickhouse
serviceName: clickhouse-warehouse
serviceConnection:
config:
type: Clickhouse
hostPort: "clickhouse-clickhouse.data-warehouse.svc:8123"
username: superset
password: "{{ env('CLICKHOUSE_PASSWORD') }}"
database: analytics

sourceConfig:
config:
type: DatabaseMetadata
markDeletedTables: true
includeTables: true
includeViews: true
schemaFilterPattern:
includes:
- analytics
- raw

sink:
type: metadata-rest
config: {}

workflowConfig:
openMetadataServerConfig:
hostPort: "http://openmetadata.data-catalog.svc:8585/api"
authProvider: openmetadata
securityConfig:
jwtToken: "{{ env('OM_JWT_TOKEN') }}"

Kafka/Redpanda Connector​

source:
type: redpanda
serviceName: redpanda-platform
serviceConnection:
config:
type: Redpanda
bootstrapServers: "redpanda-0.redpanda.data-platform.svc:9093"
schemaRegistryURL: "http://redpanda-schema-registry.data-platform.svc:8081"

sourceConfig:
config:
type: MessagingMetadata
topicFilterPattern:
includes:
- "orders.*"
- "payments.*"
- "users.*"

dbt Connector​

source:
type: dbt
serviceName: dbt-clickhouse
serviceConnection:
config:
type: dbt
dbtConfigSource:
dbtConfigType: local
dbtCatalogFilePath: /dbt/target/catalog.json
dbtManifestFilePath: /dbt/target/manifest.json
dbtRunResultsFilePath: /dbt/target/run_results.json

Airflow Connector​

source:
type: airflow
serviceName: airflow-platform
serviceConnection:
config:
type: Airflow
hostPort: "http://airflow-webserver.automation.svc:8080"
numberOfStatus: 10
connection:
type: Backend

Run Ingestion Pipelines​

# Run all connectors via OpenMetadata ingestion framework
kubectl run om-ingestion \
--image=openmetadata/ingestion:1.3.0 \
--namespace=data-catalog \
--restart=Never \
--rm -it \
-- python main.py --config /configs/clickhouse-ingestion.yaml

Or schedule via the OpenMetadata UI:

Settings β†’ Services β†’ clickhouse-warehouse
β†’ Ingestion β†’ Add Ingestion
β†’ Type: Metadata Ingestion
β†’ Schedule: Every 6 hours
β†’ Deploy

Automatic Data Lineage​

After ingesting ClickHouse + dbt + Superset, OpenMetadata auto-builds lineage:

[Kafka Topic] orders.order.created
β”‚
β–Ό (Kafka Engine)
[ClickHouse Table] raw.kafka_orders
β”‚
β–Ό (dbt stg_orders)
[dbt Model] analytics.stg_orders
β”‚
β–Ό (dbt int_order_enriched)
[dbt Model] analytics.int_order_enriched
β”‚
β–Ό (dbt mart_orders)
[dbt Model] analytics.mart_orders
β”‚
β–Ό (Superset Dataset)
[Superset Dashboard] Orders KPIs

Visible at: catalog.yourdomain.com β†’ Explore β†’ mart_orders β†’ Lineage


Data Quality Tests​

# Via UI: Table β†’ Profiler β†’ Add Test

testSuite:
name: "orders-quality-suite"
executableEntityReference: "analytics.mart_orders"

testCases:
- name: "total_revenue_non_negative"
testDefinitionName: columnValuesToBeBetween
columnName: total_revenue
parameterValues:
- name: minValue
value: "0"

- name: "orders_freshness"
testDefinitionName: tableRowCountToBeBetween
parameterValues:
- name: minValue
value: "1"
description: "At least 1 row ingested today"

Business Glossary​

Link business terms to physical columns:

Glossary β†’ Platform Glossary β†’ + Term
β†’ Name: "Revenue"
β†’ Description: "Sum of fulfilled order amounts in USD, excluding refunds"
β†’ Tag: Finance
β†’ Related Terms: GMV, Net Revenue

Then: analytics.mart_orders β†’ total_revenue column β†’ Add Glossary Term: "Revenue"

PII Auto-Classification​

OpenMetadata auto-tags columns matching PII patterns:

user_id β†’ PII.NonSensitive (identifier)
email β†’ PII.Sensitive
ip_address β†’ PII.Sensitive
amount β†’ Financial

These tags feed into OPA policies that restrict direct SELECT access to PII columns.


Done When​

βœ” OpenMetadata running at catalog.yourdomain.com
βœ” Authentik SSO login working
βœ” ClickHouse, Kafka, dbt, Airflow all ingested
βœ” Full lineage visible: Kafka β†’ ClickHouse β†’ dbt β†’ Superset
βœ” Data quality tests passing for mart_orders
βœ” Business glossary terms linked to mart columns
βœ” PII columns auto-tagged across all datasets