# The Semantic Medallion: Building a Knowledge Graph-Powered Data Catalog Source article: [https://moderndata101.substack.com/p/the-semantic-medallion](https://moderndata101.substack.com/p/the-semantic-medallion) Companion HTML: [semantic-medallion-gpt5-chat-1.html](semantic-medallion-gpt5-chat-1.html) Companion RDF Turtle: [../rdf/semantic-medallion-gpt5-chat-1.ttl](../rdf/semantic-medallion-gpt5-chat-1.ttl) Companion JSON-LD: [../rdf/semantic-medallion-gpt5-chat-1.jsonld](../rdf/semantic-medallion-gpt5-chat-1.jsonld) ## Overview This collection models the article's Semantic Medallion pattern as executable RDF. The generated graph includes a lightweight ontology, representative customer, billing, contract, source, DCAT, and provenance instances, plus live SPARQL queries adapted from the article's examples. ## Core Entities - [The Semantic Medallion: Building a Knowledge Graph-Powered Data Catalog](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23article): An article explaining how a medallion architecture can publish its Gold layer as an RDF knowledge graph-backed data catalog. - [Semantic Medallion](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23semanticMedallionConcept): A medallion architecture variant where the Gold layer is an RDF knowledge graph. - [Knowledge graph-powered data catalog](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23knowledgeGraphCatalogConcept): A catalog that describes data semantically and exposes relationships directly in RDF. - [Gold Graph](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23goldGraphLayer): Harmonized RDF graph mapped to a shared ontology and published for SPARQL queries. - [Customer Master Data](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23dataset-customers): Unified customer records from CRM, billing, and registry. - [Semantic Medallion catalog](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23semanticMedallionCatalog): DCAT catalog describing the generated customer knowledge graph. - [URIBurner SPARQL endpoint](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23uriBurnerSparqlEndpoint): Default live endpoint for the generated executable query links. ## Executable SPARQL Examples ### [Find customers with billing issues and active contracts](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23query-active-contract-billing-issues) Source image query selected customers with active contracts and balances greater than zero. [Run live query](https://linkeddata.uriburner.com/sparql?default-graph-uri=&query=PREFIX%20sm%3A%20%3Chttps%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23%3E%0ASELECT%20%3Fcustomer%20%3Fname%20%3Fbalance%20%3FcontractStatus%0AWHERE%20%7B%0A%20%20GRAPH%20%3Chttps%3A%2F%2Flinkeddata.uriburner.com%2FDAV%2Fdemos%2Fdaas%2Fsemantic-medallion-gpt5-chat-1.ttl%3E%20%7B%0A%20%20%20%20%3Fcustomer%20a%20sm%3ACustomer%20%3B%0A%20%20%20%20%20%20sm%3Aname%20%3Fname%20%3B%0A%20%20%20%20%20%20sm%3AhasBillingAccount%20%3Faccount%20%3B%0A%20%20%20%20%20%20sm%3AhasContract%20%3Fcontract%20.%0A%20%20%20%20%3Faccount%20sm%3AoutstandingBalance%20%3Fbalance%20.%0A%20%20%20%20%3Fcontract%20sm%3Astatus%20%3FcontractStatus%20.%0A%20%20%20%20FILTER%28%3FcontractStatus%20%3D%20%22Active%22%20%26%26%20%3Fbalance%20%3E%200%29%0A%20%20%7D%0A%7D&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+) ```sparql PREFIX sm: SELECT ?customer ?name ?balance ?contractStatus WHERE { GRAPH { ?customer a sm:Customer ; sm:name ?name ; sm:hasBillingAccount ?account ; sm:hasContract ?contract . ?account sm:outstandingBalance ?balance . ?contract sm:status ?contractStatus . FILTER(?contractStatus = "Active" && ?balance > 0) } } ``` ### [Find datasets that contain customer information](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23query-customer-datasets) Source image query used DCAT distribution metadata and customer instances to discover datasets. [Run live query](https://linkeddata.uriburner.com/sparql?default-graph-uri=&query=PREFIX%20sm%3A%20%3Chttps%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23%3E%0APREFIX%20dcat%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fdcat%23%3E%0APREFIX%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0ASELECT%20%3Fdataset%20%3Ftitle%0AWHERE%20%7B%0A%20%20GRAPH%20%3Chttps%3A%2F%2Flinkeddata.uriburner.com%2FDAV%2Fdemos%2Fdaas%2Fsemantic-medallion-gpt5-chat-1.ttl%3E%20%7B%0A%20%20%20%20%3Fdataset%20a%20dcat%3ADataset%20%3B%0A%20%20%20%20%20%20dct%3Atitle%20%3Ftitle%20%3B%0A%20%20%20%20%20%20dcat%3Adistribution%20%3Fdist%20.%0A%20%20%20%20%3Fdist%20dcat%3AaccessURL%20%3Fendpoint%20.%0A%20%20%20%20%3Fcustomer%20a%20sm%3ACustomer%20.%0A%20%20%7D%0A%7D&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+) ```sparql PREFIX sm: PREFIX dcat: PREFIX dct: SELECT ?dataset ?title WHERE { GRAPH { ?dataset a dcat:Dataset ; dct:title ?title ; dcat:distribution ?dist . ?dist dcat:accessURL ?endpoint . ?customer a sm:Customer . } } ``` ### [Show every property and value about customer C-001](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23query-customer-properties) Source image query used ?property ?value. [Run live query](https://linkeddata.uriburner.com/sparql?default-graph-uri=&query=PREFIX%20sm%3A%20%3Chttps%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23%3E%0ASELECT%20%3Fproperty%20%3Fvalue%0AWHERE%20%7B%0A%20%20GRAPH%20%3Chttps%3A%2F%2Flinkeddata.uriburner.com%2FDAV%2Fdemos%2Fdaas%2Fsemantic-medallion-gpt5-chat-1.ttl%3E%20%7B%0A%20%20%20%20sm%3Acustomer-C-001%20%3Fproperty%20%3Fvalue%20.%0A%20%20%7D%0A%7D&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+) ```sparql PREFIX sm: SELECT ?property ?value WHERE { GRAPH { sm:customer-C-001 ?property ?value . } } ``` ### [Which sources contribute to customer records?](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23query-source-counts) Source image query grouped :Customer records by :sourceSystem. [Run live query](https://linkeddata.uriburner.com/sparql?default-graph-uri=&query=PREFIX%20sm%3A%20%3Chttps%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23%3E%0ASELECT%20%3Fsource%20%28COUNT%28%3Fcustomer%29%20AS%20%3Frecords%29%0AWHERE%20%7B%0A%20%20GRAPH%20%3Chttps%3A%2F%2Flinkeddata.uriburner.com%2FDAV%2Fdemos%2Fdaas%2Fsemantic-medallion-gpt5-chat-1.ttl%3E%20%7B%0A%20%20%20%20%3Fcustomer%20a%20sm%3ACustomer%20%3B%0A%20%20%20%20%20%20sm%3AsourceSystem%20%3Fsource%20.%0A%20%20%7D%0A%7D%0AGROUP%20BY%20%3Fsource&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+) ```sparql PREFIX sm: SELECT ?source (COUNT(?customer) AS ?records) WHERE { GRAPH { ?customer a sm:Customer ; sm:sourceSystem ?source . } } GROUP BY ?source ``` ## Glossary - [Semantic Medallion](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23semanticMedallionConcept): A medallion architecture variant where the Gold layer is an RDF knowledge graph. - [IRI minting](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23iriMintingConcept): The practice of assigning stable, globally unique identifiers to entities during the Silver layer. - [Gold Graph](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23goldGraphConcept): The RDF publication layer that replaces isolated Gold tables with connected knowledge. - [DCAT](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23dcatConcept): The W3C Data Catalog Vocabulary used to describe catalogs, datasets, distributions, and data services. - [PROV-O](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23provConcept): The W3C provenance ontology used to trace derivation and generation activities. - [OTTR templates](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23ottrConcept): Reusable template definitions for mapping tabular rows into RDF triples. - [maplib](https://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Fmoderndata101.substack.com%2Fp%2Fthe-semantic-medallion%23maplibConcept): Python mapping library used in the article to transform DataFrames into RDF. ## Provenance Generated with [kg-generator](https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator) and [rdf-infographic-skill](https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/rdf-infographic-skill) in Codex desktop using GPT-5 Chat. Entity links resolve through URIBurner.