Repository navigation
DATAMIMIC CE 4.2.0
DATAMIMIC CE 4.2.0 makes seeded runs reproducible on the same runtime across all generators, entities and script expressions, turns the Hash converter into a keyed hash, and gives database paging a stable order.
Highlights
- One seed for the whole model. With
<setup rngSeed="N">every generator, entity and script expression replays on the same Python and machine, includingrandom,uuid,fakeand the current date and time (fixed at2025-01-01 12:00).UUIDGenerator,PasswordGenerator,TokenGeneratorandHashGeneratornow follow the seed like every other generator. CI replays every generator and script path in two separate processes. (#219, #240) - Keyed
Hashconverter.Hash(...)is now an HMAC.<setup rngSeed>is the key, so the same value gives the same token in every run; without a seed each run gets a new random key, shared by all workers of the run. (#226, #247) - Stable database paging. Every paged RDBMS read is ordered by the primary key, or by all columns. A selector's own
ORDER BYstays first. Selectors and<execute>SQL scripts are read withsqlglotin the database's dialect, so semicolons in literals and comments, Oracle PL/SQL blocks and SQL ServerORDER BYselectors work. (#228, #238, #241–#244) - Timezone-independent timestamps.
Date2Timestamp,Timestamp2Dateand epoch date formats give the same result on every host timezone. (#220) - Explicit text encoding. CE no longer depends on the platform's default text encoding. UTF-8 is the default; explicitly configured encodings such as
cp1252stay supported. (#221) - XML sources.
<generate source="x.xml">withoutcountreads every<item>. (#222) - Authoring.
verifiedis blocked when a product of an exporting model has no target, and database/MongoDB clients are reported asunsupported_intent. (#223, #225)
Behaviour changes
The same model can produce different data than 4.1.0:
Hashconverter tokens change in every mode. Regenerate stored tokens or pseudonyms once.- Seeded runs: values from
UUIDGenerator,PasswordGenerator,TokenGenerator,HashGeneratorand fromrandom,uuid,fakeand the current time in script expressions change, and are now reproducible. - Database sources: paged reads and full table reads are now ordered by the primary key or all columns, so row order can differ from 4.1.0; the rows themselves do not.
- Timestamps on hosts outside UTC.
- Authoring can report
verified=falsewhere 4.1.0 reportedtrue.
Two cases that ran before now stop with an error:
- A seeded script expression calling
np.random,random.SystemRandom,os.urandomoruuid.uuid1. Userandom.*or a generator instead. - A database table without a primary key, or a selector, that returns a column type the database cannot sort (PostgreSQL
json, OracleCLOB, SQL Servertext/ntext/image/xml). Add a primary key, or select or cast those columns.
Upgrade notes
- New dependency:
sqlglot(>=30.18,<31). SetupContext(...)takesrun_seed=instead ofseed=andcurrent_seed=(internal API).
Verification
Each change ships with regression coverage that fails on 4.1.0, including cross-process replay of every generator and script path, keyed Hash across workers, and database paging on PostgreSQL, SQL Server and Oracle. Seeded output of existing distribution models is byte-identical across the seed refactor.