rngo

Reference

Config

The default location for a project's rngo config is .rngo/config.yml. Usually it gets added to the repo by the rngo init command. It should be checked into version control.

namespace

A meaningful, unique identifier for the config file. In the web UI, this is used to group simulations. It is required, and by default, rngo init sets this to the name of the project's directory.

scenarios

A map from scenario names to scenario objects, which define a set of top-level parameters for a simulation. For example:

scenarios:
  default:
    seed: 41
    start: daysAgo(30)
    end: daysAgo(10)
  long:
    seed: 42
    start: yearsAgo(3)

The "default" scenario will be used if no scenario is specified.

seed

The seed for the random number generator, ensuring deterministic results for simulations with identical specs.

Defaults to 1.

start

A string that specifies the start time for a simulation. It could either be an ISO 8601 date string, or a relative expression as defined in the duration expression reference.

Defaults to "daysAgo(30)".

end

Similar to start, but specifies the end time for a simulation.

Defaults to "daysAgo(1)".

streams

A map from stream names to stream objects. For example:

streams:
  users:
    outputs:
      - format: csv
    schema:
    #...

In this case, the name of the stream is users. Stream objects can have the following keys:

schema

A required JSON schema that defines the structure of the stream's data. For example:

streams:
  users:
    schema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string

See Schema

rate

A float that specifies the rate at which the stream produces events, in Hz. By default, rate is 0.00001157, which equals one per day.

See Rate

outputs

An optional map that configures how to output a stream's data. For example:

streams:
  users:
    outputs:
      json:
        format: json
        mode: event
      db:
        paramters:
          table: USER

See Outputs.

systems

An optional map from system names to system objects. For example:

systems:
  db:
    type: postgres
    parameters:
      host:
        value: localhost

In this case, the name of the system is db. System objects can have the following keys:

type

A required string that specifies the type of the system. For example:

systems:
  db:
    type: postgres

Currently, postgres is the only supported value.

parameters

An optional map from parameter names to parameter objects. For example:

systems:
  db:
    type: postgres
    parameters:
      port:
        default: 5432

In this case, the db system has a port parameter with a default value of 5432. See System Parameters.

Previous
CLI