@prefix : <https://moderndata101.substack.com/p/the-semantic-medallion#> .
@prefix schema: <http://schema.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

##############################################
# Ontology Declaration
##############################################

: a schema:DefinedTermSet, owl:Ontology ;
    schema:name "Semantic Medallion Ontology"@en ;
    schema:description "A lightweight ontology for modelling the Semantic Medallion architecture — extending the Bronze/Silver/Gold data lakehouse pattern with Knowledge Graph semantics, DCAT catalog vocabulary, and PROV-O provenance. Includes the Platinum Layer extension, contributed by Kingsley Uyi Idehen, where Linked Data principles are applied to manifest a Semantic Web."@en ;
    schema:identifier "https://moderndata101.substack.com/p/the-semantic-medallion" ;
    schema:url "https://moderndata101.substack.com/p/the-semantic-medallion" ;
    rdfs:label "Semantic Medallion Ontology"@en ;
    rdfs:comment "Defines classes and properties linking medallion architecture layers to RDF-based knowledge graphs via DCAT, PROV-O, and custom semantic enrichment concepts."@en ;
    rdfs:isDefinedBy : ;
    dct:created "2026-05-14"^^xsd:date ;
    dct:modified "2026-05-19"^^xsd:date ;
    prov:wasGeneratedBy :claudeGenerationProcess .

##############################################
# Custom Classes
##############################################

:MedallionLayer a rdfs:Class ;
    rdfs:label "Medallion Layer"@en ;
    rdfs:comment "A layer in the medallion data architecture: Bronze (raw), Silver (cleaned with IRIs), Gold (semantic RDF), or Platinum (Linked Data deployment manifesting a Semantic Web)."@en ;
    rdfs:isDefinedBy : .

:BronzeLayer a rdfs:Class ;
    rdfs:subClassOf :MedallionLayer ;
    rdfs:label "Bronze Layer"@en ;
    rdfs:comment "Raw data ingestion layer — no semantics, original format preserved."@en ;
    rdfs:isDefinedBy : .

:SilverLayer a rdfs:Class ;
    rdfs:subClassOf :MedallionLayer ;
    rdfs:label "Silver Layer"@en ;
    rdfs:comment "Cleaned and typed data layer where stable IRIs are minted for every entity — local semantics via identifiers."@en ;
    rdfs:isDefinedBy : .

:GoldLayer a rdfs:Class ;
    rdfs:subClassOf :MedallionLayer ;
    rdfs:label "Gold Layer"@en ;
    rdfs:comment "Semantic layer where Silver DataFrames are mapped to a shared ontology and published as RDF — global semantics via shared vocabulary."@en ;
    rdfs:isDefinedBy : .

:PlatinumLayer a rdfs:Class ;
    rdfs:subClassOf :MedallionLayer ;
    rdfs:label "Platinum Layer"@en ;
    rdfs:comment "Extension of the Semantic Medallion beyond Gold: the RDF-based Knowledge Graph is deployed using Linked Data principles — knowledge construction that leverages the power of hyperlinks for entity and relationship naming, manifesting a Semantic Web."@en ;
    rdfs:isDefinedBy : .

:SemanticEnrichmentProcess a rdfs:Class ;
    rdfs:label "Semantic Enrichment Process"@en ;
    rdfs:comment "A process that adds semantic meaning to data as it moves through medallion layers."@en ;
    rdfs:isDefinedBy : .

:DataCatalogConnector a rdfs:Class ;
    rdfs:label "Data Catalog Connector"@en ;
    rdfs:comment "A mechanism connecting a data catalog to a knowledge graph using DCAT vocabulary."@en ;
    rdfs:isDefinedBy : .

:Industry a rdfs:Class ;
    rdfs:label "Industry"@en ;
    rdfs:comment "Base class for industry verticals referenced in the analysis."@en ;
    rdfs:isDefinedBy : .

:DataManagementIndustry a rdfs:Class ;
    rdfs:subClassOf :Industry ;
    rdfs:label "Data Management Industry"@en ;
    rdfs:comment "Industry vertical covering data processing, hosting, data catalog, and knowledge graph services."@en ;
    rdfs:isDefinedBy : .

:KnowledgeGraphConsultingIndustry a rdfs:Class ;
    rdfs:subClassOf :Industry ;
    rdfs:label "Knowledge Graph Consulting Industry"@en ;
    rdfs:comment "Industry vertical covering knowledge graph architecture, semantic technology, and ontology design consulting."@en ;
    rdfs:isDefinedBy : .

##############################################
# Custom Properties
##############################################

:hasMedallionLayer a rdf:Property ;
    rdfs:label "has medallion layer"@en ;
    rdfs:comment "Links a semantic medallion architecture to its constituent layers (Bronze, Silver, Gold)."@en ;
    rdfs:domain :MedallionLayer ;
    rdfs:range :MedallionLayer ;
    rdfs:isDefinedBy : .

:hasSemanticEnrichment a rdf:Property ;
    rdfs:label "has semantic enrichment"@en ;
    rdfs:comment "Links a data layer to its semantic enrichment process."@en ;
    rdfs:domain :MedallionLayer ;
    rdfs:range :SemanticEnrichmentProcess ;
    rdfs:isDefinedBy : .

:usesVocabulary a rdf:Property ;
    rdfs:label "uses vocabulary"@en ;
    rdfs:comment "Links a semantic layer or process to the standard vocabulary or ontology it employs."@en ;
    rdfs:domain :GoldLayer ;
    rdfs:range rdfs:Resource ;
    rdfs:isDefinedBy : .

:mintsIRI a rdf:Property ;
    rdfs:label "mints IRI"@en ;
    rdfs:comment "Indicates that a process or layer creates stable, globally unique identifiers for entities."@en ;
    rdfs:domain :SilverLayer ;
    rdfs:range rdfs:Resource ;
    rdfs:isDefinedBy : .

:hasLaborTAM a rdf:Property ;
    rdfs:label "has labor TAM"@en ;
    rdfs:comment "Total Addressable Market for labor in a given industry vertical."@en ;
    rdfs:domain :Industry ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy : .

:hasAutomationReadiness a rdf:Property ;
    rdfs:label "has automation readiness"@en ;
    rdfs:comment "Assessment of how ready an industry vertical is for automation and semantic enrichment."@en ;
    rdfs:domain :Industry ;
    rdfs:range xsd:string ;
    rdfs:isDefinedBy : .

:enablesCapability a rdf:Property ;
    rdfs:label "enables capability"@en ;
    rdfs:comment "Links a technology, method, or architecture component to a capability it enables."@en ;
    rdfs:domain rdfs:Resource ;
    rdfs:range rdfs:Resource ;
    rdfs:isDefinedBy : .

##############################################
# Industry Verticals (Instance Data)
##############################################

:dataManagementVertical a :DataManagementIndustry ;
    rdfs:label "Data Management Industry"@en ;
    schema:naics "518210" ;
    schema:identifier "https://www.census.gov/naics/?input=518210&year=2022&details=518210" ;
    :hasLaborTAM "~$200B" ;
    :hasAutomationReadiness "High" ;
    schema:description "Data processing, hosting, and related services — including data catalog platforms, knowledge graph infrastructure, and semantic data management."@en .

