TestMapping
Source:
src/AWS/B2BI/TestMapping.ts
Runtime binding for b2bi:TestMapping.
Synchronously maps sample content with a mapping template (JSONATA or
XSLT) — the inline counterpart of a transformer’s mapping step, useful for
validating templates or transforming small documents on the fly without a
deployed transformer. Provide the implementation with
Effect.provide(AWS.B2BI.TestMappingHttp).
Testing Mappings
Section titled “Testing Mappings”// init — account-level, no resource argumentconst testMapping = yield* AWS.B2BI.TestMapping();
// runtimeconst result = yield* testMapping({ inputFileContent: JSON.stringify({ customer: "acme" }), mappingTemplate: '{ "name": customer }', fileFormat: "JSON",});// result.mappedFileContent === '{"name":"acme"}'