semantic_views
Semantische Sichten – eine deklarative Schicht für Dimensionen, Metriken und Beziehungen
Maintainer: anentropic
Installation und Laden
INSTALL semantic_views FROM community;LOAD semantic_views;Beispiel
-- Create sample dataCREATE TABLE demo(region VARCHAR, amount DECIMAL(10,2));INSERT INTO demo VALUES ('US', 100), ('US', 200), ('EU', 150);
-- Define a semantic viewCREATE SEMANTIC VIEW sales AS TABLES (d AS demo PRIMARY KEY (region)) DIMENSIONS (d.region AS d.region) METRICS (d.revenue AS SUM(d.amount));
-- Query itFROM semantic_view('sales', dimensions := ['region'], metrics := ['revenue']);Über semantic_views
Semantische Sichten lassen Sie Dimensionen, Metriken, Joins und Filter einmal definieren und anschließend beliebige Kombinationen abfragen. Die Erweiterung übernimmt GROUP BY, JOIN und die Filterzusammensetzung automatisch. Unterstützt Multi-Tabellen-Joins mit PK/FK-Beziehungen, Fan-Trap-Erkennung, Role-Playing-Dimensionen, abgeleitete Metriken und FACTS.
Dokumentation: https://anentropic.github.io/duckdb-semantic-views/
Hinzugefügte Funktionen
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| __sv_compute_create_from_yaml | table | NULL | NULL | |
| describe_semantic_view | table | NULL | NULL | |
| explain_semantic_view | table | NULL | NULL | |
| get_ddl | scalar | NULL | NULL | |
| list_semantic_views | table | NULL | NULL | |
| list_terse_semantic_views | table | NULL | NULL | |
| read_yaml_from_semantic_view | scalar | NULL | NULL | |
| semantic_view | table | NULL | NULL | |
| show_columns_in_semantic_view | table | NULL | NULL | |
| show_semantic_dimensions | table | NULL | NULL | |
| show_semantic_dimensions_all | table | NULL | NULL | |
| show_semantic_dimensions_for_metric | table | NULL | NULL | |
| show_semantic_facts | table | NULL | NULL | |
| show_semantic_facts_all | table | NULL | NULL | |
| show_semantic_materializations | table | NULL | NULL | |
| show_semantic_materializations_all | table | NULL | NULL | |
| show_semantic_metrics | table | NULL | NULL | |
| show_semantic_metrics_all | table | NULL | NULL |
Überladene Funktionen
Diese Erweiterung fügt keine Funktionsüberladungen hinzu.
Hinzugefügte Typen
Diese Erweiterung fügt keine Typen hinzu.
Hinzugefügte Einstellungen
Diese Erweiterung fügt keine Einstellungen hinzu.