Navigation
This documentation refers to the MongoDB Charts beta service in MongoDB Atlas. Read the on-premises documentation to learn how to use the MongoDB Charts beta on site.

Data Sources

Data sources in MongoDB Charts reference a collection or view in your MongoDB deployment. When building a chart, you will need to specify the data source that the chart uses.

To view, add, or remove data sources, click Data Sources on the top navigation bar.

Data Sources View

The Data Sources view displays existing data sources that the currently logged-in user has permission to view. The data sources are displayed in a tabular format with the following columns:

Diagram of the "Data Sources" view
Column Description
Deployment The MongoDB deployment containing the source database and collection. Identified by the Atlas cluster associated with the Charts instance.
Database The database containing the source collection or view.
Collection The collection or view from where Charts retrieves data.
Alias

Optional. The display name of the data source used by the Chart Builder. Providing an Alias may result in a shorter and more identifiable name when selecting a data source in the chart builder.

To modify the Alias for a data source, see the Modify a Data Source section.

Last modified The date the data source was last modified.
Permissions

The icon next to the Access button denotes the permissions you have on the data source. For details on the various data source permissions, see Data Source Permissions.

To modify the permissions for a data source, see the Modify a Data Source section.

Note

You can sort data sources by any of the columns by clicking on the column header.

Filter Data Sources

To search for specific data sources, use the search bar at the upper right corner of the Data Sources view. You can search by Deployment, Database, Collection, or Alias.

Additionally, you can use the dropdown to the left of the search bar to show either all data sources on your MongoDB Charts deployment, or only data sources for which you have the Owner permission. For more information on data source permissions, see Data Source Permissions.

Add a Data Source

  1. From the Data Sources view, click the New Data Source button.

  2. Select one of the Atlas clusters.

    Atlas displays all clusters in the current project for which the current user has the Project Data Access Read Only role or higher.

  3. Click Connect.

  4. Select the collections from which you wish to create data sources. Charts creates a separate data source for each selected collection.

  5. Click Set Permissions.

  6. Set the permissions for the data source.

    By default, Atlas assigns the Reader permission to every user in the project. To change a user’s permission, search for the user by name or email address using the search bar.

  7. Click Publish Data Source.

    Note

    If you selected multiple collections for your data source in step 4, the data source permissions you select are applied to all of the selected collections when you publish your data source. If you wish to apply different permissions to individual collections that you have selected, you will need to edit those data sources after publishing.

You will see your newly added data source listed in the Data Sources view.

Modify a Data Source

MongoDB Charts users can modify certain properties of a data source provided they have appropriate permissions on the target data source. You can modify a data source’s alias and permissions after you create it.

Modify Data Source Alias

A data source Manager or Owner can modify the Alias of a data source by hovering over the row’s Alias field, then clicking either Add Alias or the edit button (pencil icon). Click the green check mark to save the alias.

Modify Data Source Permissions

A data source Owner can add, modify, and remove user permissions on a data source.

  1. From the Data Sources view, click the Access button in the Permissions column for the data source you want to modify permissions.
  2. Perform the desired permission changes for the data source. Refer to the Data Source Permissions page for details on the permissions available and instructions on setting the permissions.
  3. Click Apply Changes.

Remove a Data Source

Important

To remove a data source, you must have the Owner permission on that data source.

To remove a data source:

  1. From the Data Sources view, click the ellipsis () button on the right-hand side of the data source you want to delete.
  2. Click Delete Data Source.
  3. Click Delete Data Source again in the dialog to confirm deletion.

Important

Any charts using the deleted data source will need to be reconfigured using a different data source or deleted.