|
| 1 | +--- |
| 2 | +title: Connect to and manage MongoDB |
| 3 | +description: This guide describes how to connect to MongoDB in Azure Purview, and use Azure Purview's features to scan and manage your MongoDB source. |
| 4 | +author: linda33wj |
| 5 | +ms.author: jingwang |
| 6 | +ms.service: purview |
| 7 | +ms.subservice: purview-data-map |
| 8 | +ms.topic: how-to #Required; leave this attribute/value as-is. |
| 9 | +ms.date: 04/12/2022 |
| 10 | +ms.custom: template-how-to #Required; leave this attribute/value as-is. |
| 11 | +--- |
| 12 | + |
| 13 | +# Connect to and manage MongoDB in Azure Purview (Preview) |
| 14 | + |
| 15 | +This article outlines how to register MongoDB, and how to authenticate and interact with MongoDB in Azure Purview. For more information about Azure Purview, read the [introductory article](overview.md). |
| 16 | + |
| 17 | +[!INCLUDE [feature-in-preview](includes/feature-in-preview.md)] |
| 18 | + |
| 19 | +## Supported capabilities |
| 20 | + |
| 21 | +|**Metadata Extraction**| **Full Scan** |**Incremental Scan**|**Scoped Scan**|**Classification**|**Access Policy**|**Lineage**| |
| 22 | +|---|---|---|---|---|---|---| |
| 23 | +| [Yes](#register)| [Yes](#scan)| No | [Yes](#scan) | No | No| No | |
| 24 | + |
| 25 | +The supported MongoDB versions are 2.6 to 5.1. |
| 26 | + |
| 27 | +When scanning MongoDB source, Azure Purview supports extracting technical metadata including: |
| 28 | + |
| 29 | +- Server |
| 30 | +- Databases |
| 31 | +- Collections |
| 32 | +- Views |
| 33 | + |
| 34 | +When setting up scan, you can choose to scan one or more MongoDB database(s) entirely, or further scope the scan to a subset of collections matching the given name(s) or name pattern(s). |
| 35 | + |
| 36 | +## Prerequisites |
| 37 | + |
| 38 | +* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 39 | + |
| 40 | +* An active [Azure Purview account](create-catalog-portal.md). |
| 41 | + |
| 42 | +* You need to be a Data Source Administrator and Data Reader to register a source and manage it in the Azure Purview Studio. See our [Azure Purview Permissions page](catalog-permissions.md) for details. |
| 43 | + |
| 44 | +* Set up the latest [self-hosted integration runtime](https://www.microsoft.com/download/details.aspx?id=39717). For more information, see [the create and configure a self-hosted integration runtime guide](manage-integration-runtimes.md). The minimal supported Self-hosted Integration Runtime version is 5.16.8093.1. |
| 45 | + |
| 46 | + * Ensure [JDK 11](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html) is installed on the machine where the self-hosted integration runtime is installed. |
| 47 | + |
| 48 | + * Ensure Visual C++ Redistributable for Visual Studio 2012 Update 4 is installed on the self-hosted integration runtime machine. If you don't have this update installed, [you can download it here](https://www.microsoft.com/download/details.aspx?id=30679). |
| 49 | + |
| 50 | +## Register |
| 51 | + |
| 52 | +This section describes how to register MongoDB in Azure Purview using the [Azure Purview Studio](https://web.purview.azure.com/). |
| 53 | + |
| 54 | +### Steps to register |
| 55 | + |
| 56 | +To register a new MongoDB source in your data catalog, do the following: |
| 57 | + |
| 58 | +1. Navigate to your Azure Purview account in the [Azure Purview Studio](https://web.purview.azure.com/resource/). |
| 59 | +1. Select **Data Map** on the left navigation. |
| 60 | +1. Select **Register** |
| 61 | +1. On Register sources, select **MongoDB**. Select **Continue**. |
| 62 | + |
| 63 | +On the **Register sources (MongoDB)** screen, do the following: |
| 64 | + |
| 65 | +1. Enter a **Name** that the data source will be listed within the Catalog. |
| 66 | + |
| 67 | +1. Enter the **server** name. Specify a name to uniquely identify your MongoDB instance in your company. For example, `host` for standalone deployment, `MyReplicaSetName` for replica set, `MyClusterName` for sharded cluster. This value will be used in asset qualified name and cannot be changed. |
| 68 | + |
| 69 | +1. Select a collection or create a new one (Optional). |
| 70 | + |
| 71 | +1. Finish to register the data source. |
| 72 | + |
| 73 | + :::image type="content" source="media/register-scan-mongodb/register-sources.png" alt-text="register sources options" border="true"::: |
| 74 | + |
| 75 | +## Scan |
| 76 | + |
| 77 | +Follow the steps below to scan MongoDB to automatically identify assets and classify your data. For more information about scanning in general, see our [introduction to scans and ingestion](concept-scans-and-ingestion.md). |
| 78 | + |
| 79 | +### Authentication for a scan |
| 80 | + |
| 81 | +The supported authentication type for a MongoDB source is **Basic authentication**. |
| 82 | + |
| 83 | +### Create and run scan |
| 84 | + |
| 85 | +To create and run a new scan, do the following: |
| 86 | + |
| 87 | +1. In the Management Center, select Integration runtimes. Make sure a self-hosted integration runtime is set up. If it isn't set up, use the steps mentioned [here](./manage-integration-runtimes.md) to create a self-hosted integration runtime. |
| 88 | + |
| 89 | +1. Navigate to **Sources**. |
| 90 | + |
| 91 | +1. Select the registered MongoDB source. |
| 92 | + |
| 93 | +1. Select **+ New scan**. |
| 94 | + |
| 95 | +1. Provide the below details: |
| 96 | + |
| 97 | + 1. **Name**: The name of the scan |
| 98 | + |
| 99 | + 1. **Connect via integration runtime**: Select the self-hosted integration runtime used to perform scan. |
| 100 | + |
| 101 | + 1. **Credential**: Select the credential to connect to your data source. Make sure to: |
| 102 | + * Select **Basic Authentication** while creating a credential. |
| 103 | + * Provide the user name used to connect to MongoDB in the User name input field. |
| 104 | + * Store the user password used to connect to MongoDB in the secret key. |
| 105 | + |
| 106 | + 1. **Connection string**: Specify the MongoDB connection string used to connect to your MongoDB, excluding the username and password. For example, `mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017/?replicaSet=myRepl`. |
| 107 | + |
| 108 | + 1. **Databases**: Specify a list of MongoDB databases to be imported. The list can have one or more database names separated by semicolon (;), e.g. `database1; database2`. |
| 109 | + |
| 110 | + 1. **Collections**: The subset of collections to import expressed as a semicolon separated list of collections, e.g. `collection1; collection2`. All collections are imported if the list is empty. |
| 111 | + |
| 112 | + Acceptable collection name patterns using SQL LIKE expressions syntax include using %. For example: `A%; %B; %C%; D`: |
| 113 | + * Start with A or |
| 114 | + * End with B or |
| 115 | + * Contain C or |
| 116 | + * Equal D |
| 117 | + |
| 118 | + Usage of NOT and special characters aren't acceptable. |
| 119 | + |
| 120 | + 1. **Number of sample documents**: Number of sample documents to be analyzed for schema extraction. Default is 1000. |
| 121 | + |
| 122 | + > [!NOTE] |
| 123 | + > Currently, schema extraction is not yet supported. |
| 124 | +
|
| 125 | + 1. **Maximum memory available** (applicable when using self-hosted integration runtime): Maximum memory (in GB) available on customer's VM to be used by scanning processes. It's dependent on the size of MongoDB source to be scanned. |
| 126 | + |
| 127 | + :::image type="content" source="media/register-scan-mongodb/scan.png" alt-text="scan MongoDB" border="true"::: |
| 128 | + |
| 129 | +1. Select **Test connection** to validate the configurations. |
| 130 | + |
| 131 | +1. Select **Continue**. |
| 132 | + |
| 133 | +1. Choose your **scan trigger**. You can set up a schedule or ran the scan once. |
| 134 | + |
| 135 | +1. Review your scan and select **Save and Run**. |
| 136 | + |
| 137 | +[!INCLUDE [create and manage scans](includes/view-and-manage-scans.md)] |
| 138 | + |
| 139 | +## Next steps |
| 140 | + |
| 141 | +Now that you've registered your source, follow the below guides to learn more about Azure Purview and your data. |
| 142 | + |
| 143 | +- [Data insights in Azure Purview](concept-insights.md) |
| 144 | +- [Search Data Catalog](how-to-search-catalog.md) |
0 commit comments