System

A system is where your application stores data. It could be to any of the following:

  • database
  • file system
  • object storage
  • cache
  • SaaS

The CLI uses systems to stream simulation data into the right place. For example, consider the following simulation spec:

systems:
  sqlite:
    output:
      type: sql
    import:
      command: sqlite3 db1.sqlite
entities:
  users:
    system:
      type: sqlite
    stream:
      type: object
      properties:
        id:
          type: id.integer
        name:
          type: person.name

First of all, we've defined a system called sqlite, and we've assigned it to the users entity.

Our sqlite definition includes an output which tells the API that the users entity data should be formatted as SQL.

And finally we've specified import.command. When you run the simulation via rngo sim, the CLI will execute the command locally and pipe users data to stdin.