Skip to main content

DataBridge Discovery Engine

Automated SQL parsing, CASE statement extraction, and hierarchy generation for data warehouse modeling.

Features

  • SQL Parsing: Multi-dialect SQL parsing using sqlglot (Snowflake, PostgreSQL, T-SQL, MySQL, BigQuery)
  • CASE Extraction: Automatic extraction of CASE WHEN statements with hierarchy detection
  • Semantic Graph: Graph-based semantic modeling with NetworkX
  • Entity Detection: Detects 12 standard entity types (account, cost_center, department, etc.)
  • Librarian Integration: Direct export to Librarian hierarchy project format

Installation

# Basic installation
pip install databridge-discovery

# With embeddings support
pip install databridge-discovery[embeddings]

# With MCP tools
pip install databridge-discovery[mcp]

# Full installation
pip install databridge-discovery[all]

Quick Start

from databridge_discovery import SQLParser, CaseExtractor, DiscoverySession

# Parse SQL
parser = SQLParser(dialect="snowflake")
ast = parser.parse(sql_query)

# Extract CASE statements
extractor = CaseExtractor()
cases = extractor.extract(ast)

# Start discovery session
session = DiscoverySession()
session.add_sql_source(sql_query)
session.analyze()

# Get proposed hierarchies
hierarchies = session.get_proposed_hierarchies()

MCP Tools

The library provides 50 MCP tools across 7 phases:

Phase 1: SQL Parser & Session (6 tools)

  • parse_sql - Parse SQL and return AST
  • extract_case_statements - Extract CASE WHEN logic
  • analyze_sql_complexity - Query complexity metrics
  • start_discovery_session - Initialize discovery session
  • get_discovery_session - Get session state
  • export_discovery_evidence - Export evidence

Phase 2: Semantic Graph (8 tools)

  • build_semantic_graph - Build from schema
  • add_graph_relationship - Add edge
  • find_join_paths - Find join candidates
  • And more...

Phase 3-7: See full documentation

Entity Types

The discovery engine detects 12 standard entity types:

Entity Description
account GL accounts, chart of accounts
cost_center Cost centers, profit centers
department Organizational departments
entity Legal entities, companies
project Projects, work orders
product Products, SKUs
customer Customers, clients
vendor Vendors, suppliers
employee Employees, workers
location Geographic locations
time_period Time periods, fiscal periods
currency Currencies

License

MIT

Metadata

Release files for databridge-discovery 0.44.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databridge-discovery 0.44.0
File Size Uploaded Provenance
databridge_discovery-0.44.0.tar.gz 198.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for databridge-discovery 0.44.0
File Interpreter ABI Platform
databridge_discovery-0.44.0-py3-none-any.whl Python 3 none any Details

Total release size: 396.8 kB

Release files / databridge_discovery-0.44.0.tar.gz

Download URL databridge_discovery-0.44.0.tar.gz
Size 198.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6993090567ccff95e48b3df36edd638f75372a012aba45b1d3a9c04980d011f4
BLAKE2b-256 checksum
How to use checksums
c718ebaecd10ca21b69e7d470da07ee1a882aeb3738ef243c81625e12dccb68c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / databridge_discovery-0.44.0-py3-none-any.whl

Download URL databridge_discovery-0.44.0-py3-none-any.whl
Size 198.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bf587166c35da9461ebbf1147a612d8c0fc039c695a3a5d1907d72d3cfc993b
BLAKE2b-256 checksum
How to use checksums
78d2e058e05dda19b09d1c888364f7285ae57ece5090315b1f02060ec19fe2df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for databridge-discovery 0.44.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.44.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page