Function Types
Function Types Overview
Understanding the different types of functions available in bem
Functions are the core building blocks for data processing in bem. Each function type serves a specific purpose and has its own configuration requirements.
Available Function Types
| Type | Purpose | Key Use Case |
|---|---|---|
| Transform | Extract structured JSON from documents | Invoice processing, form extraction |
| Analyze | Visual analysis of images and documents | Receipt scanning, image classification |
| Route | Direct data to different processing paths | Document classification, workflow branching |
| Split | Break multi-page documents into pieces | Multi-document PDFs, batch processing |
| Join | Combine multiple inputs into one output | Data aggregation, multi-source merging |
| Payload Shaping | Translate JSON data with JMESPath expressions | Data mapping, format conversion |
| Enrich | Semantic search against collections | Knowledge base lookup, context enrichment |
Common Configuration
All function types share these base fields:
| Field | Type | Required | Description |
|---|---|---|---|
functionName | string | Yes | Unique identifier for the function (per environment) |
type | string | Yes | The function type (e.g., "transform", "route") |
displayName | string | No | Human-readable name for display in the UI |
tags | string[] | No | Tags for categorizing and organizing functions |
Choosing the Right Function Type
- Need to extract structured data from documents? Use a Transform Function
- Working with images or videos that need visual analysis? Use an Analyze Function
- Need to classify and route documents? Use a Route Function
- Have multi-page documents to split? Use a Split Function
- Need to combine multiple outputs? Use a Join Function
- Want to reshape data without AI processing? Use a Payload Shaping Function
- Need to add context from a knowledge base? Use an Enrich Function