المشاريع
عرض على GitHub
boringdata/boring-semantic-layer
حول
The Boring Semantic Layer (BSL) is a lightweight semantic layer based on Ibis.
مشاريع أخرىالنمو المقاس للنجوم
- خلال 24 ساعة
- +١
- خلال 7 أيام
- +١
- خلال 15 يومًا
- +٥
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلBoring 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.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…