Skip to main content

DATAMIMIC โ€” Governed Test Data for Regulated Enterprises

This repository contains the DATAMIMIC Community Edition (CE). MIT-licensed, Python-native, MCP-ready.

CE is fully usable standalone for deterministic synthetic data generation and PII-aware pseudonymization. The Enterprise Platform adds governed workflows, PII scanning, role-based access, audit logging, scheduling, multi-system execution, and the full operational layer that regulated enterprises require.

๐Ÿ‘‰ Enterprise Platform: datamimic.io ย |ย  ๐Ÿ“˜ Docs: docs.datamimic.io ย |ย  ๐Ÿ“… Book a strategy call: datamimic.io/contact

๐Ÿค– AI agent? Start at AGENTS.md: register the MCP server, then author descriptors with the datamimic_reference โ†’ datamimic_check (lint) โ†’ datamimic_run (dry-run) loop. Verified end-to-end examples live in examples/showcase/.


CI Coverage Maintainability Python License: MIT MCP Ready


What is DATAMIMIC?

DATAMIMIC CE is the open-source deterministic data engine at the core of the DATAMIMIC Enterprise Platform. It is usable standalone for synthetic data generation and PII-aware pseudonymization in any local, CI, or agent-driven workflow.

The Enterprise Platform adds the governed workflows, scanners, dashboards, and execution layer that regulated enterprises require for production-scale test-data operations.

Available in CE (this repo):

  • Generate fully synthetic, deterministic datasets โ€” model-driven, no source data required
  • Pseudonymize staging/QA exports โ€” deterministic (seeded) or privacy-maximized (non-seeded) field transformation; PII fields identified and modeled manually in the XML pipeline
  • Execute single-system pipelines against PostgreSQL ยท MySQL ยท Oracle ยท MS SQL ยท SQLite ยท MongoDB ยท CSV ยท JSON ยท XML ยท XLSX ยท DbUnit ยท fixed-width (.fcw)
  • Model behavior โ€” weighted state machines, composite multi-field references, control flow (<while>, <assert>), and a scriptable memstore for staged aggregation
  • Emit provenance โ€” append-only execution logs and per-output content hash for audit re-execution
  • Serve agents โ€” bundled MCP server with the full authoring loop (datamimic_reference DSL lookup, datamimic_check lint with fix hints, datamimic_run safe dry-run) plus the deterministic generate tool

The Enterprise Platform adds:

  • PII scanner โ€” probability-scored field detection with configurable thresholds via DataWorkbench
  • Multi-system execution โ€” Oracle / MongoDB / Kafka in coordinated workflows with referential integrity
  • Industry message templates โ€” EDIFACT / SWIFT MT / HL7 v2.x / HL7 FHIR generated as deterministic test/training artefacts
  • Governance layer โ€” role-based dashboards, audit trails, approval flows, reusable enterprise templates, scheduler
  • Performance core โ€” Rust fastpath, ML/auto-regressive engine for complex distributions, keyset and manifest building, optimised distributed execution
  • On-premise / air-gapped deployment โ€” podman-compose or Helm, with consulting-led rollout

Deployed in regulated EU banking environments for deterministic test data across Oracle, MongoDB, and Kafka pipelines. Reference customers available under NDA โ€” see also datamimic.io case studies.


AI agents: author, validate, and run data models (MCP)

DATAMIMIC CE ships a Model Context Protocol (MCP) server that Claude Code, Cursor, and any MCP-compatible agent can call. The working loop: look up the DSL with datamimic_reference, author a descriptor, lint it with datamimic_check (every finding has a rule id and a fix hint), dry-run it with datamimic_run (capped counts, sample rows, optional smoke_export), then run for real with datamimic run. AGENTS.md routes agents working in a checkout of this repo; examples/showcase/ holds four verified end-to-end examples to start from.

pip install "datamimic_ce[mcp]"

Register with your coding agent (stdio)

Claude Code โ€” one command:

claude mcp add datamimic -- datamimic-mcp serve --transport stdio

Cursor / Claude Desktop / any mcp.json client โ€” add to the config (.cursor/mcp.json, or the project-level .mcp.json):

{
  "mcpServers": {
    "datamimic": {
      "command": "datamimic-mcp",
      "args": ["serve", "--transport", "stdio"]
    }
  }
}

VS Code (.vscode/mcp.json) uses the same command/args under a servers key. For a networked/shared server instead of stdio, run datamimic-mcp serve --transport sse (honours DATAMIMIC_MCP_HOST / PORT / API_KEY).

The server ships the DSL authoring toolset (AI linter): datamimic_reference (cheatsheet, element schemas, recipes), datamimic_check (aggregated diagnostics โ€” every finding has a rule id and a fix hint) and datamimic_run (safe dry-run with capped counts, neutralized targets and sample rows). Agents draft a descriptor, lint it, dry-run it and iterate until green โ€” the resulting XML is a reviewable, deterministic artifact instead of a black-box generation. Without MCP, the datamimic capabilities CLI prints the same DSL surface as JSON, generated from the engine registries.

