Skip to content

Chapters

Concepts

  1. What mountainash does: What mountainash is for: data logic written once with a Polars-style API and compiled to Polars, Narwhals-reached libraries and Ibis SQL engines.

Using the package

  1. Installation and the package surface: Installing mountainash and its extras, the top-level namespace, backend detection, and the errors you can catch.
  2. Data types: The canonical data types, how to write them as strings, which casts are safe, and how they map to each backend.
  3. Building expressions: Writing expressions with col, lit and when, using operators and casts, and compiling an expression for a dataframe.
  4. Namespaces, aggregates and windows: String, date, name, struct, list, categorical and geometry namespaces, membership tests, aggregates and window expressions.
  5. Ternary logic and unknown values: Working with TRUE, FALSE and UNKNOWN: ternary columns, sentinel values, and turning ternary results into booleans.
  6. Relations: Creating relations from dataframes, Python data and Arrow, then filtering, joining, grouping, reshaping and combining them.
  7. Collecting results: Running a relation and getting results back as dataframes, Python objects or single values, and inspecting a plan.
  8. Execution targets and backend capabilities: Choosing where a relation runs, how data moves between backends, and what to do when a backend cannot run an operation.
  9. Table schemas and DataPackage: Declaring table schemas, reading and writing Frictionless descriptors and DataPackages, and extracting or converting schemas.
  10. Conforming data to a schema: Making a relation match a table schema, choosing how strict to be, and reporting how the data drifted.
  11. Data contracts: Declaring data contracts with fields and rules, and running them with a Validator.
  12. Validation: The validation engine: check kinds, running checks, reading results and failure cases, and foreign-key checks.
  13. RelationDAG: Building a graph of named relations, collecting it, and round-tripping it through a DataPackage.
  14. Pipelines: Composing units into pipelines and running them with checkpoints, resume and retry.
  15. Backend support and known limits: Which operations each backend and SQL dialect supports, and the known differences between them.

Internals

  1. Architecture: How mountainash separates protocols, API builders and backends, and why.
  2. How expressions compile: How an expression becomes a backend-native expression: function keys, the registry, AST nodes and the visitor.
  3. How relations compile: How a relation plan compiles: relation nodes, operation keys, relation systems and the relation visitor.
  4. The capability spine: How backend capabilities are declared, loaded and enforced when a plan is built and run.
  5. Backends: How the Polars, Narwhals and Ibis backends are assembled, and where each one differs.
  6. Extending mountainash: Adding operations, relation nodes, capability declarations, type adapters, ingress handlers, pipeline units and rules.
  7. Contributing and testing: Naming and import conventions, error conventions, and how cross-backend tests and known divergences work.