Docs Menu

Docs HomeMongoDB Atlas

Query with Atlas SQL



The support for SQL queries is available as a Preview feature. This feature and the corresponding documentation may change at any time during the Preview phase.

You can run SQL-style queries to search data on your federated database instances using the Atlas SQL Interface. This capability allows you to visualize, graph, and report on your Atlas data using relational business intelligence tools such as Power BI and Tableau.


Atlas SQL Interface only supports read operations. You cannot write data to your Atlas cluster with the Atlas SQL Interface.

The Atlas SQL Interface is available by default when you create a federated database instance. Atlas Data Federation automatically creates collection schemas for Atlas SQL query compilation and type inference. To learn more about the schema, see Schema Management.

To use the Atlas SQL Interface to run SQL queries, connect to your data using a MongoDB SQL Driver or one of the BI tool Named Connectors. To learn more about the different connection options, see Connect.

MongoDB Atlas SQLquery flow diagram

The Atlas SQL interface includes the following components:

A federated database instance is a deployment of Atlas Data Federation. Each federated database instance contains virtual databases and collections that map to data in your data stores. This also provides a SQL schema and translates Atlas SQL queries between your BI tool and your Atlas data.

A SQL driver or a Named Connector provides a standard method to connect to a BI tool. If you are using a BI tool, check which connections it supports.

A visualization and reporting tool, such as Power BI or Tableau.

To start querying your Atlas data with Atlas SQL, enable the Atlas SQL Interface and connect to your data with a driver or BI tool of your choice.

←  Manage Atlas Data Federation Query LimitsEnable the Atlas SQL Interface →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.