:knowledgeGraphConsultingVertical a :KnowledgeGraphConsultingIndustry ;
    rdfs:label "Knowledge Graph Consulting Industry"@en ;
    schema:naics "541511" ;
    schema:identifier "https://www.census.gov/naics/?input=541511&year=2022&details=541511" ;
    :hasLaborTAM "~$80B" ;
    :hasAutomationReadiness "High" ;
    schema:description "Custom computer programming services specialising in knowledge graph architecture, ontology design, semantic technology consulting, and RDF-based data integration."@en .

##############################################
# Main Article — CreativeWork
##############################################

:analysis a schema:Article ;
    schema:name "The Semantic Medallion: Building a Knowledge Graph-Powered Data Catalog"@en ;
    schema:headline "How you can transform raw data sources into a unified knowledge graph in four lines of Python"@en ;
    schema:about :semanticMedallion, :knowledgeGraph, :dataCatalog, :dcatVocabulary,
                 :medallionArchitecture, :iriMinting, :rdfTransformation,
                 :entityResolution, :provenance, :semanticEnrichment ;
    schema:abstract "Extends the standard Bronze/Silver/Gold medallion data architecture by transforming the Gold layer into a semantic knowledge graph — enabling entity resolution, cross-system queries, impact analysis, and unified metadata via DCAT and PROV-O standards."@en ;
    schema:url "https://moderndata101.substack.com/p/the-semantic-medallion" ;
    schema:datePublished "2026-05-14"^^xsd:date ;
    schema:dateModified "2026-05-19"^^xsd:date ;
    schema:inLanguage "en" ;
    schema:license "https://creativecommons.org/licenses/by/4.0/" ;
    schema:author :veronikaHeimsbakk ;
    schema:publisher :modernData101 ;
    schema:hasPart :faqSection, :glossarySection, :howtoSection,
                   :bronzeLayer, :silverLayer, :goldLayer,
                   :technologiesSection, :capabilitiesSection,
                   :sparqlQueriesSection, :architectureConceptsSection, :industrySection ;
    prov:wasGeneratedBy :claudeGenerationProcess ;
    schema:image :semanticMedallionDiagram .

##############################################
# Author
##############################################

:veronikaHeimsbakk a schema:Person ;
    schema:name "Veronika Heimsbakk" ;
    schema:givenName "Veronika" ;
    schema:familyName "Heimsbakk" ;
    schema:url "https://www.linkedin.com/in/vheimsbakk/" ;
    schema:identifier "https://www.linkedin.com/in/vheimsbakk/" ;
    schema:description "Knowledge Graph Specialist, author of 'SHACL for the Practitioner', speaker at University of Oslo, currently at Data Treehouse."@en ;
    schema:affiliation :dataTreehouse ;
    schema:author :shaclForThePractitioner ;
    schema:sameAs "https://veronahe.substack.com/" , "https://substack.com/@veronahe" ;
    owl:sameAs <https://www.linkedin.com/in/vheimsbakk/#this>, <https://substack.com/@veronahe/#this> .

:dataTreehouse a schema:Organization ;
    schema:name "Data Treehouse" ;
    schema:description "A data consultancy specialising in knowledge graph architecture and semantic technology solutions."@en .

<https://www.linkedin.com/in/kidehen#this> a schema:Person ;
    schema:name "Kingsley Uyi Idehen"@en ;
    schema:url "https://www.linkedin.com/in/kidehen" ;
    schema:identifier "https://www.linkedin.com/in/kidehen" ;
    schema:jobTitle "Founder & CEO, OpenLink Software"@en ;
    schema:description "Founder & CEO of OpenLink Software, creator of OpenLink Virtuoso, and Semantic Web pioneer."@en ;
    schema:affiliation :openlinkSoftware ;
    owl:sameAs <https://x.com/kidehen>, <https://substack.com/@kidehen> .

##############################################
# Comment — Platinum Layer (Kingsley Uyi Idehen)
##############################################

:platinumLayerComment a schema:Comment ;
    schema:author <https://www.linkedin.com/in/kidehen#this> ;
    schema:text "And the Platinum Layer is when the RDF based Knowledge Graph is deployed using Linked Data principles i.e., knowledge construction that leverages the power of hyperlinks for entity and relationship naming that manifests a Semantic Web."@en ;
    schema:about :platinumLayer, :semanticMedallion ;
    schema:dateCreated "2026-05-19"^^xsd:date ;
    schema:isPartOf :analysis .

:shaclForThePractitioner a schema:Book ;
    schema:name "SHACL for the Practitioner" ;
    schema:url "https://shacl.veronahe.no/" ;
    schema:author :veronikaHeimsbakk ;
    schema:about <http://www.w3.org/TR/shacl/> .

##############################################
# Publisher
##############################################

:modernData101 a schema:Organization ;
    schema:name "Modern Data 101" ;
    schema:url "https://www.moderndata101.com/" ;
    schema:identifier "https://www.moderndata101.com/" ;
    schema:email "community@moderndata101.com" ;
    schema:description "A community and publication collaborating with data experts to bring resources to a 20,000+ strong community of data professionals."@en ;
    schema:publishingPrinciples "Content is vetted for quality without paid promotions. Opinions belong to authors."@en ;
    schema:maintainer <https://substack.com/@veronahe> .

##############################################
# Core Concepts
##############################################

:semanticMedallion a schema:DefinedTerm, :MedallionLayer ;
    schema:name "Semantic Medallion"@en ;
    schema:description "An extension of the Bronze/Silver/Gold medallion data architecture where the Gold layer is transformed into a connected knowledge graph rather than isolated clean tables."@en ;
    schema:termCode "SemanticMedallion" ;
    rdfs:label "Semantic Medallion"@en ;
    schema:isPartOf :analysis .

:medallionArchitecture a schema:DefinedTerm ;
    schema:name "Medallion Architecture"@en ;
    schema:description "A data lakehouse design pattern with three layers: Bronze (raw ingestion), Silver (cleaned/typed), and Gold (business-level aggregates or semantic RDF)."@en ;
    rdfs:label "Medallion Architecture"@en ;
    rdfs:seeAlso <http://dbpedia.org/resource/Data_lakehouse> ;
    schema:isPartOf :analysis .

:knowledgeGraph a schema:DefinedTerm ;
    schema:name "Knowledge Graph"@en ;
    schema:description "A graph-structured data model where entities are connected by typed relationships, forming a network of facts that can be queried via SPARQL and reasoned over using ontologies."@en ;
    rdfs:label "Knowledge Graph"@en ;
    schema:isPartOf :analysis .

:dataCatalog a schema:DefinedTerm ;
    schema:name "Data Catalog"@en ;
    schema:description "A system that inventories and organises data assets. A semantic data catalog goes beyond structural metadata to describe what things mean and how they relate, enabling relational queries rather than static table lists."@en ;
    rdfs:label "Data Catalog"@en ;
    schema:isPartOf :analysis .

:iriMinting a schema:DefinedTerm ;
    schema:name "IRI Minting"@en ;
    schema:description "The practice of creating stable, globally unique identifiers (Internationalized Resource Identifiers) for every entity in the Silver layer — replacing database auto-increment IDs with identifiers that work across all systems."@en ;
    rdfs:label "IRI Minting"@en ;
    schema:isPartOf :analysis .

