This commit is contained in:
Cyber MacGeddon 2025-09-15 22:20:43 +01:00
parent 5875768297
commit f7872ed59b
2 changed files with 32 additions and 1 deletions

View file

@ -10,3 +10,4 @@ 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 *

View 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())
############################################################################