Skip to main content

DB schema extraction to semantic layer for self-service analytics with local LLMs

Project description

Schemalytics

Semantic Layer for Self-Service Analytics

Schemalytics transforms your database into an LLM-ready semantic layer that enables self-service analytics. It analyzes your schema, generates dimensional models, and creates comprehensive metadata that LLMs can use to write accurate SQL queries—all running locally with complete privacy.

The tool generates a complete dbt project as the implementation layer, following dimensional modeling best practices with medallion architecture (Bronze → Silver → Gold).

Key features:

  • Semantic layer generation - LLM-ready metadata with metrics, relationships, and query patterns
  • Self-service analytics - Enable natural language queries against your data
  • Privacy-first - Runs on local LLMs (Ollama), no data leaves your machine
  • Interactive refinement - Perfect your data model through natural language feedback
  • Industry templates - Pre-configured patterns for e-commerce, SaaS, fintech, and more

Quick Start

1. Install prerequisites

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen2.5-coder:7b

# Install Schemalytics  
pip install schemalytics

2. Generate semantic layer + dbt project

schemalytics generate \
  -c postgresql://localhost/mydb \
  -o ./dbt_project

3. Interactive refinement

  • AI generates initial plan with concrete specifications
  • You refine with natural language ("make revenue weekly", "add customer LTV")
  • Approve when ready

What You Get

  • Semantic layer (semantic_layer.yml) - Complete metadata for LLM-powered analytics
  • Bronze models - Raw data staging layer
  • Silver models - Facts and dimensions (star schema)
  • Gold models - Pre-aggregated metrics for performance
  • Documentation - Auto-generated schema.yml files with tests

License

Apache 2.0 • Built by NiChr0

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

schemalytics-0.1.3.tar.gz (100.9 kB view details)

Uploaded Source

Built Distribution

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

schemalytics-0.1.3-py3-none-any.whl (103.9 kB view details)

Uploaded Python 3

File details

Details for the file schemalytics-0.1.3.tar.gz.

File metadata

  • Download URL: schemalytics-0.1.3.tar.gz
  • Upload date:
  • Size: 100.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for schemalytics-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3688c16cfc9e8a5888481ab22c31223f4d8484805f5281a9061e2ee98186d566
MD5 ab85b82949bb1ea052bf3ce6208b1c85
BLAKE2b-256 829ffc9f953491a4f4808cf84e035351250dcee1ce9478608b43ad3e08c1c23f

See more details on using hashes here.

File details

Details for the file schemalytics-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: schemalytics-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 103.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for schemalytics-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c58109d58d298195719abc0281ac11948001a5974211c81fe457e54aa451eecf
MD5 42e7555e2620b9bebf6e635922156015
BLAKE2b-256 96c2c797b411bf2b1669ad0ec2d0ca2dab14e66f093e8b5b8936cf568721fa5a

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