๐Ÿ“˜ Full guide: docs/mcp_quickstart.md

Prompts to paste into your agent

The configuration above wires the MCP server into your tool. The three prompts below are different: paste them as-is into the chat of an agent that already has file and shell access (Claude Code, Cursor, Copilot, Gemini CLI). The agent then does the install, authoring, and verification itself.

1. Set up DATAMIMIC

Install DATAMIMIC CE and register its MCP server with this tool.

1. Run: pip install "datamimic_ce[mcp]"
2. Register the MCP server. If this tool supports `claude mcp add`, run:
   claude mcp add datamimic -- datamimic-mcp serve --transport stdio
   Otherwise add the stdio equivalent to this tool's MCP config file (for
   example .cursor/mcp.json or .vscode/mcp.json):
   {
     "mcpServers": {
       "datamimic": {
         "command": "datamimic-mcp",
         "args": ["serve", "--transport", "stdio"]
       }
     }
   }
3. Verify the MCP server: call the datamimic_reference tool with
   topic=overview and show me the first few lines of the result.
4. Verify the CLI: run `datamimic version` and show me the output.

Report both verification results before doing anything else.

2. Generate test data

Generate a test dataset of 100 customers using DATAMIMIC.

Requirements:
- 100 records, one Person each, with an incrementing integer id.
- Realistic name and email, generated from the Person entity, not
  hand-rolled faker calls.
- Age between 18 and 90.
- A "segment" field with at least two values, unevenly weighted (mostly
  "retail", some "business").
- Write the output as JSON.

Steps:
1. If you are working inside a checkout of the datamimic repository, read
   AGENTS.md first. It explains the DSL authoring loop.
2. Author a DATAMIMIC XML descriptor for this dataset.
3. Validate it with the datamimic_check MCP tool (or `datamimic lint <path>`
   if MCP is not available). Fix every finding before moving on.
4. Dry-run it with the datamimic_run MCP tool and inspect the sample rows
   it returns. Confirm ages are in range and the segment split looks
   weighted, not uniform.
5. Run it for real: `datamimic run <path-to-descriptor>`.
6. Tell me where the JSON output landed and show me one sample record.

3. Seed a relational dataset

Seed a relational dataset with referential integrity: customers, accounts,
transactions.

Follow the pattern in examples/showcase/01-banking-core in the datamimic
repository: customers get an incrementing id; each customer gets 1-3
accounts that carry the real customer id as a foreign key; each account
gets several transactions that carry both the account id and, two hops up,
the owning customer id.

Requirements:
- Set rngSeed on <setup> so the dataset is reproducible.
- Every account_id referenced by a transaction must exist in the accounts
  output.
- Every customer_id referenced by an account, and by a transaction, must
  exist in the customers output.

Steps:
1. Read examples/showcase/01-banking-core/datamimic.xml and its README as
   the reference pattern.
2. Author your own descriptor for the customers/accounts/transactions
   shape above.
3. Validate with datamimic_check (or `datamimic lint`), then dry-run with
   datamimic_run and inspect the sample rows.
4. Run for real with `datamimic run`.
5. Before declaring this done, load the generated JSON files and confirm
   every foreign key resolves: every account's customer_id exists in
   customers, every transaction's account_id exists in accounts. Show me
   the check you ran and its result.

Deterministic domain generation (JSON facade)

Descriptor authoring is the primary workflow; the generate tool is a secondary interface that returns structured JSON payloads for a domain without a descriptor.

Agents can call generate with a domain, seed, count, and locale and receive deterministic, provenance-hashed output โ€” making DATAMIMIC the natural test data runtime for agent-driven workflows.

import anyio, json
from fastmcp.client import Client
from datamimic_ce.mcp.models import GenerateArgs
from datamimic_ce.mcp.server import create_server

async def main():
    args = GenerateArgs(domain="person", locale="en_US", seed=42, count=2)
    payload = args.model_dump(mode="python")
    async with Client(create_server()) as c:
        a = await c.call_tool("generate", {"args": payload})
        b = await c.call_tool("generate", {"args": payload})
        # Determinism proof: identical hashes across calls
        assert (json.loads(a[0].text)["determinism_proof"]["content_hash"]
             == json.loads(b[0].text)["determinism_proof"]["content_hash"])

anyio.run(main)

CE vs Enterprise Platform

CE and EE are not the same engine with a feature flag. They share the DSL and determinism contract, but EE is an independently optimised execution engine built for enterprise-scale throughput and operational control.

Engine comparison

