mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 01:01:03 +02:00
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:
parent
b8818e28d0
commit
33a4647155
7 changed files with 45 additions and 30 deletions
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue