Docs Menu

Resample Schema Data with "FLUSH SAMPLE"

On this page

  • Overview

When the mongosqld process starts it creates a schema, either from a schema file or by sampling data from a MongoDB instance. If the data in your MongoDB instance changes shape significantly with new fields or collections, you may wish to regenerate the schema BI Connector uses. You can regenerate the schema either by restarting mongosqld or by issuing the FLUSH SAMPLE command from within the MySQL shell.

By default, mongosqld does not automatically resample data after generating the schema. Specify the --schemaRefreshIntervalSecs option to direct mongosqld to automatically resample the data and regenerate the schema on a fixed schedule.


You cannot use the FLUSH SAMPLE command if mongosqld starts with a schema file via the --schema option.

See also:

On this page

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.


  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.