Capability Community Edition (CE) Enterprise Platform (EE)
Deterministic data generation โœ… โœ…
Deterministic seeding in the DSL โœ… entities + standalone literal <key generator> (4.0.0) โœ… same, plus sandboxed script expressions and stdlib random calls
Pseudonymization โ€” seeded (GDPR Art. 4(5); supports Art. 25 / Art. 32) โœ… manual model โœ… automated via DataWorkbench
Pseudonymization โ€” non-seeded (privacy-maximized) โœ… manual model โœ… automated via DataWorkbench
Python API + XML pipelines โœ… โœ…
Domain models: Finance, Healthcare, Demographics โœ… โœ…
Time-series generation (<generate start/end/interval>, ISO 8601, prefix-stable) โœ… โœ…
MCP server for AI agent integration โœ… โœ…
CLI + local execution โœ… โœ…
Scale millions of records via Python multiprocessing (and optional Ray) designed for billion-record workloads โ€” Rust fastpath, optimised multi-process execution, and keyset/manifest building on top of the shared Ray distribution layer
PII scanner โŒ โœ… probability-scored field detection, configurable threshold, DataWorkbench integration
Runtime configuration profiles โŒ โœ… Performance ยท Balanced ยท Flexibility
Memory management standard optimised for high-volume batch and streaming
Logging granularity flat execution log configurable: minimal ยท standard ยท deep nested tracing
Nested structure evaluation basic deep nested generation with extended condition + ruleset evaluation
Importer / exporter logging โŒ per-stage logging for importers and exporters
Error handling standard exceptions structured error catalog with recovery strategies
Rust fastpath โŒ performance-critical paths in Rust
Keyset and manifest building โŒ reads live DB schemas to build coordinated multi-table generation plans
ML / auto-regressive engine โŒ combine statistical models with conditions, rulesets, validators for complex distributions

Platform capabilities (EE only)

Capability EE
Multi-user collaboration โœ…
Role-based access control (RBAC) โœ…
Audit logs + provenance dashboards โœ…
PII scanner โ€” probability scoring, threshold-based field flagging โœ…
DataWorkbench โ€” visual field mapping and pseudonymization model builder โœ…
Reusable enterprise template library โœ…
Scheduled execution + task runner โœ…
CI/CD pipeline integration (Tosca, Jenkins, GitLab) โœ…
Multi-system execution: Oracle, MongoDB, Kafka โœ…
Template engine: schema-aware editors for EDIFACT, SWIFT MT, HL7 v2.x, and HL7 FHIR โ€” customer-uploadable specs, further industry formats built per engagement on the same framework โœ…
Audit-evidence artefacts for GDPR Art. 30 records, PCI DSS 4.0 Req. 6.5.5 (test data) reviews, and โ€” for US Covered Entities / Business Associates โ€” HIPAA ยง164.312 evidence packs โœ…
On-premise deployment + air-gapped environments โœ…
LSP-powered IDE tooling for DSL authoring โœ…

๐Ÿ‘‰ Explore the Enterprise Platform ย |ย  Book a platform demo


EE runtime profiles

The EE core supports three runtime configuration profiles, selectable per execution context:

Profile Optimises for Typical use case
Performance Maximum throughput via Rust fastpath, optimised multi-process execution, and Ray-based distribution Bulk generation at billion-record volumes to PostgreSQL, Oracle, Kafka
Balanced Throughput + full audit logging Standard enterprise pipeline runs with compliance requirements
Flexibility Deep nested evaluation, extended condition and ruleset processing Complex domain models with ML engine combinations, multi-level referential structures

Logging depth is independently configurable per profile โ€” from minimal (throughput-optimised) to full nested tracing across importers, exporters, and generation stages.


EE template engine

The EE template engine generates industry-standard financial messages from DATAMIMIC models. The workbench parses uploaded message samples, auto-detects the message type, and validates edits against the registered spec version in real time.

Capabilities

  • Spec-aware form editing โ€” segments and elements rendered as structured forms with mandatory/optional indicators, per-field value suggestions, and inline custom-extension support
  • Strict validation against baked spec versions, with segment- and element-level error reporting
  • Advisory mode when a spec is unregistered or in draft โ€” editing stays enabled, validation continues as guidance
  • Round-trip between the structured form view and the authoritative template text โ€” no fidelity loss
  • Download / adjust / upload your own spec โ€” customers can extend or override the baked spec catalogue without waiting for a release
  • Live structure tree + preview for every edit
  • File auto-detection โ€” upload an existing message, the editor identifies the type and loads the matching spec

Format coverage

Format Coverage
UN/EDIFACT Schema-aware form editor; spec versions and subsets per engagement
SWIFT MT Schema-aware form editor; categories and SR versions per engagement
HL7 v2.x Schema-aware form editor; versions per engagement
HL7 FHIR Schema-aware form editor for FHIR resources (Patient, Observation, Encounter, โ€ฆ); profiles per engagement
Further industry formats (ISO 20022 / MX, vertical dialects) Built into the editor catalogue per customer engagement, on the same framework

Customers can extend the spec catalogue between releases by downloading, adjusting, and uploading their own spec files directly.