:rdfTransformation a schema:DefinedTerm ;
    schema:name "DataFrame-to-RDF Transformation"@en ;
    schema:description "The process of mapping structured DataFrames to RDF triples using OTTR templates and the maplib Python library — converting columnar data into semantic graph form in as few as four lines of Python."@en ;
    rdfs:label "DataFrame-to-RDF Transformation"@en ;
    schema:isPartOf :analysis .

:entityResolution a schema:DefinedTerm ;
    schema:name "Entity Resolution"@en ;
    schema:description "Linking entities that appear across multiple data sources using owl:sameAs assertions — enabling a unified view of records spread across CRM, billing, and external registries."@en ;
    rdfs:label "Entity Resolution"@en ;
    schema:isPartOf :analysis .

:provenance a schema:DefinedTerm ;
    schema:name "Data Provenance"@en ;
    schema:description "Tracking the origin and lineage of data using PROV-O, expressed as queryable RDF triples rather than stored in a separate lineage tool with its own database."@en ;
    rdfs:label "Data Provenance"@en ;
    schema:isPartOf :analysis .

:semanticEnrichment a schema:DefinedTerm ;
    schema:name "Semantic Enrichment"@en ;
    schema:description "The progression of data through medallion layers: Bronze (no semantics), Silver (local semantics via identifiers), Gold (global semantics via shared vocabulary)."@en ;
    rdfs:label "Semantic Enrichment"@en ;
    schema:isPartOf :analysis .

:joinedDataModel a schema:DefinedTerm ;
    schema:name "Joined Data Model"@en ;
    schema:description "In a knowledge graph, relationships are embedded in the data itself, not in external join logic — eliminating the need for manual SQL JOINs or dbt scripts to connect related records."@en ;
    rdfs:label "Joined Data Model"@en ;
    schema:isPartOf :analysis .

##############################################
# Architecture Layers
##############################################

:bronzeLayer a :BronzeLayer, schema:ArticleSection ;
    schema:name "Bronze Layer — Raw Ingestion"@en ;
    schema:description "Standard raw data ingestion via orchestration tools. Data is ingested in its original format with no semantic transformation. Linked to raw source datasets via DCAT."@en ;
    schema:hasPart :bronzeDataset ;
    schema:isPartOf :analysis ;
    :hasSemanticEnrichment :noSemantics .

:silverLayer a :SilverLayer, schema:ArticleSection ;
    schema:name "Silver Layer — IRI Minting"@en ;
    schema:description "In addition to cleaning and typing, this layer focuses on minting stable IRIs for every entity — creating join keys that work across all systems rather than relying on database auto-increment IDs or GUIDs."@en ;
    schema:hasPart :iriMintingProcess ;
    schema:isPartOf :analysis ;
    :hasSemanticEnrichment :localSemantics ;
    :mintsIRI :silverIdentifiers .

:goldLayer a :GoldLayer, schema:ArticleSection ;
    schema:name "Gold Layer — Semantic RDF"@en ;
    schema:description "Silver DataFrames are mapped to a shared ontology using a common vocabulary and published as RDF via four lines of Python using maplib and OTTR templates. The relationships are in the data, not in join logic."@en ;
    schema:hasPart :dfToRdfProcess, :dcatCatalog ;
    schema:isPartOf :analysis ;
    :hasSemanticEnrichment :globalSemantics ;
    :usesVocabulary :dcatVocabulary, :provOntology .

:platinumLayer a :PlatinumLayer, schema:ArticleSection ;
    schema:name "Platinum Layer — Semantic Web"@en ;
    schema:description "The RDF-based Knowledge Graph is deployed using Linked Data principles — leveraging the power of hyperlinks for entity and relationship naming. This manifests a Semantic Web: a web-scale, decentralised graph where IRIs are dereferenceable and knowledge is globally interconnected."@en ;
    schema:isPartOf :analysis ;
    :hasSemanticEnrichment :linkedDataSemantics ;
    schema:comment :platinumLayerComment .

:linkedDataSemantics a :SemanticEnrichmentProcess ;
    schema:name "Linked Data Semantics"@en ;
    schema:description "Platinum layer: hyperlinks serve as stable, standardised identifiers for entities and relationships — turning the knowledge graph into a node in the Semantic Web."@en .

:noSemantics a :SemanticEnrichmentProcess ;
    schema:name "No Semantics"@en ;
    schema:description "Bronze layer: data is stored in its raw form with no semantic enrichment."@en .

:localSemantics a :SemanticEnrichmentProcess ;
    schema:name "Local Semantics via Identifiers"@en ;
    schema:description "Silver layer: data gains local semantics through stable, globally unique IRIs that serve as cross-system join keys."@en .

:globalSemantics a :SemanticEnrichmentProcess ;
    schema:name "Global Semantics via Shared Vocabulary"@en ;
    schema:description "Gold layer: data is mapped to a shared ontology and published as RDF, enabling global semantic interoperability."@en .

##############################################
# Silver Layer — IRI Minting Process
##############################################

:iriMintingProcess a schema:HowTo, schema:ArticleSection ;
    schema:name "IRI Minting Process in the Silver Layer"@en ;
    schema:description "Steps to mint stable IRIs for every entity during the Silver layer transformation."@en ;
    schema:step :iriStep1, :iriStep2, :iriStep3 ;
    schema:isPartOf :analysis .

:iriStep1 a schema:HowToStep ;
    schema:name "Identify Entities"@en ;
    schema:description "Scan Silver DataFrames to identify all distinct entities (customers, agents, contracts, records) that need stable identifiers."@en ;
    schema:position 1 .

:iriStep2 a schema:HowToStep ;
    schema:name "Design IRI Patterns"@en ;
    schema:description "Define a consistent IRI naming scheme — e.g., using the organisation's domain as a namespace with entity-type prefixes."@en ;
    schema:position 2 .

:iriStep3 a schema:HowToStep ;
    schema:name "Replace Auto-Increment IDs"@en ;
    schema:description "Replace database auto-increment IDs and GUIDs with the newly minted IRIs, ensuring every entity has a globally unique, resolvable identifier."@en ;
    schema:position 3 .

:silverIdentifiers a schema:DefinedTerm ;
    schema:name "Silver Identifiers"@en ;
    schema:description "Stable, globally unique IRIs assigned to every entity in the Silver layer — serving as cross-system join keys that work across all data sources."@en .

##############################################
# Technologies and Standards
##############################################

:technologiesSection a schema:ArticleSection ;
    schema:name "Technologies and Standards"@en ;
    schema:description "Key technologies, standards, and tools referenced in the Semantic Medallion architecture."@en ;
    schema:hasPart :maplib, :ottrTemplates, :dcatVocabulary, :provOntology,
                   :sparqlQueryLanguage, :rdfStandard, :pythonLanguage ;
    schema:isPartOf :analysis .

:maplib a schema:SoftwareApplication ;
    schema:name "maplib" ;
    schema:description "A Python library that maps DataFrames to RDF using OTTR templates — enabling DataFrame-to-RDF transformation in as few as four lines of Python."@en ;
    schema:programmingLanguage "Python" ;
    schema:applicationCategory "Data Transformation Library" ;
    schema:url "https://pypi.org/project/maplib/" .

