Skip to the content.

Functions & Generator Reference

OpenMimic provides a comprehensive suite of declarative function generators. Each field in mimic.json specifies one of the following generator types.


1. uuid

Generates standard RFC 4122 v4 UUIDs deterministically based on the generator seed.

Schema

{
  "uuid": {
    "uppercase": false
  }
}

Options


2. distribution

Outputs mathematical distributions (Gaussian / Normal or Uniform).

Normal (Gaussian) Distribution

Generates values around a mean with standard deviation:

{
  "distribution": {
    "normal": {
      "mean": 100.0,
      "std_dev": 15.0
    }
  }
}

Uniform Distribution

Generates values evenly spread between min and max:

{
  "distribution": {
    "uniform": {
      "min": 10.0,
      "max": 50.0
    }
  }
}

3. now

Generates deterministic timestamps that advance with the generator logical clock.

Schema

{
  "now": {
    "format": "RFC3339"
  }
}

Options


4. sequential_integer

Generates monotonically incrementing or stepping integers.

Schema

{
  "sequential_integer": {
    "start": 1,
    "step": 1
  }
}

Output Formula

\(\text{value} = \text{start} + (\text{event\_index} \times \text{step})\)


5. string_faker

Synthesizes context-aware strings and pattern-based identifiers.

Semantic Categories

{
  "string_faker": {
    "category": "email"
  }
}

Available categories:

Custom Mask / Pattern

You can specify a pattern using # for random digits:

{
  "string_faker": {
    "pattern": "ORDER_####"
  }
}

Output: ORDER_4821, ORDER_0945.


6. weighted_choice

Simulates probabilistic distributions, failure rates, or categorical states.

Schema

{
  "weighted_choice": {
    "options": [
      { "value": "SUCCESS", "weight": 95.0 },
      { "value": "FAILURE", "weight": 5.0 }
    ]
  }
}

In this example, "FAILURE" is produced with an exact 5% probability across the event stream.


7. constant

Outputs a fixed literal value.

{
  "constant": {
    "string_val": "ACTIVE"
  }
}

Supports string_val, int_val, double_val, and bool_val.


8. binary_media (Synthetic Audio & Images)

Generates valid binary media containers directly into streaming payloads (useful for multimodal pipelines, computer vision benchmarks, and media processing ingestion).

Schema

{
  "binary_media": {
    "format": "wav",
    "sample_rate": 44100,
    "duration_seconds": 1.0,
    "frequency_hz": 440.0
  }
}

Supported Media Formats:


9. aggregation (Streaming CEP Window Rollups)

Calculates streaming rollups (sum, avg, min, max, count) over sliding or tumbling event windows from correlated upstream streams.

Schema

{
  "aggregation": {
    "source_stream_id": "stream-orders",
    "window_type": "sliding",
    "window_size_events": 50,
    "aggregation_op": "avg",
    "target_field": "order_amount"
  }
}

10. markov_chain & entity_pool


11. video_stream (Real-Time Synthetic Camera Broadcaster)

Simulates continuous real-time camera video streams (CCTV, drone, traffic cams, and optical sensors) encoded with Motion JPEG (MJPEG) frames.

Schema

{
  "video_stream": {
    "codec": "mjpeg",
    "width": 640,
    "height": 480,
    "fps": 30,
    "pattern": "bouncing_ball",
    "render_timestamp": true
  }
}

Motion Pattern Options: