Sylin.Koan.Data.Analytics
1.0.46
dotnet add package Sylin.Koan.Data.Analytics --version 1.0.46
NuGet\Install-Package Sylin.Koan.Data.Analytics -Version 1.0.46
<PackageReference Include="Sylin.Koan.Data.Analytics" Version="1.0.46" />
<PackageVersion Include="Sylin.Koan.Data.Analytics" Version="1.0.46" />
<PackageReference Include="Sylin.Koan.Data.Analytics" />
paket add Sylin.Koan.Data.Analytics --version 1.0.46
#r "nuget: Sylin.Koan.Data.Analytics, 1.0.46"
#:package Sylin.Koan.Data.Analytics@1.0.46
#addin nuget:?package=Sylin.Koan.Data.Analytics&version=1.0.46
#tool nuget:?package=Sylin.Koan.Data.Analytics&version=1.0.46
Sylin.Koan.Data.Analytics
Declared analytics for Koan entities: name a question once — a measure, an optional grouping, an
optional filter, a row cap — and it becomes part of the application's shared vocabulary: runnable from
code, listed over HTTP at /analytics/catalog (with Koan.Data.Analytics.Web), and askable by agents
through the analytics.list_questions / analytics.ask MCP tools.
Declare
public sealed class Todo : Entity<Todo>
{
static Todo()
{
// On-demand: computed where the data lives, bounded, labeled live.
Analytics.Question<Todo, Guid>("open-count",
q => q.Where(t => !t.Done).Count());
// Materialized: refreshed on a cadence, served within the declared tolerance.
Analytics.Question<Todo, Guid>("count-by-priority",
q => q.By(t => t.Priority).Count()
.Materialize(r => r.Every(TimeSpan.FromHours(6))
.ServeWithin(TimeSpan.FromMinutes(15))
.BackfillOnRead()));
}
}
Run
var answer = await Analytics.Of<Todo, Guid>().Run("count-by-priority");
answer.Engine; // which store answered
answer.Age; // "live", or the materialization's age (e.g. "132s")
answer.ServedFrom; // "materialization" | "live" — never silent staleness
answer.Completion; // Complete | RowCapped
answer.Rows; // the values
Unknown names refuse with the catalog — and are recorded in the request-a-recipe loop, so the gap between what is declared and what is asked becomes visible instead of silent.
Projections
A materialized question's answer is stored in the elected engine (per-host DuckDB file at
.koan/analytics/Koan.duckdb), refreshed by cadence, by boot catch-up, by read-backfill, or through
the trigger door — POST /analytics/refresh/{name} and question.RefreshAsync(...). Materialized rows
are served through the read-model door: GET /analytics/{name}/rows?limit=&offset=&format=csv, with
equality filters on declared columns. On-demand questions have no rows — the door refuses and points
at Run.
The materialization is per-host by design: the engine is single-writer per file, and a derived store that rebuilds from the record store wants exactly that topology.
Honest envelope
- On-demand asks compute where the data lives — the entity's relational record store composes the aggregate in its own dialect.
- Questions are parameter-free in this grammar version; document-expression mapped indexes are governed by each store's declared capabilities.
- Only direct property expressions are expressible; everything else refuses with a corrective.
- Cron spelling arrives with the scheduler pillar; refresh cadence is
Every(TimeSpan)today.
Decision authority: DATA-0123.
Install
dotnet add package Sylin.Koan.Data.Analytics
What it adds
Declared analytics for Koan entities: named, bounded, self-describing questions with a catalog that humans and agents share. Engine acceleration is elected from a capable connector (DuckDB first, DATA-0123).
Limits
Configuration decides participation; unsupported requests reject before provider work with a named capability and a correction. Provider-specific limits live in the package's TECHNICAL.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 1.0.39 && < 2.0.0)
- Sylin.Koan.Data.Abstractions (>= 1.0.41 && < 2.0.0)
- Sylin.Koan.Data.Core (>= 1.0.73 && < 2.0.0)
- Sylin.Koan.Data.Relational (>= 1.0.60 && < 2.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Sylin.Koan.Data.Analytics:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Data.Connector.Sqlite
Durable embedded SQLite provider for Koan Entity data with zero-config local storage, schema management, queries, and bounded paging. |
|
|
Sylin.Koan.Data.Analytics.Web
The analytics catalog and ask surface over HTTP and MCP: one vocabulary served to browsers, services, and agents. |
|
|
Sylin.Koan.Data.Connector.DuckDb
Embedded DuckDB provider for Koan Entity data: an in-process analytical engine for aggregation, bulk load, and lakehouse file queries, with full Entity CRUD over local storage. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.46 | 110 | 9/13/2026 |
| 1.0.43 | 137 | 9/12/2026 |
| 1.0.40 | 112 | 9/12/2026 |
| 1.0.38 | 126 | 9/10/2026 |
| 1.0.34 | 122 | 9/10/2026 |
| 1.0.30 | 124 | 9/9/2026 |
| 1.0.26 | 110 | 9/9/2026 |
| 1.0.23 | 129 | 9/9/2026 |
| 1.0.18 | 125 | 9/9/2026 |
| 1.0.16 | 127 | 9/9/2026 |
| 1.0.11 | 131 | 9/5/2026 |
| 1.0.10 | 142 | 8/30/2026 |
| 1.0.9 | 127 | 8/30/2026 |
| 1.0.7 | 124 | 8/28/2026 |
| 1.0.6 | 122 | 8/28/2026 |
| 1.0.4 | 128 | 8/28/2026 |
| 1.0.2 | 121 | 8/28/2026 |
| 1.0.0 | 120 | 8/28/2026 |