Generated messages are deterministic and traceable to their source model, and syntactically valid against the registered spec. They are intended for test and training environments only โ€” they are not network-validated and must not be transmitted on production SWIFTNet or EDI networks. See the SWIFT CSP note below.


Who is DATAMIMIC for?

Enterprise Platform (EE)

Role What DATAMIMIC solves
QA / Test Manager Eliminate manual test data requests. Self-service, governed, always ready.
Business Analyst Define data requirements in business-readable models โ€” no scripting needed.
Platform / DevOps Engineer Integrate deterministic test data generation into CI/CD and scheduled pipelines.
Compliance / Audit Full audit trail for every generation run. Regulator-ready logs, no production data exposure.
Enterprise Architect One governed standard across Oracle, MongoDB, Kafka, flat files, and custom systems.

Community Edition (CE)

Developers and data engineers who need deterministic synthetic data generation or PII-aware pseudonymization in local environments, CI pipelines, or agent-driven workflows. PII field identification is manual โ€” the EE DataWorkbench automates this step.


Why deterministic generation matters

Most test data tools produce random output. That breaks regression tests, audit trails, and cross-team reproducibility.

DATAMIMIC's determinism contract (CE):

  • Same engine version + same model + same seed = byte-identical output, every run, every machine. Holds at three layers: the generate_domain facade, every domain service called directly, and every literal generator that accepts an rng= argument. Verified per-service on every CI run via tests_ce/architecture/test_service_replay_determinism.py.
  • DSL-level seeding: <setup rngSeed="N"> makes the whole model deterministic โ€” every seed-less <variable entity="โ€ฆ"> derives a reproducible child RNG from it, and <variable rngSeed="โ€ฆ"> overrides it for that block (no seed anywhere โ†’ wall-clock random). Verified by tests_ce/integration_tests/test_determinism_seed_scenarios. As of 4.0.0 the same seed also reaches standalone literal generators (<key generator="โ€ฆ">), typed/pattern keys, DateTimeGenerator, and cross-page unique picks โ€” machine-independently.
  • Source reads: distribution="ordered" reads a data source in stable file order; distribution="random" shuffles but replays identically when <setup rngSeed> is set (without a seed the shuffle is non-deterministic by design, for privacy-maximized one-time deliveries). Deterministic shuffling across distributed / multi-process execution is EE.
  • Provenance hash on every facade output = re-executable lineage. Same input โ†’ same determinism_proof.content_hash, always.
  • UUIDv5 entity identifiers = stable across runs and machines.
  • Single wall-clock SPOT (now_utc_naive()); raw datetime.now() is forbidden in production code and the clock-drift architecture gate fails CI on any reintroduction.
  • RNG/clock runtime SPOTs in datamimic_ce/domains/domain_core/runtime/: spawn_rng (reproducible child-RNG derivation), now_utc_naive, and resolve_clock. The same contract vocabulary the Enterprise Platform enforces end-to-end.

