GoogleCloudPlatform / GoogleCloudPlatform/knowledge-catalog

Proposal: Lightweight mechanism to include RDF in OKF

Open
#98 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9.2k
Forks
782
Avg merge
6h 36m
Merged PRs (30d)
85

Description

RDF is well known and used (for example via [schema.org](https://schema.org)) for describing semantics in a formalized manner that permits, amongst other things

- global uniqueness of concepts (via use of domain names in identifiers)
- expression of equivalence (via sameAs etc)
- complex assertions such as disjoint membership, transitive properties etc (via OWL etc)

Permitting the embedding of RDF into OKF markdown files would allow inclusion of assertions
out to wider RDF Graphs that can be included in any resulting graph created by extraction
from the OKF files.

Happily we can combine the two using concepts from the RDFa standard
Since markdown permits HTML fragments, we propose using RDFa inline in the markdown to achieve
this. Further we suggest defining an ontology for OKF such that the YAML members bind to
predicates within that ontology.

All this is probably best shown with an example. Given this OKF file:
~~~
---
type: BigQuery Table
title: Company Fundamentals
description: One row per company
resource: https://console.cloud.google.com/bigquery?p=acme&d=marketdata&t=latest_fundamentals
tags: [fundamentals, marketdata]
timestamp: 2026-06-17T14:30:00Z
base: https://catalog.nonodename.com/tables/marketdata/latest_fundamentals
prefixes:
okf: https://okf.dev/ns#
owl: http://www.w3.org/2002/07/owl#
rdfs: http://www.w3.org/2000/01/rdf-schema#
qudt: http://qudt.org/schema/qudt/
qkind: http://qudt.org/vocab/quantitykind/
so: https://schema.org/
dcterms: http://purl.org/dc/terms/
fibo: https://spec.edmcouncil.org/fibo/ontology/FND/OwnershipAndControl/Ownership/
---

# Schema

| Column | Type | Description |
|--------|------|-------------|
| `company_id` | STRING | Globally unique company identifier. |
| `company_name` | STRING | Name of the company. |
| `total_assets` | NUMERIC | The total value of everything a company owns. See FIBO Asset. |
| `reporting_currency` | STRING | The currency the company reports in, as the QUDT currency kind. |

# Joins

Joined with
marketdata prices
on `company_id`.

# Data Steward

Contact
nonodename.

# Citations

[1]BigQuery table schema

~~~

We could map directly to RDF, expressed as turtle here:

~~~
@base .
@prefix okf: .
@prefix dcterms: .
@prefix so: .
@prefix owl: .
@prefix rdfs: .
@prefix qudt: .
@prefix qkind: .
@prefix fibo: .
@prefix xsd: .

<> a okf:BigQueryTable ;
dcterms:title "Company Fundamentals" ;
dcterms:description "One row per company" ;
okf:resource ;
so:keywords "fundamentals", "marketdata" ;
dcterms:modified "2026-06-17T14:30:00Z"^^xsd:dateTime ;
okf:hasColumn <#company_id>, <#company_name>, <#total_assets>, <#reporting_currency> ;
okf:joinsWith ;
so:owner ;
dcterms:source .

<#company_id> a okf:Column ;
okf:name "company_id" ;
okf:nativeType "STRING" ;
dcterms:description "Globally unique company identifier." .

<#company_name> a okf:Column ;
okf:name "company_name" ;
okf:nativeType "STRING" ;
dcterms:description "Name of the company." ;
so:rangeIncludes so:Organization .

<#total_assets> a okf:Column ;
okf:name "total_assets" ;
okf:nativeType "NUMERIC" ;
dcterms:description "The total value of everything a company owns (both current and long-term assets)." ;
rdfs:seeAlso fibo:Asset .

<#reporting_currency> a okf:Column ;
okf:name "reporting_currency" ;
okf:nativeType "STRING" ;
dcterms:description "The currency the company reports in." ;
qudt:hasQuantityKind qkind:Currency .
~~~

The only real handwaving here is around how columns are found (not explicity tagged, found by convention).
Could also use existing ontologies for some of the invented OKF ontology, for example CSVW

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.