Use Case Cookbook

The chapters under Feature Deep Dives explain what each pg_ripple feature does. The recipes in this cookbook explain what you can do with the features chained together. Each recipe is a self-contained story: a real-world goal, the step-by-step SQL, and the trade-offs to be aware of.

If you are evaluating pg_ripple, start here — these are the patterns that decide whether the technology fits your problem.

RecipeWhat you buildFeatures used
Knowledge graph from a relational catalogueA queryable RDF graph generated from existing PostgreSQL tables, validated and kept in syncR2RML, SHACL, named graphs
Chatbot grounded in a knowledge graphAn LLM application that answers questions using your graph as authoritative contextRAG pipeline, NL→SPARQL, JSON-LD framing
Deduplicate customer records across systemsA safe, auditable record-linkage pipeline that merges customer rows from two or more sourcesKGE, suggest_sameas, SHACL hard rules, owl:sameAs
Audit trail with PROV-O and temporal queriesA regulator-defensible chain showing what the system told a user, when, and whyPROV-O, audit log, point_in_time, RDF-star
CDC → Kafka via JSON-LD outboxA stream of structured graph-change events ready to push into Kafka, NATS, or any event busCDC subscriptions, JSON-LD framing, transactional outbox
Probabilistic rules for soft constraintsA scoring rule set that propagates confidence values, not just factsLattice Datalog, RDF-star confidence triples
SPARQL repair workflowAn iterative loop that uses the LLM to fix queries that failed to parse or returned no resultssparql_from_nl, explain_sparql, error catalog
Ontology mapping and alignmentA pipeline that lifts external vocabularies into a local schema using KGE and SHACLKGE, suggest_sameas, OWL profiles