:ottrTemplates a schema:DefinedTerm ;
    schema:name "OTTR Templates (stOTTR)"@en ;
    schema:description "Reasonable Ontology Templates — a templating language for RDF that maps structured data columns to ontology properties using declarative stOTTR syntax."@en ;
    rdfs:label "OTTR Templates"@en ;
    rdfs:seeAlso <http://dbpedia.org/resource/Ontology_(information_science)> .

:dcatVocabulary a schema:DefinedTerm ;
    schema:name "DCAT — Data Catalog Vocabulary"@en ;
    schema:description "The W3C standard vocabulary for describing data catalogs, datasets, distributions, and data services. Used by data.gov, the European Data Portal, and thousands of organisations worldwide."@en ;
    rdfs:label "DCAT Vocabulary"@en ;
    rdfs:seeAlso <http://www.w3.org/ns/dcat#> ;
    schema:url "https://www.w3.org/TR/vocab-dcat-3/" .

:provOntology a schema:DefinedTerm ;
    schema:name "PROV-O — Provenance Ontology"@en ;
    schema:description "The W3C standard ontology for representing provenance information — enabling data lineage as queryable triples rather than a separate lineage tool."@en ;
    rdfs:label "PROV-O"@en ;
    rdfs:seeAlso <http://www.w3.org/ns/prov#> ;
    schema:url "https://www.w3.org/TR/prov-o/" .

:sparqlQueryLanguage a schema:DefinedTerm, schema:ComputerLanguage ;
    schema:name "SPARQL" ;
    schema:description "The W3C standard query language for RDF knowledge graphs — used to query the Gold layer for entity resolution, lineage tracing, and cross-system relationship navigation."@en ;
    schema:url "https://www.w3.org/TR/sparql11-query/" .

:rdfStandard a schema:DefinedTerm ;
    schema:name "RDF — Resource Description Framework"@en ;
    schema:description "The W3C standard for representing linked data as subject-predicate-object triples, forming the foundation of the Semantic Gold layer."@en ;
    schema:url "https://www.w3.org/RDF/" .

:pythonLanguage a schema:DefinedTerm, schema:ComputerLanguage ;
    schema:name "Python" ;
    schema:description "The programming language used to implement the DataFrame-to-RDF transformation pipeline with the maplib library."@en ;
    schema:url "https://www.python.org/" ;
    rdfs:seeAlso <http://dbpedia.org/resource/Python_(programming_language)> .

##############################################
# Capabilities
##############################################

:capabilitiesSection a schema:ArticleSection ;
    schema:name "Semantic Data Catalog Capabilities"@en ;
    schema:description "The three key capabilities enabled by a Semantic Medallion-powered data catalog compared to traditional structural catalogs."@en ;
    schema:hasPart :entityResolutionCapability, :semanticSearchCapability, :impactAnalysisCapability ;
    schema:isPartOf :analysis .

:entityResolutionCapability a schema:DefinedTerm ;
    schema:name "Entity Resolution Across Sources"@en ;
    schema:description "Using owl:sameAs to link entities appearing in CRM, billing, and external registries — providing a unified view of every record across all systems."@en ;
    :enablesCapability :queryEverythingAboutRecord ;
    schema:isPartOf :capabilitiesSection .

:semanticSearchCapability a schema:DefinedTerm ;
    schema:name "Semantic Search"@en ;
    schema:description "The ontology encodes subclass relationships (e.g., :ComplianceOfficer, :AuditRecord, and :RegulatoryFiling as subtypes of :ComplianceRelated), enabling hierarchical search that understands concepts, not just keywords."@en ;
    :enablesCapability :hierarchicalClassification ;
    schema:isPartOf :capabilitiesSection .

:impactAnalysisCapability a schema:DefinedTerm ;
    schema:name "Impact Analysis"@en ;
    schema:description "Tracing graph relationships to find downstream dependencies when schemas change — identifying every dataset, report, and application affected by a modification to a source system."@en ;
    :enablesCapability :downstreamDependencyTrace ;
    schema:isPartOf :capabilitiesSection .

:queryEverythingAboutRecord a schema:DefinedTerm ;
    schema:name "Full Record Query"@en ;
    schema:description "The ability to query 'Show me everything we know about this record' and receive facts from every data source unified under one identifier."@en .

:hierarchicalClassification a schema:DefinedTerm ;
    schema:name "Hierarchical Classification"@en ;
    schema:description "Semantic search that understands subclass hierarchies — e.g., finding all ComplianceRelated records returns ComplianceOfficer, AuditRecord, and RegulatoryFiling entities."@en .

:downstreamDependencyTrace a schema:DefinedTerm ;
    schema:name "Downstream Dependency Trace"@en ;
    schema:description "Tracing impact through graph relationships to identify every downstream artefact affected by a schema or data change."@en .

##############################################
# Architecture Concepts
##############################################

:architectureConceptsSection a schema:ArticleSection ;
    schema:name "Architecture Concepts"@en ;
    schema:description "Core architectural concepts introduced by the Semantic Medallion approach."@en ;
    schema:hasPart :structuralCatalog, :semanticCatalog, :bronzeDataset, :silverDistributions, :dcatCatalog ;
    schema:isPartOf :analysis .

:structuralCatalog a schema:DefinedTerm ;
    schema:name "Structural Data Catalog"@en ;
    schema:description "A traditional data catalog that describes where data lives (tables, columns, formats) but does not understand what things mean or how they relate."@en ;
    schema:isPartOf :architectureConceptsSection .

:semanticCatalog a schema:DefinedTerm ;
    schema:name "Semantic Data Catalog"@en ;
    schema:description "A knowledge graph-powered data catalog that describes what things mean and how they relate — metadata and data unified in the same graph, with the catalog as part of the knowledge graph rather than a separate system pointing at data."@en ;
    schema:isPartOf :architectureConceptsSection .

##############################################
# DCAT Architecture Entities
##############################################

:bronzeDataset a dcat:Dataset, schema:Dataset ;
    schema:name "Bronze Raw Datasets"@en ;
    schema:description "Raw source datasets ingested in their original format — linked to raw sources via DCAT."@en ;
    dct:description "Raw data files ingested from source systems without transformation."@en ;
    schema:isPartOf :bronzeLayer .

:silverDistributions a dcat:Distribution, schema:DataDownload ;
    schema:name "Silver Structured Distributions"@en ;
    schema:description "Parquet files and structured data distributions in the Silver layer — cleaned, typed, and enriched with stable IRIs."@en ;
    dct:format "Parquet" ;
    schema:isPartOf :silverLayer .

:dcatCatalog a dcat:Catalog, schema:DataCatalog ;
    schema:name "Semantic Gold DCAT Catalog"@en ;
    schema:description "A DCAT Catalog describing the unified knowledge graph with a SPARQL endpoint distribution — metadata and data unified in a single graph."@en ;
    dcat:service :sparqlEndpointService ;
    dcat:dataset :goldRdfDataset ;
    schema:isPartOf :goldLayer .

:goldRdfDataset a dcat:Dataset, schema:Dataset ;
    schema:name "Gold RDF Knowledge Graph"@en ;
    schema:description "The unified RDF knowledge graph in the Gold layer — all entities connected through typed relationships with shared ontology mappings."@en ;
    dct:format "text/turtle" .

