Testing Transformations
In the Portal
The transformation editor includes a test panel:
- Write your transformation code
- Paste or select sample input data
- Click Test
- See the transformed output and any logged messages
Via the API
Test a transformation without saving:
POST /api/transformations/test
Content-Type: application/json
{
"code": "function transform(record) { return { ...record, tags: [...(record.tags || []), 'tested'] }; }",
"input": {
"orderNumber": "1234",
"totalPrice": 99.99,
"tags": ["web"]
}
}Returns:
{
"data": {
"output": {
"orderNumber": "1234",
"totalPrice": 99.99,
"tags": ["web", "tested"]
},
"logs": [],
"duration": 2
}
}Testing Tips
- Test with edge cases: empty arrays, null fields, missing data
- Test with real data from your bridges to catch format differences
- Verify that returning
nullproperly filters records - Check that your transformation doesn’t break required fields