Repository navigation
SLayer 2.0.0
SLayer 2.0 is the Ossie release: its vocabulary, its documents and its queries now follow the open Ossie semantic-model specification, and its answers are the same on every database. It is a major release with breaking changes, so read Upgrading to 2.0 before you move. Your stored datasets, saved queries, memories and datasources keep working as they are: SLayer upgrades them in memory each time it loads them, and stores the new format only when you ask it to.
Ossie, end to end
SLayer speaks Ossie's vocabulary: models are datasets, columns are fields, measures are metrics, joins are relationships, and a query's source_model is its population. The old spellings still work throughout 2.x, each with a deprecation warning, and stop working in 3.0.
You can import an Ossie semantic-model document as it is: slayer import-osi stores it verbatim, refuses an invalid one with every reason, and slayer export-osi writes it back. A model-scoped metric is queried by its bare name, and slayer ossie-roundtrip <in> <out> grades portable on every rung of Ossie's portability ladder.
If you need Ossie's exact query behaviour, run a query with conformance="ossie-l3": SLayer then answers Ossie's wide-table queries with Ossie's rows, output names and error codes, and refuses what Ossie refuses. By default SLayer still answers the many queries Ossie rejects, with warnings. The new Ossie compliance page lists what SLayer supports at each Ossie layer, and what it does not support yet.
One meaning everywhere
Expressions are now SQL-like: names match in any case, double quotes name a field, single quotes make a string, and -- starts a comment. The old colon spellings such as amount:sum are gone. Casts, LIKE, rounding, date parts and comparisons between text and numbers give the same result on every database.
Your numbers are safer by default. An aggregate sliced by a dimension its dataset does not determine (sum(customers.spend) by orders.status) now counts each customer once per cell instead of repeating the grand total. A declared many-to-one relationship no longer changes a value unless you mark it trusted. Every reference starts at a dataset, filters no longer move the population, and transforms such as rank and cumsum read only the cells of their operand.
Your stored files
Loading a store never changes it. Each document that is still in an older format is upgraded in memory, with one warning saying so. Run slayer storage upgrade --dry-run to see what would change, then slayer storage upgrade to store everything in the 2.0 format. Until you do, a 1.x release can still read the store. For dataset files SLayer doesn't manage, slayer.storage.upgrade.upgrade_datasets() returns them in the 2.0 format.
2.0 reserves the names of its new functions. A 1.x custom granularity with one of those names, such as left, is read as left_granularity, and every reference to it follows. Saving that datasource is refused until slayer storage upgrade has stored the rename.
Before you upgrade
SLayer now needs mcp>=2.3. Several Python APIs changed, and a few modules moved. Importing a moved module raises an error naming its new path, except for the 1.x names integrators relied on, such as parse_formula and the schema-drift helpers, which keep working with a deprecation warning until 3.0. to_many_handling: "broadcast", strict and references relative to the population are deprecated and will be removed in 3.0.
Additional technical details
create_mcp_server() returns an mcp 2.x MCPServer; its call_tool() returns a CallToolResult. slayer.engine.syntax and slayer.core.formula moved to slayer.core.syntax, and slayer.osi.expression to slayer.importers.aggregates; parse_formula, parse_filter_expr and their 1.x node classes still import from the old paths, deprecated. A custom SQL client implements get_result_column_types(sql) and explain(statements); custom storage backends implement the current hooks only. Errors keep their 1.x names as deprecated aliases until 3.0. A stored document in an older format loads with one stored_upgrade_needed warning per store until it is saved or upgraded; fresh input in a deprecated form emits one FutureWarning and a structured deprecated_input warning.