:sparqlEndpointService a dcat:DataService, schema:WebAPI ;
    schema:name "SPARQL Endpoint"@en ;
    schema:description "A SPARQL query endpoint providing access to the unified Gold layer knowledge graph — enabling entity resolution, lineage tracing, and cross-system queries."@en ;
    dcat:endpointURL "https://linkeddata.uriburner.com/sparql" .

##############################################
# DataFrame-to-RDF Process (HowTo)
##############################################

:dfToRdfProcess a schema:HowTo, schema:ArticleSection ;
    schema:name "DataFrame-to-RDF Transformation Process"@en ;
    schema:description "How to transform Silver DataFrames into Gold RDF in four lines of Python using maplib and OTTR templates."@en ;
    schema:step :dfStep1, :dfStep2, :dfStep3, :dfStep4 ;
    schema:isPartOf :analysis .

:dfStep1 a schema:HowToStep ;
    schema:name "Load Silver DataFrame"@en ;
    schema:description "Load the cleaned, IRI-enriched DataFrame from the Silver layer into Python using pandas or your preferred data library."@en ;
    schema:position 1 .

:dfStep2 a schema:HowToStep ;
    schema:name "Define OTTR Template"@en ;
    schema:description "Define an OTTR template in stOTTR syntax that maps DataFrame column names to ontology properties — specifying which columns map to which RDF predicates."@en ;
    schema:position 2 .

:dfStep3 a schema:HowToStep ;
    schema:name "Apply Template via maplib"@en ;
    schema:description "Use the maplib library to apply the OTTR template to the DataFrame — typically accomplished in a single function call that performs the complete transformation."@en ;
    schema:position 3 .

:dfStep4 a schema:HowToStep ;
    schema:name "Publish to Gold Layer"@en ;
    schema:description "Write the resulting RDF triples to the Gold layer — either as Turtle files on a data lake or directly to a triplestore with a SPARQL endpoint."@en ;
    schema:position 4 .

##############################################
# SPARQL Query Examples
##############################################

:sparqlQueriesSection a schema:ArticleSection ;
    schema:name "SPARQL Query Examples"@en ;
    schema:description "Four SPARQL queries demonstrating the power of a semantic data catalog: customer 360 view, data lineage tracing, cross-system relationship navigation, and ontology inspection."@en ;
    schema:hasPart :customer360Query, :lineageQuery, :crossSystemQuery, :ontologyQuery ;
    schema:isPartOf :analysis .

:customer360Query a schema:SoftwareSourceCode ;
    schema:name "Customer 360 Query"@en ;
    schema:description "Retrieve every fact about customer C-001 from every data source, unified under one identifier. Uses the DESCRIBE form to return all triples about the entity."@en ;
    schema:programmingLanguage "SPARQL" ;
    schema:text """PREFIX : <http://example.org/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX dcat: <http://www.w3.org/ns/dcat#>

DESCRIBE :C-001""" ;
    schema:codeSampleType "Query" ;
    schema:isPartOf :sparqlQueriesSection .

:lineageQuery a schema:SoftwareSourceCode ;
    schema:name "Data Lineage Query"@en ;
    schema:description "Trace which sources contribute to customer records — identifying the provenance path from Gold entities back through Silver to Bronze datasets."@en ;
    schema:programmingLanguage "SPARQL" ;
    schema:text """PREFIX : <http://example.org/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX dcat: <http://www.w3.org/ns/dcat#>

SELECT ?source ?dataset ?distribution
WHERE {
  :C-001 prov:wasDerivedFrom ?source .
  ?source prov:hadPrimarySource ?dataset .
  ?dataset dcat:distribution ?distribution .
}""" ;
    schema:codeSampleType "Query" ;
    schema:isPartOf :sparqlQueriesSection .

:crossSystemQuery a schema:SoftwareSourceCode ;
    schema:name "Cross-System Relationship Query"@en ;
    schema:description "Find all customers with open billing issues who also have active contracts — navigating relationships directly across systems without manual joins or table hunting."@en ;
    schema:programmingLanguage "SPARQL" ;
    schema:text """PREFIX : <http://example.org/ontology#>
PREFIX schema: <http://schema.org/>

SELECT ?customer ?name ?billingIssue ?contract
WHERE {
  ?customer a schema:Person ;
            schema:name ?name ;
            :hasBillingIssue ?billingIssue ;
            :hasActiveContract ?contract .
  ?billingIssue schema:status "Open" .
  ?contract schema:status "Active" .
}""" ;
    schema:codeSampleType "Query" ;
    schema:isPartOf :sparqlQueriesSection .

:ontologyQuery a schema:SoftwareSourceCode ;
    schema:name "Ontology Inspection Query"@en ;
    schema:description "Inspect the Semantic Medallion ontology — list all defined classes with their labels and descriptions."@en ;
    schema:programmingLanguage "SPARQL" ;
    schema:text """PREFIX : <https://moderndata101.substack.com/p/the-semantic-medallion#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?class ?label ?comment
WHERE {
  ?class a rdfs:Class ;
         rdfs:label ?label ;
         rdfs:comment ?comment .
  FILTER(STRSTARTS(STR(?class), STR(:)))
}
ORDER BY ?label""" ;
    schema:codeSampleType "Query" ;
    schema:isPartOf :sparqlQueriesSection .

##############################################
# Industry Section
##############################################

:industrySection a schema:ArticleSection ;
    schema:name "Industry Context"@en ;
    schema:description "Industry verticals relevant to the Semantic Medallion approach — data management and knowledge graph consulting."@en ;
    schema:hasPart :dataManagementVertical, :knowledgeGraphConsultingVertical ;
    schema:isPartOf :analysis .

##############################################
# FAQ Section
##############################################

:faqSection a schema:FAQPage ;
    schema:name "Semantic Medallion FAQ"@en ;
    schema:description "Frequently asked questions about the Semantic Medallion architecture and knowledge graph-powered data catalogs."@en ;
    schema:mainEntity :q1, :q2, :q3, :q4, :q5, :q6, :q7, :q8, :q9, :q10, :q11, :q12 ;
    schema:isPartOf :analysis .

:q1 a schema:Question ;
    schema:text "What is the Semantic Medallion?"@en ;
    schema:acceptedAnswer :a1 ;
    schema:isPartOf :faqSection .

:a1 a schema:Answer ;
    schema:text "The Semantic Medallion is an extension of the traditional Bronze/Silver/Gold data lakehouse architecture where the Gold layer is transformed into a connected knowledge graph rather than isolated clean tables. Relationships are embedded in the data itself, not in external join logic, enabling entity resolution, cross-system queries, and semantic search."@en .

:q2 a schema:Question ;
    schema:text "How does the Bronze layer work in the Semantic Medallion?"@en ;
    schema:acceptedAnswer :a2 ;
    schema:isPartOf :faqSection .

:a2 a schema:Answer ;
    schema:text "The Bronze layer handles standard raw data ingestion via orchestration tools. Data is ingested in its original format with no semantic transformation. DCAT links these raw datasets to their source systems."@en .

:q3 a schema:Question ;
    schema:text "What is the role of IRI minting in the Silver layer?"@en ;
    schema:acceptedAnswer :a3 ;
    schema:isPartOf :faqSection .

:a3 a schema:Answer ;
    schema:text "In the Silver layer, beyond cleaning and typing data, stable IRIs are minted for every entity. These globally unique identifiers replace database auto-increment IDs and GUIDs, creating join keys that work across all systems rather than being scoped to a single database."@en .

