Skip to content

Example bundle

examples/acme-knowledge/ is a conformant six-concept reference bundle for a fictional data org. It exercises every headline feature: typed relationships, type-specific fields, authorship, and citations.

examples/acme-knowledge/
├── index.md # bundle root: base_iri, context, publisher
├── log.md
├── datasets/events.md # Dataset
├── tables/user-events.md # Table with a fields: schema
├── metrics/weekly-active-users.md # Metric with formula, unit, provenance
├── glossary/active-user.md # GlossaryTerm with definition
├── playbooks/data-freshness-incident.md # Playbook
└── services/analytics-api.md # Service with endpoint

Six markdown files, one knowledge graph. Every edge below is a typed frontmatter field, not prose:

graph LR
    WAU["Metric<br/>weekly-active-users"]
    UE["Table<br/>user-events"]
    EV["Dataset<br/>events"]
    AU["GlossaryTerm<br/>active-user"]
    PB["Playbook<br/>data-freshness-incident"]
    API["Service<br/>analytics-api"]

    WAU -- "prov:wasDerivedFrom" --> UE
    WAU -- "dcterms:requires" --> AU
    WAU -- "lokf:measures" --> AU
    UE -- "dcterms:isPartOf" --> EV
    EV -- "schema:hasPart" --> UE
    PB -- "schema:about" --> UE
    PB -- "dcterms:references" --> WAU
    API -- "schema:about" --> WAU

The bundle’s north-star metric, exactly as committed:

metrics/weekly-active-users.md
---
type: Metric
id: https://acme.example/knowledge/metrics/weekly-active-users
title: Weekly Active Users
description: Distinct users with at least one qualifying event in a trailing 7-day window.
unit: users
formula: COUNT(DISTINCT user_id) over trailing 7 days WHERE event_name IN qualifying_events
resource: https://looker.acme.example/looks/wau
tags: [growth, engagement, north-star]
timestamp: 2026-06-30T12:00:00Z
created: 2026-01-15T09:00:00Z
version: "2.1"
author:
- type: Person
id: https://acme.example/people/jsmith
name: Jordan Smith
email: jsmith@acme.example
measures:
- https://acme.example/knowledge/glossary/active-user
derivedFrom:
- https://acme.example/knowledge/tables/user-events
dependsOn:
- https://acme.example/knowledge/glossary/active-user
citations:
- title: Metric definitions RFC
url: https://wiki.acme.example/rfc/metric-defs
---
# Definition
**Weekly Active Users (WAU)** is the count of distinct `user_id`s that produced at
least one [qualifying event](/glossary/active-user.md) during the trailing 7-day
window, computed from [User Events](/tables/user-events.md).
# Notes
- The window is rolling, not calendar-aligned.
- Internal test accounts are excluded.
# Citations
[1] [Metric definitions RFC](https://wiki.acme.example/rfc/metric-defs)

Attach the generated context and expand, and that one file yields these triples (examples/weekly-active-users.nt, committed output of just build):

examples/weekly-active-users.nt
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/keywords> "engagement" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/author> <https://acme.example/people/jsmith> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/keywords> "growth" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/keywords> "north-star" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/lokf/Metric> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://purl.org/dc/terms/requires> <https://acme.example/knowledge/glossary/active-user> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/version> "2.1" .
_:Na1920901c953462883f36555212ad1d3 <http://schema.org/name> "Metric definitions RFC" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/description> "Distinct users with at least one qualifying event in a trailing 7-day window." .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/citation> _:Na1920901c953462883f36555212ad1d3 .
<https://acme.example/people/jsmith> <http://schema.org/email> "jsmith@acme.example" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/dateCreated> "2026-01-15T09:00:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<https://acme.example/people/jsmith> <http://schema.org/name> "Jordan Smith" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/url> "https://looker.acme.example/looks/wau"^^<http://www.w3.org/2001/XMLSchema#anyURI> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://www.w3.org/ns/prov#wasDerivedFrom> <https://acme.example/knowledge/tables/user-events> .
_:Na1920901c953462883f36555212ad1d3 <http://schema.org/url> "https://wiki.acme.example/rfc/metric-defs"^^<http://www.w3.org/2001/XMLSchema#anyURI> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/name> "Weekly Active Users" .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/dateModified> "2026-06-30T12:00:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<https://acme.example/knowledge/metrics/weekly-active-users> <https://w3id.org/lokf/formula> "COUNT(DISTINCT user_id) over trailing 7 days WHERE event_name IN qualifying_events" .
<https://acme.example/people/jsmith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
<https://acme.example/knowledge/metrics/weekly-active-users> <https://w3id.org/lokf/measures> <https://acme.example/knowledge/glossary/active-user> .
<https://acme.example/knowledge/metrics/weekly-active-users> <http://schema.org/unitText> "users" .
Terminal window
just build

assembles the bundle (examples/acme-knowledge.bundle.json), validates it against the KnowledgeBundle root — No issues found — and re-emits both RDF projections: examples/acme-knowledge.nt (86 triples for the whole bundle) and examples/weekly-active-users.nt (22 triples for the metric alone).