Change graph writers to ingest Triples instead of Triple. This is just

an interface change, triples are still passed one-at-a-time from extractors,
but this permits sending in batches in the future.
This commit is contained in:
Cyber MacGeddon 2024-10-16 16:56:36 +01:00
parent b8818e28d0
commit 33a4647155
7 changed files with 45 additions and 30 deletions

View file

@ -1,7 +1,7 @@
from pulsar.schema import Record, Bytes, String, Boolean, Integer, Array, Double
from . types import Error, Value
from . types import Error, Value, Triple
from . topic import topic
from . metadata import Metadata
@ -41,11 +41,9 @@ graph_embeddings_response_queue = topic(
# Graph triples
class Triple(Record):
class Triples(Record):
metadata = Metadata()
s = Value()
p = Value()
o = Value()
triples = Array(Triple())
triples_store_queue = topic('triples-store')

View file

@ -10,6 +10,11 @@ class Value(Record):
is_uri = Boolean()
type = String()
class Triple(Record):
s = Value()
p = Value()
o = Value()
class Field(Record):
name = String()
# int, string, long, bool, float, double