How to access MongoDB using database building block in Leapwork?

How to access MongoDB using database building block in Leapwork?

Introduction

In Leapwork, users can access MongoDB using a Database building block in Leapwork. To do so, users have to run through a few steps to make it work.

Prerequisites

Make sure that the MongoDB ODBC driver has been already installed on the machine before configuring the ODBC connection corresponding to MongoDB (to install the ODBC driver for MongoDB, Click Here).

Configuring ODBC connection for MongoDB

  1. Open 64-bit ODBC application in your system.

  2. Click Add (Make sure you choose System DSN, in case you want to run ODBC via agent/schedule).

  3. Select "Devart ODBC Driver for MongoDB" and click Finish.

  4. Enter a logical name for ODBC data source (1-Data Source Name, 2-Enter a meaningful description, 3- is the database server you want to connect with, 4- The Database name).

  5. Click Test Connection to make sure that the connection with the Mongo Database has been configured successfully.

  6. Click OK. You are ready to access the database using Leapwork's Database building block.

Example:

Refer below screenshot to know more about how to access the MongoDB DSN using the Database building block in Leapwork.

If you have any questions, please reach out to our Priority Support team.