Transform Data
Apply data transformation rules to input data in Last Mile Intelligence.
Operation
Section titled “Operation”transformData
Resource
Section titled “Resource”transformations
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Input Data | JSON | Yes | - | Data to transform |
| Transformation Rules | JSON | Yes | - | Rules to apply to the data |
Transformation Rules
Section titled “Transformation Rules”| Rule | Type | Description |
|---|---|---|
| rename | object | Field renaming map |
| convert | object | Type conversions |
| filter | array | Fields to include |
| defaults | object | Default values for missing fields |
Response
Section titled “Response”Success
Section titled “Success”{ "success": true, "data": { "customerId": "CUST001", "fullName": "Acme Industries", "email": "orders@acme.com", "isActive": true }, "transformations": 4}{ "success": false, "error": "Invalid transformation rule", "details": { "rule": "convert", "field": "amount", "error": "Cannot convert to number" }}Error Handling
Section titled “Error Handling”- Invalid Input: Input data is not valid JSON
- Rule Error: Transformation rule is malformed
- Type Conversion Failed: Cannot convert field to specified type
- Missing Required Field: Required source field not found