What it is
CDS is a compiler and CLI for declarative data stacks. You describe the stack in YAML. CDS validates it, resolves the couplings and renders a single Docker Compose model from it, or a Helm chart with --target helm. CDS does not run containers itself. For cds up it calls the real docker compose.
Building blocks
- Modules (
modules/<category>/<name>/module.yaml) are reusable definitions. They contain: - a closed JSON-Schema
configSchemawith defaults, - the contracts they provide (
provides) and consume (consumes), - an inline Compose template and optionally a Kubernetes/Helm implementation.
- Profiles (
profiles/) choose module instances and the topology. - Contracts (
shared/contracts/) describe the interfaces between modules. Examples are a database connection, a lineage sink and an identity provider.
A module never knows the service name of another module. A provider offers a named contract. The consumer links it via mappedFrom, and the profile fixes the binding with contractRef: <module-id>.<contract>. That way you can swap Postgres for another warehouse without touching the rest.
The compile pipeline
load → validate → plan → render
- Validate: checks the shape of profile and modules, module paths, the dependency graph, secrets and contract compatibility.
- Plan: applies schema defaults and resolves contracts into a
cds/v1alpha1Plan. - Render: expands
${config.*},${bindings.*}and${service.host}and produces one Compose model (or a Helm chart with--target helm).
Errors come back as structured diagnostics with a stable code, a message and an exact data path. When errors occur, CDS stops before the next step.
Security
- Secret values never end up in plans or rendered Compose files. Profiles map aliases to
CDS_*environment variables, and Docker Compose resolves them only at runtime. cds testruns validate, the security rules, plan and render. The rules live as data inrule-set.json, so you can extend them without writing Python.- Image hardening (non-root, read-only root, dropped capabilities) and hash-locked dependencies are part of the baseline.
Quick start
pipx install composable-data-stack # published CLI
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -e . # from source
cds validate
cds test
cds render –output /tmp/docker-compose.yml
cds up
Adding your own module
- Create
modules/<category>/<name>/module.yamlwithapiVersion: cds/v1alpha1andkind: Module. - Define the
configSchemawith defaults and theprovides/consumescontracts. - Write the Compose template under
spec.implementation. - Reference it from a profile and run
cds validate.
Why this works for you
- Reproducible stacks: the same YAML produces the same outcome.
- You find errors early, not at deploy time.
- No vendor lock-in thanks to contract-based couplings.
- Tests run without Docker (
unittest,unittest.mock).
Also explained for
Back to Composable Data Stack (CDS) · Source code on GitHub · Contact · Nederlands