Expand description
Source payload mapping engine for Drasi.
Transforms arbitrary JSON payloads into graph change events (SourceChange)
using Handlebars templates. This crate provides a shared mapping mechanism
used by sources that receive arbitrary payloads (HTTP webhooks, Kafka messages, etc.).
§Overview
The mapping engine takes:
- A
SourceMappingconfiguration defining how to extract graph elements from payloads - A
serde_json::Valuecontext containing the payload and any source-specific metadata - A source ID string
And produces SourceChange events (Insert, Update, Delete) that can be dispatched
to the Drasi query engine.
Structs§
- Element
Template - Template for element creation
- Element
Template Dto - DTO for element template (user-facing, camelCase).
- Mapping
Condition - Condition for when a mapping applies
- Mapping
Condition Dto - DTO for mapping condition (user-facing, camelCase).
- Source
Mapping - Mapping configuration from source payload to graph change event.
- Source
Mapping Dto - DTO for source mapping configuration (user-facing, camelCase).
- Source
Mapping Engine - Source mapping engine that transforms payloads into graph change events.
Enums§
- Effective
From Config - Configuration for effective_from timestamp
- Effective
From Config Dto - DTO for effective_from timestamp configuration (user-facing, camelCase).
- Element
Type - Element type for source changes
- Element
Type Dto - DTO for element type (user-facing).
- Operation
Type - Operation type for source changes
- Operation
Type Dto - DTO for operation type (user-facing).
- Timestamp
Format - Timestamp format for effective_from
- Timestamp
Format Dto - DTO for timestamp format (user-facing).
Functions§
- json_
to_ element_ value - Convert JSON value to ElementValue