Skip to content
GitLab

Data Lifecycle

Every data product on the Akili platform follows a deterministic lifecycle defined entirely by 6 YAML manifest files. Developers declare what they want — the platform handles how it executes.

%%{init: {'flowchart': {'curve': 'basis'}}}%%
flowchart LR
    A[Declare] --> B[Ingest]
    B --> C[Transform]
    C --> D[Quality Gate]
    D --> E[Serve]
    E --> F[Monitor]
    F --> G[Archive]
    D -- "fail (critical)" --> H[DLQ]
    H -- "replay" --> C

The data product starts as 6 YAML manifest files that fully describe its behavior:

ManifestWhat It Defines
product.yamlIdentity, ownership, archetype, classification, schedule
inputs.yamlSource connections and upstream product dependencies
transform.sql / transform.pyBusiness logic (SQL or Python)
output.yamlOutput schema, partitioning, retention
quality.yamlQuality checks and SLA definitions
serving.yamlServing intents (analytics, lookup, streaming)

Manifests are validated locally with akili validate and registered with the platform via akili product create.

Terminal window
# Validate manifests
akili validate .akili/
# Register the product
akili product create --name daily-orders --namespace sales
# Deploy to the execution engine
akili product deploy daily-orders

Input ports pull data from external sources or upstream data products. The ingestion strategy is declared in inputs.yaml:

StrategyBehaviorUse Case
cdcContinuous change data capture from database WALReal-time from relational databases
incrementalCursor-based extraction (WHERE updated_at > last_run)Periodic sync from any SQL source
full_refreshComplete dataset extraction on every runSmall reference tables
snapshot_diffFull extract with row-level diff against previous snapshotLegacy sources without change tracking

Each ingestion strategy tracks its own state (WAL position, cursor high-water mark, or snapshot hash) to enable exactly-once semantics across failures.

The execution engine runs the declared transformation logic. Transforms reference upstream data using the {{ ref() }} macro:

SELECT
DATE_TRUNC('day', o.order_date) AS date,
o.region,
SUM(o.total_amount) AS total_revenue
FROM {{ ref('orders') }} o
GROUP BY 1, 2

The platform generates all orchestration code automatically via akili codegen. Developers write only business logic — no Dagster code, no boilerplate.

Transforms execute in isolated compute containers with resource limits from compute.yaml:

compute:
engine: dagster
schedule: "0 6 * * *"
resources:
cpu: "1"
memory: 2Gi
timeout: 1800
retries: 2

After transformation, quality checks from quality.yaml execute. This is a blocking gate — data does not proceed to serving stores until quality is verified.

%%{init: {'flowchart': {'curve': 'basis'}}}%%
flowchart TB
    TRANSFORM[Transform Complete] --> QC[Run Quality Checks]
    QC --> CRITICAL{Critical checks pass?}
    CRITICAL -- yes --> WARNING[Evaluate warnings]
    WARNING --> PROMOTE[Promote to serving]
    CRITICAL -- no --> BLOCK[Block promotion]
    BLOCK --> DLQ[DLQ after retries]
    BLOCK --> ALERT[SLA breach alert]
SeverityBehavior
criticalBlocks promotion. Consumers continue seeing the last good data.
warningLogged but does not block. Data is promoted, issue is flagged.

Quality scores are recorded per product and per run, enabling trend analysis and regression detection.

Once quality gates pass, data is routed to serving stores based on serving.yaml. The platform supports intent-based routing — each serving mode targets a different access pattern:

IntentBacking StoreAccess Pattern
analyticsStarRocks (via Iceberg federation)OLAP queries, dashboards, aggregations
lookupPostgreSQLPoint lookups by key, low-latency reads
streamingRedpandaReal-time event stream for downstream consumers

Data is always written to the data lake (Iceberg on Ceph RGW) first, then materialized to serving stores. The lake is the single source of truth; serving stores are derived views.

serving:
modes:
- intent: analytics
config:
engine: starrocks
materialized: true
refresh_interval: "1h"
- intent: lookup
config:
engine: postgresql
cache_ttl: "5m"

The platform continuously monitors every deployed data product:

  • Freshness SLA — is the latest materialization within the configured threshold?
  • Quality score — rolling average of quality check pass rates
  • Execution health — failure rate, duration trends, retry frequency
  • Serving availability — are serving endpoints responsive?

When an SLA is breached, the platform emits an sla.breach event and notifies configured channels (email, webhook, PagerDuty).

Terminal window
# Check current SLA status
akili governance sla daily-orders
# View execution history
akili run list daily-orders
# Check quality scores
akili governance quality daily-orders

Data products have configurable retention policies. When data exceeds the retention period:

  1. A retention.expired governance event is emitted
  2. The product owner is notified
  3. The owner explicitly triggers deletion or extends retention
  4. Deletion uses position delete files — non-destructive until compaction

The platform never auto-deletes data. This is a deliberate safety mechanism to prevent accidental data loss from misconfigured retention.

Three scheduling modes control when a data product’s pipeline executes:

ModeTriggerUse Case
cronTime-based schedule (e.g., "0 6 * * *")Regular batch processing
eventUpstream data.available eventReactive, data-driven pipelines
adaptiveEvent-driven with debounce and fallback cronNear-real-time freshness SLAs

The adaptive mode deploys a per-product trigger agent that consumes event bus messages, debounces them, and fires materializations when freshness would breach the SLA.

At every stage, failures are handled gracefully:

Failure PointBehavior
Ingestion failureRetry with exponential backoff, then DLQ
Transform errorRetry up to retries count, then DLQ
Quality gate failureBlock promotion, retry, then DLQ
Serving write failureRetry, circuit breaker opens after threshold

The dead letter queue (DLQ) captures all failed events with full context for manual inspection and replay. See DLQ Management for details.