Proyek
Lihat di GitHub
boringdata/boring-semantic-layer
Tentang
The Boring Semantic Layer (BSL) is a lightweight semantic layer based on Ibis.
Proyek lainnyaPertumbuhan bintang terukur
- dalam 24 jam
- +1
- dalam 7 hari
- +1
- dalam 15 hari
- +5
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliBoring 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.
Jelajahi proyek terkait
Memuat…