Navigation

Map Relational Schemas to MongoDB

Business intelligence tools connect to a data source and, given a fixed tabular schema, allow users to visually explore their data. MongoDB uses a flexible schema, so some business intelligence tools cannot use MongoDB as a native data source.

To use MongoDB with a relational business intelligence tool such as Tableau, you must define a relational mapping for your MongoDB data. MongoDB Connector for BI provides several methods for creating and managing a relational schema.

For complete documentation on BI Connector’s schema management options, see the mongosqld reference documentation.

Cached Sampling

The default sampling mode which mongosqld uses to analyze your collections and derive a static schema. In this mode, mongosqld derives the schema on startup and holds the schema in memory.

Persist a Schema in MongoDB

mongosqld samples your MongoDB collections and creates a schema at the time of startup and writes it to a MongoDB collection. Available via the --sampleSource option.

Use MongoDB Views

MongoDB views allow you to control the display of information from a collection by restricting access to certain fields, renaming fields, sorting data, and other techniques. BI Connector can read data from a view just as it does from a standard collection.

Load a Schema from a DRDL File

You can generate a text schema for mongosqld to use with the mongodrdl program. You can edit a text schema manually to suit your particular data needs.

Resample Schema Data with “FLUSH SAMPLE”

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.

Geospatial Data

BI Connector handles collections which contain a 2d or 2dsphere geospatial index such that longitude and latitude data are represented within a single table along with other collection data.