The Enterprise Platform (EE) goes further: beyond the CE contract, EE makes the whole execution environment deterministic โ€” a configurable/frozen wall-clock (not just CE's fixed anchor), and deterministic SAFE_GLOBALS plus the Python random functions, so sandboxed script expressions and any stdlib random call replay identically as well.

from datamimic_ce.domains.facade import generate_domain

request = {
    "domain": "person",
    "version": "v1",
    "count": 1,
    "seed": "regression-suite-42",       # identical seed โ†’ identical output
    "locale": "en_US",
    "clock": "2025-01-01T00:00:00Z"      # fixed clock = stable time context
}

response = generate_domain(request)
# response["determinism_proof"]["content_hash"] is stable across runs.

Direct service use is equally deterministic when given a seeded RNG:

import random
from datamimic_ce.domains.finance.services import CreditCardService

# Same seeded Random โ†’ byte-identical CreditCard across runs.
card_a = CreditCardService(rng=random.Random(42)).generate()
card_b = CreditCardService(rng=random.Random(42)).generate()
assert card_a.bic == card_b.bic and card_a.card_number == card_b.card_number

Determinism contract โ€” CE vs EE

Scope CE Enterprise Platform
Facade (generate_domain registered domains) โœ… byte-identical, CI-gated โœ… byte-identical
Domain services (direct use with seeded rng=...) โœ… byte-identical, CI-gated โœ… byte-identical
Literal generators (with seeded rng=...) โœ… byte-identical โœ… byte-identical
RNG / clock runtime SPOTs โœ… spawn_rng, now_utc_naive, resolve_clock โœ… same contract, enforced end-to-end
Architecture gates in CI โœ… facade replay + service replay (every service) + clock drift โœ… 5+ gates (RNG ownership, clock drift, DSL eval, seeded-mode propagation, dataset SPOT)
Custom XML pipelines (seeded via <setup rngSeed>) โœ… byte-identical, machine-independent (single-process) โœ… byte-identical, distributed
Multi-system coordinated execution (Oracle + MongoDB + Kafka in one run) โ€” โœ… byte-identical end-to-end
Seeded vs unseeded pseudonymization (deterministic clock anchor vs CSPRNG live-clock) โ€” โœ…
Threat-led / TLPT-grade audit evidence (full contract enforcement, per-stage execution logging) โ€” โœ…

CE delivers contract-enforced determinism for the synthetic-data generation surface (facade, services, generators) and, as of 4.0.0, for seeded XML descriptors โ€” byte-identical across machines, executed single-process. The Enterprise Platform extends the same contract to distributed and multi-system execution with referential integrity and the seeded/unseeded pseudonymization modes, and adds the five drift-gates that lock the contract end-to-end for regulated deployments.


How DATAMIMIC differs from Faker and generic generators

Faker / Random generators DATAMIMIC CE DATAMIMIC EE
Reproducible output โŒ โœ… โœ…
Domain-aware relationships โŒ โœ… โœ…
Business logic constraints โŒ โœ… โœ…
Per-output provenance hash โŒ โœ… โœ…
Source data pseudonymization โŒ โœ… manual โœ… automated
PII field detection โŒ โŒ โœ… probability-scored
Enterprise governance layer โŒ โŒ โœ…
Multi-system execution โŒ โŒ โœ…
Role-based workflows โŒ โŒ โœ…
Designed for regulated-industry deployment (governance, audit, RBAC) โŒ โŒ โœ…
# Faker โ€” broken relationships
from faker import Faker
fake = Faker()
patient_age = fake.random_int(1, 99)
conditions  = [fake.word()]
# "25-year-old with Alzheimer's" โ€” meaningless for any real test

# DATAMIMIC โ€” domain-aware, deterministic with a seed
import random
from datamimic_ce.domains.healthcare.services import PatientService
patient = PatientService(rng=random.Random(42)).generate()
print(f"{patient.full_name}, {patient.age}, {patient.conditions}")
# Age-appropriate, domain-consistent โ€” and identical every run with a fixed seed

Quickstart โ€” Community Edition

pip install datamimic-ce

Healthcare domain

import random
from datamimic_ce.domains.healthcare.services import PatientService

patient = PatientService(rng=random.Random(42)).generate()
print(patient.full_name, patient.age, patient.conditions)
# Age-appropriate conditions, demographically realistic; deterministic with a seed

Finance domain

import random
from datamimic_ce.domains.finance.services import BankAccountService

account = BankAccountService(rng=random.Random(42)).generate()
print(account.account_number, account.balance)
# Balance-consistent, locale-correct; reproducible with a seed

Pseudonymization โ€” CE (manual model)

DATAMIMIC supports two pseudonymization modes with different privacy postures:

Mode How Legal classification Use case
Seeded (rngSeed set) Deterministic, reproducible Pseudonymization (GDPR Art. 4(5)) Regression testing, stable CI/CD pipelines
Non-seeded (no rngSeed) Non-deterministic, no reversible mapping at field level Privacy-maximized transformation One-time data delivery, higher privacy posture

Note on GDPR anonymization: Full anonymization status under GDPR depends on complete field coverage across all quasi-identifiers and a re-identification risk assessment on the complete record โ€” not on individual field transformation alone. DATAMIMIC does not make anonymization claims on behalf of the customer. Non-seeded mode maximizes privacy at the transformation level; the customer is responsible for assessing re-identification risk across the full dataset.

In CE, PII fields are identified and modeled manually in the XML pipeline:

<setup defaultSeparator=",">
  <generate name="customers" source="customer_export.csv" target="CSV" distribution="ordered">
    <!-- distribution="ordered" reads the source in a stable order โ€” required so the
         Nth source row maps to the same seeded synthetic value on every run. The
         default ("random") shuffles non-deterministically and would break it.
         rngSeed on the <variable> makes the synthetic values reproducible; drop
         rngSeed for the privacy-maximized (non-deterministic) mode. -->
    <variable name="p"   entity="Person"      dataset="DE" rngSeed="42" />
    <variable name="acc" entity="BankAccount" dataset="DE" rngSeed="42" />

    <key name="first_name" script="p.given_name" />
    <key name="last_name"  script="p.family_name" />
    <key name="email"      script="p.email" />
    <key name="iban"       script="acc.iban" />
    <key name="birth_date" script="p.birthdate" />
  </generate>
</setup>

Built-in converters can additionally transform a key's value โ€” e.g. irreversibly hash the original instead of replacing it, or partially mask it:

<key name="email" script="p.email" converter="Hash('sha256','hex')" />
<key name="iban"  script="acc.iban" converter="MiddleMask(8, 4)" />

Available converters (13): Mask, MiddleMask(start, end), CutLength(n), Substring(start, end), JavaHash, RemoveNoneOrEmptyElement, Hash(type, format[, salt]), DateFormat(fmt), Append, UpperCase, LowerCase, Date2Timestamp, Timestamp2Date.

datamimic run ./pseudonymize-customers/datamimic.xml

source is a controlled export or staging input โ€” never a live production connection.

With rngSeed set: same source record โ†’ same pseudonymized output on every run. Stable for regression testing.

Without rngSeed: non-deterministic output โ€” no reversible mapping exists at the field level. Stronger privacy posture for one-time delivery scenarios.

In the Enterprise Platform (EE): the DataWorkbench PII scanner automatically scans source schemas, assigns probability scores to each field, and flags candidates above a configurable threshold. Flagged fields are wired into the pseudonymization model automatically โ€” no manual field mapping required.

<setup>
  <generate name="patients" count="1000" target="CSV">
    <variable name="patient" entity="Patient" dataset="US" ageMin="60" ageMax="80" rngSeed="42" />
    <key name="full_name"   script="patient.full_name" />
    <key name="age"         script="patient.age" />
    <array name="conditions" script="patient.conditions" />
  </generate>
</setup>
datamimic run ./patient-scenario/datamimic.xml

Time-series generation โ€” CE

Any <generate> becomes a time-series loop when given strict ISO 8601 start/end/interval attributes. Per iteration the script context exposes a ts namespace:

Variable Type Meaning
ts.now datetime Current tick
ts.step int Position within one series (0..N-1)
ts.series int Which series this row belongs to (0..count-1)

Output column names โ€” including whether to even emit a timestamp or series-id column โ€” are entirely the user's choice via <key>. The primitive is domain-agnostic; the same DSL covers IoT readings, financial ticks, log streams, smart meters, anything time-indexed.

<setup>
  <!-- Stock ticks: three symbols, 5-min interval, 30-min window (writes ticks.csv) -->
  <generate name="ticks" count="3"
            start="2026-01-01T09:30:00+00:00"
            end="2026-01-01T10:00:00+00:00"
            interval="PT5M"
            target="CSV">
    <key name="timestamp" script="ts.now.isoformat()"/>
    <key name="symbol"    script="['AAPL','MSFT','GOOG'][ts.series]"/>
    <key name="price"     script="100 + ts.step * 0.25"/>
  </generate>

  <!-- Sensor with diurnal seasonality, single series (count defaults to 1; writes readings.csv) -->
  <generate name="readings"
            start="2026-01-01T00:00:00+00:00"
            end="2026-01-08T00:00:00+00:00"
            interval="PT1H"
            target="CSV">
    <key name="timestamp" script="ts.now.isoformat()"/>
    <key name="value"     script="20 - 10 * math.cos(ts.now.hour * math.pi / 12)"/>
  </generate>
</setup>

Guarantees:

  • Prefix-stable by construction โ€” the first N ticks of series 0 are byte-identical regardless of total window length, because each row's ts.now is a pure function of start + interval * step.
  • Loop order is contiguous per series โ€” series 0's full sequence, then series 1's, etc. Makes downstream grouping trivial.
  • Strict ISO 8601 โ€” start/end via datetime.fromisoformat (Z-suffix supported); interval via the isodate library (PT1H, PT15M, PT5S, P1D, P1W, P1DT12H, fractional seconds for sub-second precision). Resolution: PT0.001S = 1 ms, PT0.000001S = 1 ยตs (Python datetime.timedelta microsecond floor; sub-ยตs intervals and constant-length-undefined units like months/years are rejected with a clear error).
  • count is orthogonal, not overloaded โ€” it means "outer-loop iterations of this <generate>" in all modes (same as nested <generate count=โ€ฆ>). In time-series mode each outer iteration is one series of N ticks, so total rows = count ร— ticks_per_series. Default count="1" keeps single-series fixtures terse.
  • Naming caveat โ€” a <key name="ts"> output column would shadow the namespace (current_product overrides current_variables in script scope), and a <variable name="ts"> is rejected at parse time. Use a different name, e.g. timestamp for the column.

Composes with the existing <variable> mechanism for multi-source merges (e.g. join each tick with a sensor-metadata CSV via <variable source="meta.csv" cyclic="True"> inside the same <generate>), with <key condition="..."> filtering, and with <nestedKey> sub-scopes โ€” the ts namespace is visible everywhere a <key script> runs. See tests_ce/integration_tests/test_timeseries/ for committed DSL fixtures + proofs (including pagination invariance).


Where CE fits on its own

Most teams adopt CE for one of three reasons. EE is not required for any of them.

1. Reproducible test data for CI/CD pipelines. Pin a seed against the generate_domain facade โ€” or hand a seeded random.Random to any domain service โ€” and you get byte-identical output across runs and machines. Both layers are gated on every CI run by tests_ce/architecture/. Regression tests stop being flaky because the input data is stable across runs.

from datamimic_ce.domains.facade import generate_domain

response = generate_domain({
    "domain": "person", "version": "v1", "count": 1,
    "seed": "ci-pipeline-42", "locale": "en_US",
    "clock": "2026-01-01T00:00:00Z",
})
# Same engine version + same model + same seed โ†’ same output, every machine, every run.

2. Deterministic data backend for AI agents and LLM tooling. The bundled MCP server (pip install datamimic-ce[mcp]) exposes generate as an MCP tool. Agents call it with seed, locale, count; outputs ship with a determinism_proof.content_hash so the same call can be re-executed and verified later โ€” useful for agent regression tests and for any workflow where the data the agent saw needs to be reconstructable.

3. Pseudonymization of staging and QA exports. Manual model in CE (XML pipeline), no scanner license required. Seeded mode for stable regression test data; non-seeded mode for one-time deliveries with maximized privacy posture. See the Pseudonymization section above.


Where DATAMIMIC fits in your compliance program

DATAMIMIC produces evidence and reproducible artifacts that support compliance work. It does not replace your DPO, your CISO, or your auditor. The following are pointers for where DATAMIMIC outputs commonly slot into established programs:

Both editions produce reproducible artefacts. CE covers single-system fixtures and provenance evidence; multi-system audit evidence with role-based dashboards is EE.

Regulation / standard Where DATAMIMIC contributes
DORA (Reg. 2022/2554) โ€” Art. 24 (testing of ICT tools, systems and processes; non-TLPT scope) Reproducible test datasets for non-TLPT resilience tests; deterministic data fixtures for ICT testing programmes
ISO/IEC 27701:2019 โ€” A.7.2.8 (records related to processing PII) and A.7.4.5 (PII minimisation) Synthetic data in lieu of PII in non-production environments; documented model definitions as supporting evidence
HIPAA Security Rule โ€” ยง164.312 technical safeguards (US Covered Entities / Business Associates only) Synthetic Patient/MedicalDevice/MedicalProcedure data for dev and test environments without ePHI exposure
GDPR โ€” Art. 4(5) pseudonymization definition; Art. 25 privacy by design; Art. 32 security of processing Seeded pseudonymization with deterministic mapping; non-seeded mode for stronger privacy posture
PCI DSS 4.0 โ€” Req. 6.5.5 (live PANs prohibited in test/development) Synthetic PAN generation for test environments; deterministic tokenisation reproducible across runs

These pointers do not constitute legal advice or a compliance attestation. Consult your DPO, CISO, or qualified counsel for formal compliance determinations. Full anonymization status under GDPR depends on re-identification risk across the complete dataset โ€” see the pseudonymization disclaimer above.


Architecture

CE and EE share the DATAMIMIC DSL and the determinism contract. The execution layer is separate: CE is a Python execution engine using multiprocessing (with optional Ray for distribution); EE is an independently-optimised execution engine with a Rust fastpath, ML/auto-regressive generation, keyset and manifest building from live schemas, and optimised distributed execution at billion-record scale.

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘              DATAMIMIC ENTERPRISE PLATFORM (EE)                  โ•‘
โ•‘                                                                  โ•‘
โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ•‘
โ•‘  โ”‚  PLATFORM LAYER                                          โ”‚    โ•‘
โ•‘  โ”‚  UI ยท RBAC ยท Governance ยท Audit Dashboards               โ”‚    โ•‘
โ•‘  โ”‚  DataWorkbench ยท PII Scanner ยท Pseudonymization Builder  โ”‚    โ•‘
โ•‘  โ”‚  Scheduler ยท Task Runner ยท CI/CD ยท Template Engine       โ”‚    โ•‘
โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ•‘
โ•‘                                                                  โ•‘
โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ•‘
โ•‘  โ”‚  EE CORE  (separately maintained, more advanced than CE) โ”‚    โ•‘
โ•‘  โ”‚                                                          โ”‚    โ•‘
โ•‘  โ”‚  Rust fastpath for performance-critical paths            โ”‚    โ•‘
โ•‘  โ”‚  ML / auto-regressive engine for complex distributions   โ”‚    โ•‘
โ•‘  โ”‚  Keyset and manifest building from live DB schemas       โ”‚    โ•‘
โ•‘  โ”‚  Optimised distributed execution at billion-record scale โ”‚    โ•‘
โ•‘  โ”‚  Runtime profiles: Performance ยท Balanced ยท Flexibility  โ”‚    โ•‘
โ•‘  โ”‚  Deep nested evaluation ยท Conditions ยท Rulesets          โ”‚    โ•‘
โ•‘  โ”‚  Structured error catalog ยท Per-stage execution logging  โ”‚    โ•‘
โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘              DATAMIMIC COMMUNITY EDITION (CE)  โ€” this repo       โ•‘
โ•‘                                                                  โ•‘
โ•‘  Determinism Kit ยท Domain Services ยท Schema Validators           โ•‘
โ•‘  Synthetic Generation ยท Pseudonymization (manual model)          โ•‘
โ•‘  Python API ยท XML Pipelines ยท CLI ยท MCP Server                   โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

         โ†“              โ†“              โ†“              โ†“
    PostgreSQL       Oracle         MongoDB      CSV / JSON / XML

EE adds Kafka, EDIFACT, SWIFT MT, HL7 v2.x, and HL7 FHIR as additional targets โ€” see Supported systems below. Both editions share the DATAMIMIC DSL and determinism contract.


Supported systems

System CE EE Notes
PostgreSQL โœ… โœ… EE adds schema introspection and referential integrity
MySQL โœ… โœ…
Oracle โœ… โœ… EE production-validated in regulated banking environments
MS SQL Server โœ… โœ…
SQLite โœ… โœ… Lightweight CI/CD fixtures
MongoDB โœ… โœ… EE adds nested document generation
CSV / JSON / XML โœ… โœ… Flat file pipelines
XLSX โœ… โœ… Spreadsheet read + write (first row = header)
DbUnit XML โœ… โœ… .dbunit.xml dataset read + write
Fixed-width (.fcw) โœ… โœ… Self-describing column files, read + write
Apache Kafka โ€” โœ… Real-time streaming, payment scenarios
HL7 v2.x โ€” โœ… Test/training output via template engine
HL7 FHIR โ€” โœ… Test/training output via template engine
EDIFACT / SWIFT MT โ€” โœ… Test/training output only; does not satisfy SWIFT CSCF v2025 secure-zone controls (1.1 environment protection, 1.4 internet restriction). Generated messages must not be transmitted from a CSP-attested secure zone.

CE domains

Domain Services available
Healthcare Patient, Doctor, Hospital, MedicalDevice, MedicalProcedure
Finance Bank, BankAccount, CreditCard, Transaction
Insurance InsuranceCompany, InsuranceProduct, InsurancePolicy, InsuranceCoverage
E-commerce Order, Product
Public sector AdministrationOffice, EducationalInstitution, PoliceOfficer
Demographics Person (DE / US / VN locale packs), Address, City, Country
Common Company

All services are versioned and seeded; each generation emits a provenance hash suitable as evidence in audit reviews. Domain services can be used directly via constructor injection, or driven through the higher-level generate_domain({...}) facade for seed/locale/clock/count parameterisation (currently supports person, address, patient, doctor at v1).


CLI reference

# Initialize a new project
datamimic init my-scenario

# Lint a descriptor: schema, semantics, best practices โ€” every finding carries
# a rule id (DMxxx) and a fix hint. `validate` is an alias. Exit codes 0/1/2.
datamimic lint my-scenario/datamimic.xml
datamimic lint my-scenario/datamimic.xml --format json   # diagnostics v1, CI-friendly

# Run a scenario
datamimic run my-scenario/datamimic.xml

# Demos
datamimic demo list
datamimic demo create demo-healthcare
datamimic demo create --all --target ./my_demos

# System and version info
datamimic info
datamimic version

Documentation

Resource Link
Full documentation docs.datamimic.io
MCP quickstart docs/mcp_quickstart.md
Developer guide docs/developer_guide.md
Enterprise platform datamimic.io
GitHub Discussions Discussions
Issue tracker Issues
Email support support@rapiddweller.com

Contributing

See CONTRIBUTING.md. CE is MIT licensed and community contributions are welcome.

The CE engine is the foundation. If you are building integrations, domain extensions, or MCP tooling on top of DATAMIMIC, we want to hear from you.


License

MIT โ€” see LICENSE.

The DATAMIMIC Enterprise Platform (EE) is a commercial product. Contact us for licensing.


DATAMIMIC โ€” Deterministic, governed test data for regulated enterprises.

datamimic.io ย |ย  Book a demo ย |ย  LinkedIn

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datamimic_ce-4.0.1.tar.gz (12.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datamimic_ce-4.0.1-py3-none-any.whl (13.8 MB view details)

Uploaded Python 3

File details

Details for the file datamimic_ce-4.0.1.tar.gz.

File metadata

  • Download URL: datamimic_ce-4.0.1.tar.gz
  • Upload date:
  • Size: 12.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datamimic_ce-4.0.1.tar.gz
Algorithm Hash digest
SHA256 2a8522ab3053e896bdb3bf5dec2c07f6f20632b613761563be1c1ec3b8a98099
MD5 98f03e185cbb982a5cbc8cc40e7231a1
BLAKE2b-256 5c9ab40be0443b1a42c11002b913674fa1c71d0274db27a080bc1208d1fc93eb

See more details on using hashes here.

File details

Details for the file datamimic_ce-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: datamimic_ce-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datamimic_ce-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c8dd091029fe7dde2586677f279564943e8a1bf180cce68921e2b0b726f3a3
MD5 88ff56e879b6e8a9804cfac2aac8bfc6
BLAKE2b-256 286dd32f5682eff268b164dd8c35617cfe407f803905f8e91b3609bb9aeda5d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page