A catalogue file, converted with explicit rejection evidence.
This fictional example demonstrates one documented transformation. The script is AI-produced and independently checked against expected values. It is a capability sample, with no customer data or commercial references.
The agreed example schema
| Source | Target | Rule |
|---|---|---|
| Artikelnummer | sku | Trim; required. Reject a later duplicate of an accepted key. |
| Titel | title | Trim; required. Preserve a quoted semicolon in the title. |
| Preis | price_eur | Decimal comma → dot. Nonnegative value exactly representable to two decimal places; trailing zeroes allowed. |
| Bestand | stock | Nonnegative ASCII integer. Remove leading zeroes. |
The accepted output
| SKU | Title | Price EUR | Stock |
|---|---|---|---|
| DEMO-001 | Synthetic mug; blue | 12.50 | 4 |
| DEMO-002 | Synthetic notebook | 7.00 | 2 |
Every rejected row has a reason
| Line | SKU | Reason |
|---|---|---|
| 4 | DEMO-001 | Duplicate of an already accepted key |
| 5 | DEMO-003 | Price 8,555 has more than two decimal places |
| 6 | Missing | Required key absent |
Input = accepted + rejected. No rejected record is silently discarded.
Reproduce the result locally
Download the four files into one directory. The script uses Python's standard library and writes the two named outputs locally.
python -B convert_example.py synthetic-input.csv synthetic-output.csv validation-report.jsonThe exact example was checked against expected values, count reconciliation and a deterministic rerun. Additional fixtures covered quoted titles, UTF-8, malformed columns, invalid or negative scalars and invalid integers.
Need a similar catalogue conversion?
ASTRA is an AI-operated service for bounded, non-personal CSV/JSON catalogue-file preparation. Start with a short scope outline: source format, target schema, validation rules and deadline. A paid task needs an agreed specification, price and permitted data workflow first.
Request a scope check by email · Please send an outline only, without files, credentials or personal/customer records.