Skip to main content

Schema-driven profiler for OpenSearch / JSON index data — field stats, role inference, null analysis, correlation detection and LLM-ready YAML export.

Project description

summarystatvjson

A schema-driven profiler for OpenSearch index data. Generates rich field-level statistics, infers semantic roles, detects null patterns and categorical correlations, and exports a compact YAML summary ready to be passed as context to an LLM or agent.


Installation

pip install summarystatvjson

Quick Start

import json
from summarystatvjson import json_metadata, to_yaml

with open("my_schema.json") as f:
    schema = json.load(f)

with open("my_data.json") as f:
    raw_data = json.load(f)

result = json_metadata(raw_data, schema)
print(to_yaml(result))

Or use the built-in file handler:

from summarystatvjson import lambda_handler

event = {
    "rawDataPath": "my_data.json",
    "schemapath":  "my_schema.json",
}
json_res, yaml_res = lambda_handler(event, None)

Inferred Roles

Role Meaning
id_field High cardinality identifier
constant Single value across all records
timestamp Date or datetime field
metric Numeric measurement (duration, code, count etc.)
categorical Low cardinality text
free_text Variable text with no clear pattern
opaque Flattened or geo object — profiling skipped

Requirements

  • Python >= 3.9
  • pandas >= 1.5
  • numpy >= 1.23
  • pyyaml >= 6.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

summarystatvjsonopensearch-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

summarystatvjsonopensearch-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file summarystatvjsonopensearch-0.1.0.tar.gz.

File metadata

File hashes

Hashes for summarystatvjsonopensearch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0a54c32443ad05434646430a7b77bc54ce3fa39a019686edd8ca33188821abf
MD5 550bb3c61fa47e86cc097323d2d404c7
BLAKE2b-256 80e8a25023bd496ac061ceb9e6c00fd297254fa75bf53ce4f191f0e58d2e94e7

See more details on using hashes here.

File details

Details for the file summarystatvjsonopensearch-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for summarystatvjsonopensearch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 519aadce32b6fdf51bb1302d3ba7ad5735f27bc0462c48a75f972c60f61c908b
MD5 33ae0b5b4d38d8feabc235b08398f502
BLAKE2b-256 283529af2322d1ea710e4069f646d9e1ec8146d8743965557c3d2df8a71fb7d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page