Configure MySQL Bootstrap Provider

Bootstrap queries from a MySQL snapshot

The MySQL bootstrap provider loads initial state from a MySQL database so queries start with a complete snapshot before streaming begins.

When to use MySQL bootstrap

  • You need historical/current state from MySQL when a query starts.
  • Your query depends on existing rows (aggregations, joins, thresholds).
  • You want snapshot + binlog streaming from the same database.

Prerequisites

  • Use with a MySQL source (sources[].kind: mysql).
  • The database user must have SELECT permission on the configured tables.
  • Configure tables (and optional tableKeys) on the MySQL source.

Quick example (Drasi Server config)

In Drasi Server config, bootstrap provider keys are camelCase, and the discriminator field is bootstrapProvider.kind.

sources:
  - kind: mysql
    id: orders-db
    autoStart: true

    host: ${MYSQL_HOST:-localhost}
    port: ${MYSQL_PORT:-3306}
    database: ${MYSQL_DATABASE:-mydb}
    user: ${MYSQL_USER:-drasi_user}
    password: ${MYSQL_PASSWORD}

    tables:
      - orders
      - customers

    bootstrapProvider:
      kind: mysql

Configuration reference

mysql accepts no additional fields.

Field Type Required Description
kind string Yes Must be mysql.

Notes

  • Drasi Server only allows kind: mysql when the source is also kind: mysql.
  • Connection and table scope come from the MySQL source configuration (for example host, database, tables, and tableKeys).
  • The tables list acts as a security allow-list — only tables explicitly listed will be bootstrapped.
  • Table names must use only letters, numbers, and underscores.

Documentation resources