# 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 model-based pseudonymization. The Enterprise Platform adds governed workflows, PII scanning, role-based access, audit logging, scheduling, multi-system execution, and the operational layer for governed enterprise workflows. > > ๐Ÿ‘‰ **Enterprise Platform:** [datamimic.io](https://datamimic.io)  |  ๐Ÿ“˜ **Docs:** [docs.datamimic.io](https://docs.datamimic.io)  |  ๐Ÿ“… **Book a strategy call:** [datamimic.io/contact](https://datamimic.io/contact) > > ๐Ÿค– **AI agent?** Start at [`AGENTS.md`](https://github.com/rapiddweller/datamimic/blob/development/AGENTS.md) and use the project CLI: preserve new intent as `model.dm.json`, submit an early best attempt via `datamimic scaffold ... --format json`, repair from the structured issues, declare an expectation per stated requirement, and stop on `verified=true`. Existing raw XML uses lint plus bounded dry-run. --- [![CI](https://img.shields.io/badge/CI-passing-brightgreen.svg)](https://github.com/rapiddweller/datamimic/actions) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=rapiddweller_datamimic&metric=coverage)](https://sonarcloud.io/summary/new_code?id=rapiddweller_datamimic) [![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=rapiddweller_datamimic&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=rapiddweller_datamimic) [![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/rapiddweller/datamimic/blob/development/LICENSE) [![MCP Ready](https://img.shields.io/badge/MCP-ready-8A2BE2.svg)](https://github.com/rapiddweller/datamimic/blob/development/docs/mcp_quickstart.md) [**Current development architecture**](https://rapiddweller.github.io/datamimic/) โ€” explore the observed structure, target and differences with ArchKeel. --- ## 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 model-based pseudonymization in local, CI, or agent-driven workflows. 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 โ€” seeded, repeatable or run-specific (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 (``, ``), and a scriptable memstore for staged aggregation - **Emit provenance** โ€” execution logs plus a SHA-256 content hash on `generate_domain` facade outputs, so two runs can be checked for identical output - **Guide agents** โ€” machine-readable capabilities, progressive reference queries, and one canonical CLI scaffold transaction; an optional MCP adapter exposes the same authoring service **The Enterprise Platform adds:** - **PII scanner** โ€” probability-scored field suggestions with configurable thresholds; users confirm mappings in 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](https://datamimic.io). --- ## AI agents: author, verify, and run data models The CLI is the baseline agent contract. Install CE with `pip install datamimic-ce`; inside this checkout, use `.venv/bin/datamimic` so a stale global installation cannot change the available schema or commands. | Need | CLI tool | Contract | |---|---|---| | Discover the live structural surface | `datamimic capabilities` | Compact machine-readable JSON index by default; `--full` for the complete manifest, `--section ` for one section. | | Learn the Intent Model progressively | `datamimic reference authoring`, then `datamimic reference authoring --category --kind ` | Start with the query catalogue, then load only the typed fragment needed. | | Author a new model | Preserve `model.dm.json`; run `datamimic scaffold model.dm.json --format json` | One compile/lint/bounded-run/acceptance transaction per changed attempt. Stop on `verified=true`; generated XML is runtime output. | | Work with existing raw XML | `datamimic lint model.xml --format json`, then `datamimic dry-run model.xml --format json` | Fix diagnostics, inspect bounded samples for intent, then use `datamimic run model.xml` only when real execution is requested. | | Find a DSL detail | `datamimic reference overview`, then a narrow `reference` topic/name | Query the live model and rule registries instead of guessing elements, generators, scope, distributions, or rules. | `capabilities`, authoring-reference projections, and the commands shown with `--format json` return machine-readable JSON. On a failed scaffold attempt, change `model.dm.json` using its structured validation issues, typed repair, or rule diagnostics before retrying. A typed `max_count` remediation instead changes only the bounded scaffold parameter to at least its reported minimum. Never repeat an identical failed call. A successful scaffold result is terminal for authoring, so do not lint or dry-run its generated XML again. Exact source fragments are discoverable through queries such as `--category source --kind memstore`. ### Optional MCP adapter When the calling environment already exposes DATAMIMIC MCP tools, they map to the same canonical contracts and implementations: `reference` โ†’ `datamimic_reference`, `scaffold` โ†’ `datamimic_scaffold`, `lint` โ†’ `datamimic_check`, and `dry-run` โ†’ `datamimic_run`. Install the adapter with `pip install "datamimic-ce[mcp]"`; registration details belong in the [`MCP quickstart`](https://github.com/rapiddweller/datamimic/blob/development/docs/mcp_quickstart.md), not in the authoring workflow. The adapter intentionally exposes only the four canonical reference, scaffold, check, and bounded-run operations; domain generation remains a Python/CLI capability rather than a parallel MCP authoring path. ### Prompts to paste into your agent **Author and verify a new model** ```text Create the dataset I describe with DATAMIMIC. Read AGENTS.md first. In a repository checkout use `.venv/bin/datamimic`; otherwise use the current `datamimic` CLI. Preserve my intent as `model.dm.json`; do not hand-write XML. Start from the minimal valid document shape in AGENTS.md ("Authoring a new model"). Two rules prevent most rejections: the top level allows ONLY version, seed, products, expectations; product-level "kind" (generated/source/time_series) is a different vocabulary from field-level "kind" (increment, values, weighted, int_range, decimal_range, pattern, constant, script). Range fields take minimum/maximum, never min/max. Submit EARLY: run `datamimic scaffold model.dm.json --format json` with your best attempt after at most one discovery call. Repair from the structured issues (path/code/message/allowed_fields) and diagnostics (fix_hint) โ€” they teach the schema faster than more discovery. Never resubmit an unchanged document. If a remediation requests a larger max_count, retry scaffold with at least that value without changing the intent. Declare an expectation for every requirement I state (counts as exact_count with a "count" field, uniqueness, allowed values, ranges, foreign keys) โ€” verified=true certifies only what you declared. Stop on verified=true; do not lint or dry-run the generated XML. If I request real execution, save the returned XML as a generated artifact and run that descriptor. Return the model.dm.json path and concise verification evidence. ``` **Relational hierarchy with referential integrity (fully supported โ€” no XML needed)** ```text Seed a relational dataset with referential integrity: 4 customers, each with exactly 2 orders. Customers get an incrementing unique id and a region from {north, south, east, west}. Each order carries the REAL parent customer id as a foreign key and an amount between 10.0 and 500.0. Follow AGENTS.md's "Authoring a new model" and its structural recipes: orders nest inside the customer product's "children" array; the FK field is {"kind": "script", "script": "parent.id"} with a foreign_key role โ€” a randomly generated FK passes schema validation but fails per-parent-count acceptance. Declare expectations for the customer count, customer id uniqueness, exactly 2 orders per customer (per_parent_count), the orders->customers foreign key, and the amount range. Stop on verified=true and show the acceptance evidence. ``` Raw XML remains supported for existing descriptors (lint โ†’ dry-run โ†’ run; see AGENTS.md). For new models it is a last resort: only when a scaffold issue explicitly classifies the requirement as `unsupported_intent` should an agent hand-author XML, preserving that evidence. Authoring V1 covers file and in-memory (memstore) targets with one level of nested child products; database/MongoDB sources or targets and deeper nesting are `unsupported_intent` and go through the raw XML path, which has no `verified` certificate. --- ## CE vs Enterprise Platform CE and EE are **not the same engine with a feature flag**. They share the DSL, while 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, generators and script expressions | Separate engine; not covered by the CE test matrix | | **Pseudonymization โ€” seeded** | โœ… manual model | โœ… scanner-assisted, user-confirmed model | | **Pseudonymization โ€” non-seeded** | โœ… manual model | โœ… scanner-assisted, user-confirmed model | | Python API + XML pipelines | โœ… | โœ… | | Domain models: Finance, Healthcare, Demographics | โœ… | โœ… | | Time-series generation (``, 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 suggestions, configurable threshold, user confirmation in DataWorkbench | | **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 suggestions for user-confirmed field mapping** | โœ… | | **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.1 Req. 6.5.5 (test data) reviews, and HIPAA Security Rule reviews | โœ… | | On-premise deployment + air-gapped environments | โœ… | | LSP-powered IDE tooling for DSL authoring | โœ… | ๐Ÿ‘‰ [Explore the Enterprise Platform](https://datamimic.io)  |  [Book a platform demo](https://datamimic.io/contact) --- ## 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 for PostgreSQL, Oracle, and Kafka, designed for billion-record workloads | | **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 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](#supported-systems) 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 model-based pseudonymization in local environments, CI pipelines, or agent-driven workflows. PII field identification is manual in CE; the EE DataWorkbench assists review and users confirm mappings. --- ## Why deterministic generation matters Most test data tools produce random output. That breaks regression tests, audit trails, and cross-team reproducibility. **How it works in CE:** - Set `` and seeded generation replays on the tested runtime profiles, including generator, entity, and script-expression paths. Seeded date-derived values use the deterministic clock anchor; without a seed, generation is not replay-stable. - `distribution="ordered"` reads a source in file order; `distribution="random"` shuffles it, reproducibly with a seed. - The Python facade `generate_domain(...)` returns `determinism_proof.content_hash`: the same hash means the same data. - The committed replay model covers every registered literal generator except the database-backed `SequenceTableGenerator`, plus the supported dynamic script-global families. It is replayed in two separate processes on each CI run ([`test_determinism_seed_scenarios`](https://github.com/rapiddweller/datamimic/tree/development/tests_ce/integration_tests/test_determinism_seed_scenarios)). The CE seeded-runtime guarantee is scoped to the tested profiles. CI runs eight x64 cells: `ubuntu-22.04` with Python 3.10, 3.11, 3.12, and 3.13 in `Etc/UTC`; Python 3.11 in `America/Los_Angeles`; and `windows-latest` with Python 3.11 in `UTC` and `Pacific Standard Time`. These seven cells use `uv sync --resolution highest`; a representative `ubuntu-22.04`/Python 3.11/`Etc/UTC` cell uses `uv sync --resolution lowest-direct`. Each cell records its exact interpreter and installed package versions in the uploaded artifact and job log. Other Python versions and dependency resolutions are outside this matrix. `uv.lock` is intentionally untracked. The committed goldens and cross-cell fan-in, rather than production dependency pinning, define the byte-identical gate. **EE** behavior is outside this CE evidence. ```python from datamimic_ce.domains.facade import generate_domain request = { "domain": "person", "version": "v1", "count": 1, "seed": "regression-suite-42", # same seed โ†’ replayable on the tested profiles "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 for the same CE version, request, # seed, and clock within the tested compatibility boundary. ``` Direct service use is deterministic for repeated runs with the same seeded RNG and configuration: ```python import random from datamimic_ce.domains.finance.services import CreditCardService # Same seeded Random โ†’ same CreditCard fields for the same configuration. 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 evidence โ€” CE The CI gate compares seeded runtime manifests and committed goldens across the eight matrix cells above. Its coverage is: | Scope | Evidence | |---|---| | Facade API | 4/4 registered domains | | Entities | 23/23 entities, selected attributes | | Literal generators | 34/35; database-backed `SequenceTableGenerator` is excluded from this byte hash and covered by external-service DSL tests | | Seeded Safe Globals | 27 representative paths across `datetime`, `fake`, `math`, `numpy`, `pandas`, `random`, and `uuid` | | Rejected entropy | 5 committed negative DSL descriptors | | Encoding | 1 canonical UTF-8 probe | Arbitrary exporter bytes/encodings and Enterprise Platform behavior are outside this CE gate. --- ## How DATAMIMIC differs from Faker and generic generators | | Faker / Random generators | DATAMIMIC CE | DATAMIMIC EE | |---|---|---|---| | Reproducible output | โŒ | โœ… | separate engine; outside CE evidence | | Domain-aware relationships | โŒ | โœ… | โœ… | | Business logic constraints | โŒ | โœ… | โœ… | | Per-output provenance hash | โŒ | โœ… | โœ… | | Source data pseudonymization | โŒ | โœ… manual | โœ… scanner-assisted, user-confirmed | | PII field detection | โŒ | โŒ | โœ… probability-scored suggestions | | Enterprise governance layer | โŒ | โŒ | โœ… | | Multi-system execution | โŒ | โŒ | โœ… | | Role-based workflows | โŒ | โŒ | โœ… | | Designed for regulated-industry deployment (governance, audit, RBAC) | โŒ | โŒ | โœ… | ```python # 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 ```bash pip install datamimic-ce ``` For database and MongoDB connections, prefer [connection profiles](docs/developer_guide.md#database-and-mongodb-connection-profiles). The guide explains client references, profile selection, and how profile values override XML attributes. ### Healthcare domain ```python 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 ```python 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 repeatability properties: | Mode | How | Compliance note | Use case | |---|---|---|---| | **Seeded** (`rngSeed` set) | Deterministic on the tested profiles | May form part of a pseudonymisation approach. Whether the result qualifies as pseudonymised under GDPR Art. 4(5) depends on whether attribution requires additional information that is kept separately and protected. | Regression testing, stable CI/CD pipelines | | **Non-seeded** (no `rngSeed`) | Not replay-stable | โ€” | One-time data delivery | > **Note on GDPR:** Pseudonymisation does not make data anonymous or establish GDPR compliance. Under Recital 26, anonymity depends on whether a person remains identifiable considering means reasonably likely to be used. In CE, PII fields are identified and modeled manually in the XML pipeline: ```xml ``` Built-in converters can additionally transform a key's value โ€” e.g. replace the original with a keyed hash, or partially mask it. `Hash` derives its HMAC key from ``; the same input + seed + algorithm + output format + optional salt gives the same token across runs. Without a seed each run gets a new random key: ```xml ``` For pseudonymization, keep a random key outside the descriptor and separate from the generation seed. Reference a runtime property in the converter: ```xml ``` Supply it from an access-controlled environment variable: ```bash # Generate once, store securely, and reuse for stable tokens. export DATAMIMIC_PSEUDONYM_KEY="$(python -c 'import secrets; print(secrets.token_hex(32))')" datamimic run datamimic.xml --param-env pseudonym_key=DATAMIMIC_PSEUDONYM_KEY ``` `--param NAME=VALUE` and `--param-env NAME=ENV_NAME` are repeatable and override properties from `conf/environment.env.properties`. Property names must be Python identifiers; duplicate names are rejected. Use `--param-env` for secrets because command-line values can appear in process listings and shell history. Runtime properties remain available to descriptor scripts; use trusted descriptors and control access to the key and source data. Hash keys must contain at least 32 bytes before adding an optional salt. Length alone does not prove entropy: use a cryptographic random source, rather than a password, date or generation seed. Rotating the external key changes tokens for the same input; retain the prior key securely only when old mappings must be reproduced. An external key keeps tokens stable when `rngSeed` changes and leaves seeded data generation unchanged. Existing `Hash(...)` calls without an explicit key retain their seed-derived behavior and its weak-seed limitations. 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`. ```bash datamimic run ./pseudonymize-customers/datamimic.xml ``` Use a controlled export or staging input. Do not point this workflow at a live production source. With `rngSeed`: the same descriptor, seed, and ordered source rows reproduce the same replacement sequence; this is not a subject-keyed mapping across reordered exports. Without `rngSeed`: random/entity replacements use a new run-specific mapping, and hash converters use a new random key; outputs are not replay-stable. > **In the Enterprise Platform (EE):** the DataWorkbench PII scanner assists source-schema review by assigning probability scores and flagging candidates above a configurable threshold. Users confirm the fields and model before execution. ```xml ``` ```bash datamimic run ./patient-scenario/datamimic.xml ``` ### Time-series generation โ€” CE Any `` 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 ``. The primitive is domain-agnostic; the same DSL covers IoT readings, financial ticks, log streams, smart meters, anything time-indexed. ```xml ``` 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`](https://pypi.org/project/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 ``" in **all** modes (same as nested ``). 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 `` output column would shadow the namespace (`current_product` overrides `current_variables` in script scope), and a `` is rejected at parse time. Use a different name, e.g. `timestamp` for the column. Composes with the existing `` mechanism for multi-source merges (e.g. join each tick with a sensor-metadata CSV via `` inside the same ``), with `` filtering, and with `` sub-scopes โ€” the `ts` namespace is visible everywhere a `` 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 replay-identical output within the tested compatibility boundary above. Both layers are replay-tested on every CI run by [`tests_ce/architecture/`](https://github.com/rapiddweller/datamimic/tree/development/tests_ce/architecture/). Regression tests stop being flaky because the input data is stable across runs. ```python 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 CE version + request + seed + clock โ†’ same output within the tested boundary. ``` **2. Deterministic data backend for AI agents and LLM tooling.** The CLI and Python API are the baseline surfaces for seeded, verifiable generation. The optional MCP adapter (`pip install "datamimic-ce[mcp]"`) exposes the canonical reference, scaffold, check, and bounded-run authoring operations. Domain-facade outputs include a `determinism_proof.content_hash`, so Python callers can re-execute within the tested compatibility boundary and check whether the data is identical โ€” useful for agent regression tests and any workflow where the data an agent saw must 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 that are not replay-stable. See the [Pseudonymization section above](#pseudonymization--ce-manual-model). --- ## Where DATAMIMIC fits in your compliance program DATAMIMIC provides test-data and execution evidence that can 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: > CE's reproducible, rule-based artefacts are within the tested boundary above. EE adds multi-system audit evidence and role-based dashboards; the CE matrix does not verify EE execution. | Regulation / standard | Where DATAMIMIC contributes | |---|---| | **DORA (Reg. 2022/2554)** โ€” Arts. 24โ€“25, digital operational resilience testing | Reproducible test data can support scenario-based, compatibility, performance, and end-to-end testing | | **ISO/IEC 27701:2025** โ€” Privacy Information Management System (PIMS) | Synthetic data can reduce PII use in non-production; model and execution evidence can support privacy-management processes | | **HIPAA Security Rule** โ€” 45 CFR Part 164, Subpart C *(US Covered Entity / Business Associate scope)* | Synthetic healthcare data can reduce the need to copy ePHI into dev/test; safeguards still apply where ePHI exists | | **GDPR** โ€” Arts. 4(5), 25, 32 | May contribute to a pseudonymisation approach and related privacy-by-design and security measures; whether requirements are met depends on the dataset, additional information, and safeguards | | **PCI DSS 4.0.1** โ€” Req. 6.5.5 (live PANs not used in pre-production except where the environment is part of the CDE and protected by applicable PCI DSS requirements) | Synthetic card-number test data can reduce the need to use live PANs in pre-production | > These mappings show where DATAMIMIC can contribute; they are not attestations and do not establish that a dataset or processing activity satisfies the reference. --- ## Architecture The 5.0 refactoring target is documented in the [shared CE/EE core structure](docs/architecture/inner/target.md), including nested boundaries and the source-to-target map. It is a target, not a claim that the current implementation conforms; see the [verification status](docs/architecture/refactoring-study/experiment-2/amendment-19.md). CE and EE share the DATAMIMIC DSL. 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 execution designed for billion-record workloads. ``` โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ 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 โ”‚ โ•‘ โ•‘ โ”‚ Execution designed for billion-record workloads โ”‚ โ•‘ โ•‘ โ”‚ 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](#supported-systems) below. Both editions share the DATAMIMIC DSL. --- ## 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; facade outputs carry a content hash that shows whether two generations are identical. 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 ```bash # Discover the live structural surface as JSON datamimic capabilities # Enumerate typed authoring queries, then request only the needed fragment datamimic reference authoring datamimic reference authoring --category field --kind weighted datamimic reference overview # Compile and fully verify the canonical intent artifact; stop on verified=true datamimic scaffold model.dm.json --format json # Lint a descriptor: schema, semantics, best practices โ€” every finding carries # a rule id (DMxxx) and a fix hint. Exit codes 0/1/2. datamimic lint my-scenario/datamimic.xml datamimic lint my-scenario/datamimic.xml --format json # diagnostics v1, CI-friendly # Safely execute bounded counts with neutralized targets and sample rows datamimic dry-run my-scenario/datamimic.xml --format json # Run a verified scenario for real datamimic run my-scenario/datamimic.xml # Initialize a new project datamimic init my-scenario # 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](https://docs.datamimic.io) | | MCP quickstart | [docs/mcp_quickstart.md](https://github.com/rapiddweller/datamimic/blob/development/docs/mcp_quickstart.md) | | Developer guide | [docs/developer_guide.md](https://github.com/rapiddweller/datamimic/blob/development/docs/developer_guide.md) | | Enterprise platform | [datamimic.io](https://datamimic.io) | | GitHub Discussions | [Discussions](https://github.com/rapiddweller/datamimic/discussions) | | Issue tracker | [Issues](https://github.com/rapiddweller/datamimic/issues) | | Email support | support@rapiddweller.com | --- ## Contributing See [CONTRIBUTING.md](https://github.com/rapiddweller/datamimic/blob/development/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](https://github.com/rapiddweller/datamimic/blob/development/LICENSE). The DATAMIMIC Enterprise Platform (EE) is a commercial product. [Contact us](https://datamimic.io/contact) for licensing. --- **DATAMIMIC โ€” Deterministic, governed test data for regulated enterprises.** [datamimic.io](https://datamimic.io)  |  [Book a demo](https://datamimic.io/contact)  |  [LinkedIn](https://linkedin.com/company/rapiddweller)