rngo

Reference

Streams

A stream defines the schema, content and volume of one data set within a simulation. At a minimum, a stream must have:

  1. a unique name (within its namespace)
  2. a JSON Schema

Currently, you can only add and update streams via your project config.

Schema

All streams define a JSON schema - in the config, it is specified under the schema keyword. When a stream is included in a simulation, rngo guarantees that the data it generates for that stream will be valid against its schema.

rngo will eventually fully support the 2020-12 draft of JSON Schema. For now, only a subset of the vocabularies and keywords are supported.

Custom Vocabulary

rngo extends JSON schema with a custom vocabulary to support the generation of realistic data. All extension keywords are nested under the rngo keyword and do not change the validation semantics of the schema.

rngo.value

The rngo.value keyword specifies an expression that returns either a Set or a single Value. For example:

type: object
properties:
  name:
    type: string
    rngo:
      value: enums.fullNames

In this case, a value will be randomly selected from enum.fullName set when generating a value for the name property.

Upon stream creation or update, rngo will validate that all rngo.value expressions returns a value or set of the correct type.

See Expressions for more information.

Systems

Streams may be associated with one or more systems. See the Systems reference for details.

Outputs

You can also customize the output of a stream's data. In the config, this looks like this:

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