Projetos
Ver no GitHub
boringdata/boring-semantic-layer
Sobre
The Boring Semantic Layer (BSL) is a lightweight semantic layer based on Ibis.
Outros projetosCrescimento medido de estrelas
- em 24 h
- +1
- em 7 dias
- +1
- em 15 dias
- +5
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalBoring Semantic Layer (BSL)
The Boring Semantic Layer (BSL) is a lightweight semantic layer based on Ibis.
Key Features:
- Lightweight:
pip install boring-semantic-layer - Ibis-powered: Built on top of Ibis, supporting any database engine that Ibis integrates with (DuckDB, Snowflake, BigQuery, PostgreSQL, and more)
- MCP-friendly: Perfect for connecting LLMs to structured data sources
Quick Start
pip install 'boring-semantic-layer[examples]'
1. Define your ibis input table
import ibis
# Create a simple in-memory table
flights_tbl = ibis.memtable({
"origin": ["JFK", "LAX", "JFK", "ORD", "LAX"],
"carrier": ["AA", "UA", "AA", "UA", "AA"]
})
2. Define a semantic table
from boring_semantic_layer import to_semantic_table
flights = (
to_semantic_table(flights_tbl, name="flights")
.with_dimensions(origin=lambda t: t.origin)
.with_measures(flight_count=lambda t: t.count())
)
3. Query it
result_df = flights.group_by("origin").aggregate("flight_count").execute()
📚 Documentation
This project is a joint effort by xorq-labs and boringdata.
We welcome feedback and contributions!
Freely inspired by the awesome Malloy project. We loved the vision, just took the Python route.
Explore projetos relacionados
Carregando…