# Schema Mapper runtime-dependent artifact; requires matching installed engine. from mcp_products.schema_mapper.engine import transform_record as _transform from mcp_products.schema_mapper.serialization import loads as _loads _MAPPING = _loads('{"approval":{"at":"2026-11-13T15:05:16.128387+00:00","mapping_fingerprint":"sha256:4d0951375b563978fd9e995e4cf6e934d585c5c72969ac5ca6689da813310c1e","reviewer":"authorized synthetic-fixture reviewer"},"engine_version":"schema-mapper/2.0.0","fields":[{"alternatives":[{"lexical":0,"score":0,"source_path":"$.account_code","type_compatible":false},{"lexical":0,"score":0,"source_path":"$.credit_limit","type_compatible":false},{"lexical":0,"score":0,"source_path":"$.enabled","type_compatible":false},{"lexical":0,"score":0,"source_path":"$.givenName","type_compatible":false}],"confidence_band":"review_required","decision":{"kind":"direct","sources":["$.enabled"]},"evidence":{"lexical":0,"reason":"insufficient or tied evidence","review_resolution":"explicit source choice","runner_up_score":0,"type_compatible":false},"match_score":0,"target_path":"$.active","transform":null},{"alternatives":[{"lexical":1,"score":125e-2,"source_path":"$.credit_limit","type_compatible":true},{"lexical":0,"score":0,"source_path":"$.account_code","type_compatible":false},{"lexical":0,"score":0,"source_path":"$.enabled","type_compatible":false},{"lexical":0,"score":0,"source_path":"$.givenName","type_compatible":false}],"confidence_band":"review_required","decision":{"kind":"direct","sources":["$.credit_limit"]},"evidence":{"lexical":1,"reason":"unique lexical/type candidate","runner_up_score":0,"type_compatible":true},"match_score":125e-2,"target_path":"$.credit_limit","transform":null},{"alternatives":[{"lexical":0,"score":25e-2,"source_path":"$.account_code","type_compatible":true},{"lexical":0,"score":25e-2,"source_path":"$.enabled","type_compatible":true},{"lexical":0,"score":25e-2,"source_path":"$.givenName","type_compatible":true},{"lexical":0,"score":0,"source_path":"$.credit_limit","type_compatible":false}],"confidence_band":"review_required","decision":{"kind":"direct","sources":["$.account_code"]},"evidence":{"lexical":0,"reason":"insufficient or tied evidence","review_resolution":"explicit source choice","runner_up_score":25e-2,"type_compatible":true},"match_score":25e-2,"target_path":"$.customer_id","transform":null},{"alternatives":[{"lexical":3333e-4,"score":5833e-4,"source_path":"$.givenName","type_compatible":true},{"lexical":0,"score":25e-2,"source_path":"$.account_code","type_compatible":true},{"lexical":0,"score":25e-2,"source_path":"$.enabled","type_compatible":true},{"lexical":0,"score":0,"source_path":"$.credit_limit","type_compatible":false}],"confidence_band":"review_required","decision":{"kind":"direct","sources":["$.givenName"]},"evidence":{"lexical":3333e-4,"reason":"unique lexical/type candidate","review_resolution":"explicit source choice","runner_up_score":25e-2,"type_compatible":true},"match_score":5833e-4,"target_path":"$.first_name","transform":null}],"mapping_fingerprint":"sha256:4d0951375b563978fd9e995e4cf6e934d585c5c72969ac5ca6689da813310c1e","parent_fingerprint":"sha256:404854b88e9bb83c094563882947bb607110116850bb520641aff4d492bba1df","revision":3,"schema_version":"2.0","scope":{"domain":"customer-imports","user":"synthetic-demo","vendor":"synthetic-vendor"},"score_meaning":"uncalibrated lexical/type ranking score, not probability","source_fingerprint":"sha256:2c0f12f6355cd033f374bebb65c7c4c3666d31dfaa19c4f90a13a99b920d4df6","source_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"account_code":{"type":"string"},"credit_limit":{"type":"number"},"enabled":{"type":"string"},"givenName":{"type":"string"}},"required":["account_code","credit_limit","enabled","givenName"],"type":"object","x-inference":{"all_records_parsed":true,"bytes":110,"fields":{"account_code":{"empty":0,"null":0,"present":2},"credit_limit":{"empty":0,"null":0,"present":2},"enabled":{"empty":0,"null":0,"present":2},"givenName":{"empty":0,"null":0,"present":2}},"format":"csv","locale":"invariant","sample_complete":true,"sampled_records":2,"total_records":2,"version":"1"},"x-source-fingerprint":"sha256:2c0f12f6355cd033f374bebb65c7c4c3666d31dfaa19c4f90a13a99b920d4df6"},"source_schema_fingerprint":"sha256:3b30da2f8b26f376d2d091c5e8a3c78d92a7c5197a96633dcff7be31ae7c9575","status":"approved","target":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"active":{"type":"boolean"},"credit_limit":{"minimum":0,"type":"number"},"customer_id":{"type":"string"},"first_name":{"type":"string"}},"required":["active","credit_limit","customer_id","first_name"],"type":"object"},"target_fingerprint":"sha256:076686626f91aebe19beb9948cf7ecdfbaa34c36282121cc3121d97a0da4d34c","transformation_ir":{"operations":[{"op":"cast","source":"$.enabled","target":"$.active","to":"boolean"},{"op":"cast","source":"$.credit_limit","target":"$.credit_limit","to":"number"},{"op":"cast","source":"$.account_code","target":"$.customer_id","to":"string"},{"op":"cast","source":"$.givenName","target":"$.first_name","to":"string"}],"version":"1"}}') def transform_record(record): return _transform(record, _MAPPING)