:q4 a schema:Question ;
    schema:text "How does the Gold layer transform data into a knowledge graph?"@en ;
    schema:acceptedAnswer :a4 ;
    schema:isPartOf :faqSection .

:a4 a schema:Answer ;
    schema:text "The Gold layer maps Silver DataFrames to a shared ontology using OTTR templates and the maplib Python library, then publishes the result as RDF. Rather than creating separate Parquet/Delta tables requiring manual join logic, the data becomes a connected knowledge graph where relationships are stored as triples — making the data inherently relational."@en .

:q5 a schema:Question ;
    schema:text "Can the DataFrame-to-RDF transformation really be done in four lines of Python?"@en ;
    schema:acceptedAnswer :a5 ;
    schema:isPartOf :faqSection .

:a5 a schema:Answer ;
    schema:text "Yes. The article demonstrates the complete Silver-to-Gold transformation in four lines: (1) load the DataFrame, (2) define an OTTR template mapping columns to ontology properties, (3) apply the template using maplib, and (4) publish the resulting RDF to the Gold layer. The power comes from declarative templates rather than imperative code."@en .

:q6 a schema:Question ;
    schema:text "Why use DCAT instead of a custom catalog schema?"@en ;
    schema:acceptedAnswer :a6 ;
    schema:isPartOf :faqSection .

:a6 a schema:Answer ;
    schema:text "DCAT (Data Catalog Vocabulary) is a W3C standard used by data.gov, the European Data Portal, and thousands of organisations. Using DCAT provides: (1) interoperability with existing data catalog ecosystems, (2) rich standardised metadata for publishers, themes, formats, and lineage, (3) a unified graph where the catalog is part of the knowledge graph — not a separate system, and (4) built-in integration with PROV-O for provenance."@en .

:q7 a schema:Question ;
    schema:text "How does the Semantic Medallion handle entity resolution across different data sources?"@en ;
    schema:acceptedAnswer :a7 ;
    schema:isPartOf :faqSection .

:a7 a schema:Answer ;
    schema:text "Entity resolution uses owl:sameAs assertions to link entities appearing in CRM, billing, and external registries. A customer appearing in both the sales system and the billing system is linked via an owl:sameAs triple, creating a unified view. SPARQL queries then navigate all facts about that customer regardless of which source system contributed them."@en .

:q8 a schema:Question ;
    schema:text "How does PROV-O enable data lineage in the Semantic Medallion?"@en ;
    schema:acceptedAnswer :a8 ;
    schema:isPartOf :faqSection .

:a8 a schema:Answer ;
    schema:text "PROV-O expresses data lineage as RDF triples — recording which entities were derived from which sources, which activities generated them, and which agents were responsible. Instead of storing lineage in a separate tool with its own database, PROV-O provenance triples live in the knowledge graph, making lineage queryable using the same SPARQL endpoint as the data itself."@en .

:q9 a schema:Question ;
    schema:text "What was the biggest challenge when building a Semantic Medallion?"@en ;
    schema:acceptedAnswer :a9 ;
    schema:isPartOf :faqSection .

:a9 a schema:Answer ;
    schema:text "The biggest challenge was not the RDF conversion itself, but establishing stable identifiers (IRIs) in the Silver layer. This requires upfront design of IRI naming conventions and careful governance to ensure identifiers remain consistent as new data sources are added."@en .

:q10 a schema:Question ;
    schema:text "How should you approach ontology design for a Semantic Medallion?"@en ;
    schema:acceptedAnswer :a10 ;
    schema:isPartOf :faqSection .

:a10 a schema:Answer ;
    schema:text "Start with the ontology available from your existing data models, then refine it incrementally as you understand cross-system relationships better. Do not aim for a perfect ontology upfront — the knowledge graph can evolve as your understanding deepens."@en .

:q11 a schema:Question ;
    schema:text "What is the key difference between a traditional Gold layer and the Semantic Gold layer?"@en ;
    schema:acceptedAnswer :a11 ;
    schema:isPartOf :faqSection .

:a11 a schema:Answer ;
    schema:text "A traditional Gold layer consists of separate Parquet or Delta tables requiring manual join logic in SQL or dbt scripts. The Semantic Gold layer is RDF where relationships are embedded in the data as triples — eliminating table hunting, manual JOINs, and fragile transformation pipelines. The data becomes inherently connected rather than depending on external join logic."@en .

:q12 a schema:Question ;
    schema:text "How does the Semantic Medallion reframe the medallion architecture?"@en ;
    schema:acceptedAnswer :a12 ;
    schema:isPartOf :faqSection .

:a12 a schema:Answer ;
    schema:text "The medallion layers are reframed as semantic enrichment stages: Bronze provides no semantics (raw data), Silver provides local semantics through stable identifiers (entities become referable across systems), and Gold provides global semantics through a shared vocabulary (entities are connected via typed relationships in a knowledge graph). This transforms the medallion from a storage pattern into a semantic enrichment pipeline."@en .

##############################################
# Glossary
##############################################

:glossarySection a skos:ConceptScheme, schema:DefinedTermSet ;
    schema:name "Semantic Medallion Glossary"@en ;
    schema:description "Key terms and definitions for understanding the Semantic Medallion architecture."@en ;
    schema:hasDefinedTerm :termSemanticMedallion, :termIRI, :termDCAT, :termPROVO,
                          :termOTTR, :termMaplib, :termRDF, :termSPARQL,
                          :termKnowledgeGraph, :termMedallionArchitecture ;
    schema:isPartOf :analysis .

:termSemanticMedallion a skos:Concept, schema:DefinedTerm ;
    schema:name "Semantic Medallion"@en ;
    skos:definition "An architecture pattern extending the Bronze/Silver/Gold medallion with knowledge graph semantics — transforming the Gold layer into connected RDF."@en ;
    skos:inScheme :glossarySection .

:termIRI a skos:Concept, schema:DefinedTerm ;
    schema:name "IRI (Internationalized Resource Identifier)"@en ;
    skos:definition "A globally unique, stable identifier for an entity — replacing database auto-increment IDs with identifiers that work across all systems."@en ;
    skos:inScheme :glossarySection .

:termDCAT a skos:Concept, schema:DefinedTerm ;
    schema:name "DCAT (Data Catalog Vocabulary)"@en ;
    skos:definition "A W3C standard vocabulary for describing data catalogs, datasets, distributions, and data services — used by data.gov and the European Data Portal."@en ;
    skos:inScheme :glossarySection .

:termPROVO a skos:Concept, schema:DefinedTerm ;
    schema:name "PROV-O (Provenance Ontology)"@en ;
    skos:definition "A W3C standard ontology for representing provenance information — enabling data lineage as queryable RDF triples within the knowledge graph."@en ;
    skos:inScheme :glossarySection .

:termOTTR a skos:Concept, schema:DefinedTerm ;
    schema:name "OTTR (Reasonable Ontology Templates)"@en ;
    skos:definition "A templating language for RDF that maps structured data columns to ontology properties using declarative stOTTR syntax — enabling concise DataFrame-to-RDF transformations."@en ;
    skos:inScheme :glossarySection .

