The SQL Interface schemas are JSON schemas that describe data as it exists in MongoDB, including its polymorphism, sparseness, and nested, structured data. Schemas are necessary when connecting SQL-based tools to MongoDB data sources. The SQL Interface also requires schema information to translate SQL queries into more optimized MongoDB operations. Schema management is the process of creating, maintaining, and updating that information as your data evolves.
The tool you use for schema management depends on the deployment type where you run the SQL Interface. Each deployment type uses a different tool, and those tools behave differently in important ways. Identify your deployment type in the table that follows, then follow the link to the appropriate guide.
Important
Choose the correct deployment type before starting. The MongoDB SQL Schema Builder CLI does not sample documents to derive a schema. The Atlas Data Federation path samples documents from your collections to build the initial schema. Using documentation for the wrong deployment type produces wrong results.
Schemas are not shared between deployment types. A schema you create with the MongoDB SQL Schema Builder CLI is not available when you connect through Atlas Data Federation, and the reverse is also true.
Get Started
Click the appropriate link to learn more about managing the schema for your deployment type:
Deployment Type | Description | Documentation |
|---|---|---|
Enterprise Advanced (EA) self-managed | Download and run the MongoDB SQL Schema Builder CLI against your cluster. | To manage schemas for EA self-managed deployments, see MongoDB SQL Schema Builder CLI. |
Atlas Data Federation | Generate and manage schemas using the Atlas UI or | To manage schemas for Atlas Data Federation deployments, see Atlas Data Federation Schema Commands. |