MODULE 03 // DATA STREAM INTEGRATION
MODULE 05 // TRANSFORM LAYER

Data Transformation.

ABIS expects specific data formats. Build transformation layers that normalize diverse event sources into consistent behavioral signals.

TRANSFORMATION LAYER DESIGN

Different event sources produce different formats. Your web app emits JavaScript events, your mobile app sends native events, and third-party integrations have their own schemas. The transformation layer normalizes these into ABIS's expected format.

Key transformations: field mapping (source.user_id → target.userId), type coercion (string timestamps → ISO 8601), null handling (default values vs omission), and validation (reject malformed events before they reach ABIS).

Build transformations as pure functions—given the same input, always produce the same output. This makes testing straightforward and debugging predictable. Log transformation failures with the original event for investigation without blocking the pipeline.

STEP 1: VALIDATION

Verify required fields exist, types are correct, and values are within expected ranges. Reject malformed events early.

STEP 2: NORMALIZATION

Convert field names to camelCase, timestamps to ISO 8601, and identifiers to consistent formats (lowercase, trimmed).

STEP 3: ENRICHMENT

Add derived fields: session duration, event sequence number, time since last action, derived risk indicators.

STEP 4: FILTERING

Remove noise events (heartbeats, health checks) and PII that shouldn't reach ABIS (passwords, full credit card numbers).

STEP 5: MAPPING

Transform source schema to ABIS schema. Map source-specific event types to ABIS behavioral categories.

KNOWLEDGE CHECK // Q05
Why should transformation functions be implemented as pure functions?