mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-24 12:41:02 +02:00
Schemas
This commit is contained in:
parent
5875768297
commit
f7872ed59b
2 changed files with 32 additions and 1 deletions
|
|
@ -9,4 +9,5 @@ from .library import *
|
||||||
from .lookup import *
|
from .lookup import *
|
||||||
from .nlp_query import *
|
from .nlp_query import *
|
||||||
from .structured_query import *
|
from .structured_query import *
|
||||||
from .objects_query import *
|
from .objects_query import *
|
||||||
|
from .diagnosis import *
|
||||||
30
trustgraph-base/trustgraph/schema/services/diagnosis.py
Normal file
30
trustgraph-base/trustgraph/schema/services/diagnosis.py
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
from pulsar.schema import Record, String, Map, Double
|
||||||
|
from ..core.primitives import Error
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
# Structured data diagnosis services
|
||||||
|
|
||||||
|
class StructuredDataDiagnosisRequest(Record):
|
||||||
|
operation = String() # "detect-type", "generate-descriptor", or "diagnose"
|
||||||
|
sample = String() # Data sample to analyze (text content)
|
||||||
|
type = String() # Data type (csv, json, xml) - optional, required for generate-descriptor
|
||||||
|
schema_name = String() # Target schema name for descriptor generation - optional
|
||||||
|
|
||||||
|
# JSON encoded options (e.g., delimiter for CSV)
|
||||||
|
options = Map(String())
|
||||||
|
|
||||||
|
class StructuredDataDiagnosisResponse(Record):
|
||||||
|
error = Error()
|
||||||
|
|
||||||
|
operation = String() # The operation that was performed
|
||||||
|
detected_type = String() # Detected data type (for detect-type/diagnose) - optional
|
||||||
|
confidence = Double() # Confidence score for type detection - optional
|
||||||
|
|
||||||
|
# JSON encoded descriptor (for generate-descriptor/diagnose) - optional
|
||||||
|
descriptor = String()
|
||||||
|
|
||||||
|
# JSON encoded additional metadata (e.g., field count, sample records)
|
||||||
|
metadata = Map(String())
|
||||||
|
|
||||||
|
############################################################################
|
||||||
Loading…
Add table
Add a link
Reference in a new issue