:termMaplib a skos:Concept, schema:DefinedTerm ;
    schema:name "maplib"@en ;
    skos:definition "A Python library that applies OTTR templates to DataFrames to produce RDF — enabling the complete Silver-to-Gold transformation in as few as four lines of Python."@en ;
    skos:inScheme :glossarySection .

:termRDF a skos:Concept, schema:DefinedTerm ;
    schema:name "RDF (Resource Description Framework)"@en ;
    skos:definition "The W3C standard for representing linked data as subject-predicate-object triples — the foundational data model of the Semantic Gold layer."@en ;
    skos:inScheme :glossarySection .

:termSPARQL a skos:Concept, schema:DefinedTerm ;
    schema:name "SPARQL"@en ;
    skos:definition "The W3C standard query language for RDF knowledge graphs — used to navigate entity relationships, trace lineage, and execute cross-system queries in the Semantic Gold layer."@en ;
    skos:inScheme :glossarySection .

:termKnowledgeGraph a skos:Concept, schema:DefinedTerm ;
    schema:name "Knowledge Graph"@en ;
    skos:definition "A graph-structured data model where entities are connected by typed relationships — enabling navigation, reasoning, and semantic search across unified data."@en ;
    skos:inScheme :glossarySection .

:termMedallionArchitecture a skos:Concept, schema:DefinedTerm ;
    schema:name "Medallion Architecture"@en ;
    skos:definition "A data lakehouse design pattern with three layers: Bronze (raw ingestion), Silver (cleaned and typed with IRIs), and Gold (semantic RDF knowledge graph)."@en ;
    skos:inScheme :glossarySection .

##############################################
# HowTo Section
##############################################

:howtoSection a schema:HowTo ;
    schema:name "Building a Semantic Medallion Data Catalog"@en ;
    schema:description "Step-by-step guide for building a knowledge graph-powered data catalog using the Semantic Medallion architecture."@en ;
    schema:step :step1, :step2, :step3, :step4, :step5, :step6, :step7 ;
    schema:isPartOf :analysis .

:step1 a schema:HowToStep ;
    schema:name "Ingest Raw Data into Bronze"@en ;
    schema:description "Set up orchestration tools to ingest raw data from all source systems into the Bronze layer. Preserve original formats without transformation. Link datasets to sources via DCAT."@en ;
    schema:position 1 .

:step2 a schema:HowToStep ;
    schema:name "Clean Data and Mint IRIs in Silver"@en ;
    schema:description "Clean and type the data in the Silver layer. Critically, replace database auto-increment IDs with stable, globally unique IRIs for every entity. Define a consistent IRI naming scheme using your organisation's domain namespace."@en ;
    schema:position 2 .

:step3 a schema:HowToStep ;
    schema:name "Design the Shared Ontology"@en ;
    schema:description "Design a shared ontology that maps your business concepts to RDF classes and properties. Start with what is available from existing data models. Use standard vocabularies (DCAT, PROV-O, schema.org) where possible. Iterate and refine as understanding deepens."@en ;
    schema:position 3 .

:step4 a schema:HowToStep ;
    schema:name "Define OTTR Templates"@en ;
    schema:description "Create OTTR templates in stOTTR syntax that map your DataFrame columns to ontology properties. Each template defines how a row in your DataFrame becomes a set of RDF triples."@en ;
    schema:position 4 .

:step5 a schema:HowToStep ;
    schema:name "Transform to RDF with maplib"@en ;
    schema:description "Use the maplib Python library to apply your OTTR templates to the Silver DataFrames. This transformation produces RDF triples in as few as four lines of Python."@en ;
    schema:position 5 .

:step6 a schema:HowToStep ;
    schema:name "Publish to Gold as a Knowledge Graph"@en ;
    schema:description "Write the resulting RDF to the Gold layer — either as Turtle files on a data lake, or directly to a triplestore with a SPARQL endpoint. Register the knowledge graph in a DCAT Catalog with a SPARQL endpoint distribution."@en ;
    schema:position 6 .

:step7 a schema:HowToStep ;
    schema:name "Query and Validate"@en ;
    schema:description "Use SPARQL to validate the knowledge graph: run customer 360 queries to verify entity resolution, lineage queries to trace provenance, and cross-system queries to confirm relationships are correctly modelled. Iterate on the ontology and templates based on query results."@en ;
    schema:position 7 .

##############################################
# Media
##############################################

:semanticMedallionDiagram a schema:ImageObject ;
    schema:name "Semantic Medallion Architecture Diagram"@en ;
    schema:description "A diagram illustrating the three layers of the Semantic Medallion: Bronze (raw ingestion), Silver (IRI minting), and Gold (semantic RDF with SPARQL endpoint)."@en ;
    schema:about :semanticMedallion ;
    schema:isPartOf :analysis .

##############################################
# Provenance — Generation
##############################################

:claudeGenerationProcess a prov:Activity, schema:SoftwareApplication ;
    schema:name "Claude Sonnet 4.6" ;
    schema:description "Large language model (Anthropic Claude Sonnet 4.6) used to generate this RDF knowledge graph and companion artefacts via the kg-generator and rdf-infographic-skill agents in Cowork mode."@en ;
    schema:identifier "claude-sonnet-4-6" ;
    schema:url "https://www.anthropic.com/claude" ;
    prov:endedAtTime "2026-05-19T00:00:00Z"^^xsd:dateTime .

:kgGeneratorSkill a schema:SoftwareApplication ;
    schema:name "kg-generator skill" ;
    schema:url "https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator" ;
    schema:description "A Claude Code skill that generates comprehensive RDF-Turtle Knowledge Graphs from web content."@en ;
    schema:applicationCategory "AI Agent Skill" ;
    schema:provider :openlinkSoftware .

:openlinkSoftware a schema:Organization ;
    schema:name "OpenLink Software" ;
    schema:url "https://www.openlinksw.com/" ;
    rdfs:seeAlso <http://dbpedia.org/resource/OpenLink_Software> .

##############################################
# Companion Files (Related Resources)
##############################################

:companionInstanceData a schema:Dataset ;
    schema:name "Semantic Medallion Ontology & Instance Data"@en ;
    schema:description "Executable ontology and representative instance data enabling all four SPARQL query examples to return verifiable results."@en ;
    schema:url "semantic-medallion-ontology-instance-data.ttl" ;
    schema:encodingFormat "text/turtle" ;
    schema:isPartOf :analysis .

##############################################
# Property Declarations (Customer Domain)
##############################################

:hasBillingIssue a rdf:Property ;
    rdfs:label "has Billing Issue"@en ;
    rdfs:comment "Links a Gold Layer customer entity to an open or resolved billing issue."@en ;
    rdfs:domain schema:Person ;
    rdfs:isDefinedBy : .

:hasActiveContract a rdf:Property ;
    rdfs:label "has Active Contract"@en ;
    rdfs:comment "Links a Gold Layer customer entity to a currently active service contract."@en ;
    rdfs:domain schema:Person ;
    rdfs:isDefinedBy : .

:hasAccountManager a rdf:Property ;
    rdfs:label "has Account Manager"@en ;
    rdfs:comment "Links a customer entity to the assigned account manager."@en ;
    rdfs:domain schema:Person ;
    rdfs:range schema:Person ;
    rdfs:isDefinedBy : .

##############################################
# Instance Data — Gold Layer Customer Entities
##############################################

