Skip to content

Tenants Guide

jinflow is multi-tenant. Each tenant is an independent analytical workspace with its own data, AFS, and KLS.

live_root/
millesime/
domaine_zufferey/
afs/ ← analytical framework (copy of pack + tenant-specific additions)
raw/ ← immutable source CSVs (from DLZ)
build/ ← intermediaries (compiled SQL, enriched CSVs)
store/ ← KLS + SIS + logs + snapshots

All commands use pack.tenant notation:

Terminal window
jin make --tenant millesime.domaine_zufferey
jin explore --tenant millesime.domaine_zufferey
jin afs update --tenant millesime.domaine_zufferey
Terminal window
# From a pack name (resolved via pack_root)
jin init --pack millesime --tenant domaine_new --source-system opale
# From a pack path
jin init --pack /path/to/jinflow-pack-millesime --tenant domaine_new --source-system opale

This creates live_root/millesime/domaine_new/ with:

  • afs/ — copy of the pack
  • raw/, build/, store/ — empty, ready for data

When the pack is updated (new signals, theses, etc.):

Terminal window
# Dry-run (see what would change)
jin afs update --tenant millesime.domaine_zufferey
# Apply changes
jin afs update --tenant millesime.domaine_zufferey --do-it
# All tenants across all packs
jin afs update --all --do-it
# Force pack version on conflicts
jin afs update --tenant millesime.domaine_zufferey --do-it --force

Three-way sync: pack base manifest tracks what was synced last. If both pack and tenant changed the same file → conflict (not overwritten unless --force).

Terminal window
jin make --tenant millesime.domaine_zufferey # build one tenant
jin make --pack millesime # all tenants in pack
jin make --all # all tenants, all packs
jin make --all --sync # sync DLZ + build
jin make --tenant millesime.domaine_zufferey --extract # Excel → CSV → sync → build
jin make --tenant millesime.domaine_zufferey --clean # clear intermediaries, full rebuild

Every tenant has a pipeline.yml at afs/scripts/pipeline.yml that declares every file crossing the extraction layer: exact path, SHA-256 pin, source type, expected schema, attribution. The configuration IS the contract, and the contract is the audit trail. Reading it tells you the complete universe of what jin make --extract will ever touch.

afs/scripts/pipeline.yml
extract:
- id: opale_cases_v2026_02
script: extract_opale_xlsx_csv.py
purpose:
summary: "OPALE clinical export — cases, procedures, materials, billing events"
delivered_by: "Sapheneia (Raffa channel)"
delivered_at: "2026-02-17"
source:
type: system_export
path: "opale/xslx/V2026-02/cases.xlsx"
sha256: "a3b5c7f89012e8d4cdef0123456789abcdef0123456789abcdef0123456789ab"
output:
- { path: "build/csv/cases.csv", required: true }
- { path: "build/csv/procedures.csv", required: true }
expected:
sheets:
- name: "Fälle"
required_columns: ["ABT", "FALL", "EINTRITT", "AUSTRITT"]
min_rows: 10000

The file is tenant-specific and fully self-contained — there is no pack-level inheritance. Two tenants in the same pack using the same source system still have different pipeline.yml files because delivery channels, file versions, and auxiliary files differ.

See the Extraction Guide for the six source types, the zero-transform rule, and the jin extract --contract inspection command.

The pipeline has two phases: pre-make (gathers inputs, has side effects) and make (a pure function, AFS in → KLS out).

Terminal window
jin clone --source millesime.domaine_zufferey --name experiment
# Creates: millesime.domaine_zufferey_experiment (shares DLZ with source)
Terminal window
jin make --snapshot # auto-tag: YYYYMMDD-HHMM
jin make --snapshot post-audit # named tag

Snapshots are immutable — make refuses to overwrite them.

Terminal window
# Set default tenant
jin us --tenant millesime.domaine_zufferey
# Show current config
jin us

Output:

Live root: /path/to/jinflow-live
Pack root: /path/to/jinflow-packhub (4 packs)
DLZ: /path/to/jinflow-datalandingzone (ok)
Current tenant: millesime.domaine_zufferey

Each pack is an independent analytical domain. Tenants belong to one pack:

live_root/
millesime/ ← winemaking analytics
domaine_zufferey/
domaine_clavien/
alptrack/ ← ski resort analytics
resort_alpine/
resort_glacier/

Packs are developed independently (separate git repos) and synced to tenants via jin afs update.

jazzisnow jinflow is a jazzisnow product
v0.45.1 · built 2026-04-17 08:14 UTC