Navigation

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 --sampleRefreshIntervalSecs option to direct mongosqld to automatically resample the data and regenerate the schema on a fixed schedule.

Note

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