:C-001 a schema:Person, :GoldLayer ;
    rdfs:label "Acme Corporation"@en ;
    schema:name "Acme Corporation" ;
    schema:email "contact@acmecorp.com" ;
    schema:telephone "+1-555-0101" ;
    schema:address [
        a schema:PostalAddress ;
        schema:streetAddress "123 Main St" ;
        schema:addressLocality "San Francisco" ;
        schema:addressRegion "CA" ;
        schema:postalCode "94105"
    ] ;
    :hasAccountManager :accountManager-JD ;
    :hasBillingIssue :billingIssue-001 ;
    :hasActiveContract :contract-001 ;
    owl:sameAs :C-001-CRM, :C-001-Billing ;
    prov:wasDerivedFrom :silverRecord-CRM-001, :silverRecord-Billing-001 .

:C-002 a schema:Person, :GoldLayer ;
    rdfs:label "Beta Industries"@en ;
    schema:name "Beta Industries" ;
    schema:email "info@betaindustries.com" ;
    schema:telephone "+1-555-0202" ;
    :hasBillingIssue :billingIssue-002 ;
    :hasActiveContract :contract-002 ;
    owl:sameAs :C-002-CRM, :C-002-Billing ;
    prov:wasDerivedFrom :silverRecord-CRM-002, :silverRecord-Billing-002 .

##############################################
# Instance Data — Silver Layer Records
##############################################

:silverRecord-CRM-001 a :SilverLayer ;
    rdfs:label "Acme Corporation — CRM Silver Record"@en ;
    schema:identifier "SFDC-ACC-00001" ;
    prov:hadPrimarySource :bronzeDataset-CRM ;
    prov:wasAttributedTo :sourceCRM .

:silverRecord-Billing-001 a :SilverLayer ;
    rdfs:label "Acme Corporation — Billing Silver Record"@en ;
    schema:identifier "STRIPE-CUST-001" ;
    prov:hadPrimarySource :bronzeDataset-Billing ;
    prov:wasAttributedTo :sourceBilling .

:silverRecord-CRM-002 a :SilverLayer ;
    rdfs:label "Beta Industries — CRM Silver Record"@en ;
    schema:identifier "SFDC-ACC-00002" ;
    prov:hadPrimarySource :bronzeDataset-CRM ;
    prov:wasAttributedTo :sourceCRM .

:silverRecord-Billing-002 a :SilverLayer ;
    rdfs:label "Beta Industries — Billing Silver Record"@en ;
    schema:identifier "STRIPE-CUST-002" ;
    prov:hadPrimarySource :bronzeDataset-Billing ;
    prov:wasAttributedTo :sourceBilling .

:C-001-CRM a :SilverLayer ;
    rdfs:label "Acme Corporation — Salesforce Representation"@en ;
    schema:identifier "SFDC-ACC-00001" ;
    prov:wasAttributedTo :sourceCRM .

:C-001-Billing a :SilverLayer ;
    rdfs:label "Acme Corporation — Stripe Representation"@en ;
    schema:identifier "STRIPE-CUST-001" ;
    prov:wasAttributedTo :sourceBilling .

:C-002-CRM a :SilverLayer ;
    rdfs:label "Beta Industries — Salesforce Representation"@en ;
    schema:identifier "SFDC-ACC-00002" ;
    prov:wasAttributedTo :sourceCRM .

:C-002-Billing a :SilverLayer ;
    rdfs:label "Beta Industries — Stripe Representation"@en ;
    schema:identifier "STRIPE-CUST-002" ;
    prov:wasAttributedTo :sourceBilling .

##############################################
# Instance Data — Bronze Layer Source Systems
##############################################

:sourceCRM a :BronzeLayer, schema:SoftwareApplication ;
    rdfs:label "Salesforce CRM"@en ;
    schema:name "Salesforce CRM" ;
    schema:url <https://salesforce.com> .

:sourceBilling a :BronzeLayer, schema:SoftwareApplication ;
    rdfs:label "Stripe Billing"@en ;
    schema:name "Stripe Billing" ;
    schema:url <https://stripe.com> .

:bronzeDataset-CRM a dcat:Dataset, :BronzeLayer ;
    rdfs:label "Bronze CRM Dataset"@en ;
    schema:name "Raw Salesforce Export" ;
    dcat:distribution :bronzeDistribution-CRM ;
    prov:wasGeneratedBy :sourceCRM .

:bronzeDataset-Billing a dcat:Dataset, :BronzeLayer ;
    rdfs:label "Bronze Billing Dataset"@en ;
    schema:name "Raw Stripe Export" ;
    dcat:distribution :bronzeDistribution-Billing ;
    prov:wasGeneratedBy :sourceBilling .

:bronzeDistribution-CRM a dcat:Distribution ;
    rdfs:label "CRM CSV Distribution"@en ;
    dcat:mediaType "text/csv" ;
    dcat:accessURL <https://linkeddata.uriburner.com/DAV/demos/daas/crm-export.csv> .

:bronzeDistribution-Billing a dcat:Distribution ;
    rdfs:label "Billing JSON Distribution"@en ;
    dcat:mediaType "application/json" ;
    dcat:accessURL <https://linkeddata.uriburner.com/DAV/demos/daas/billing-export.json> .

##############################################
# Instance Data — Billing Issues & Contracts
##############################################

:billingIssue-001 a :GoldLayer ;
    rdfs:label "Acme Open Billing Issue"@en ;
    schema:name "Overdue Invoice Q4-2024" ;
    schema:status "Open" ;
    schema:dateCreated "2024-11-01"^^xsd:date .

:billingIssue-002 a :GoldLayer ;
    rdfs:label "Beta Open Billing Issue"@en ;
    schema:name "Disputed Charge Feb-2025" ;
    schema:status "Open" ;
    schema:dateCreated "2025-02-15"^^xsd:date .

:contract-001 a :GoldLayer ;
    rdfs:label "Acme Gold Support Plan"@en ;
    schema:name "Gold Support Plan — Acme" ;
    schema:status "Active" ;
    schema:startDate "2024-01-01"^^xsd:date ;
    schema:endDate "2026-12-31"^^xsd:date .

:contract-002 a :GoldLayer ;
    rdfs:label "Beta Gold Support Plan"@en ;
    schema:name "Gold Support Plan — Beta" ;
    schema:status "Active" ;
    schema:startDate "2024-06-01"^^xsd:date ;
    schema:endDate "2026-05-31"^^xsd:date .

:accountManager-JD a schema:Person ;
    rdfs:label "Jane Doe — Account Manager"@en ;
    schema:name "Jane Doe" ;
    schema:jobTitle "Enterprise Account Manager" .

:companionHTML a schema:WebPage ;
    schema:name "Semantic Medallion Interactive Infographic"@en ;
    schema:url "the-semantic-medallion.html" ;
    schema:description "Interactive HTML page with SPARQL accordion queries, Bronze/Silver/Gold architecture diagram, entity hyperlinks, and knowledge graph explorer."@en ;
    schema:isPartOf :analysis .

:companionMarkdown a schema:Article ;
    schema:name "Semantic Medallion Markdown Companion"@en ;
    schema:url "the-semantic-medallion.md" ;
    schema:description "Structured Markdown companion with entity hyperlinks, executable SPARQL examples, FAQ, Glossary, and HowTo guide."@en ;
    schema:isPartOf :analysis .
