MongoDB revolutionizes data management with its innovative NoSQL approach, offering a flexible and scalable solution for modern application development.
Authentication Requirements: To establish a connection with your MongoDB instance, you will require specific authentication credentials. You have the choice of either of the following two credential options:
- MongoDB database username and password.
- Alternative authentication methods (excluding AWS IAM authentication).
- Hostname of the MongoDB database.
- Port number for database communication.
- The designated database name within the MongoDB host.
- Set up your firewall settings to permit DronaHQ's IP whitelist for access to your MongoDB host.
Having these essential prerequisites in place will ensure a seamless integration of MongoDB with DronaHQ, facilitating efficient data management and utilization without the need for AWS credentials.
Configuring Connector in DronaHQ
Configure your database category using the provided details. Validate connection with
Test connection and
settings for secure database setup.
DronaHQ can Auto fill crucial connection values like host, name, password, and more from the connector's connection string.
|Enter the Host Domain or IP
|Enter the Port number
|Enter the Database name
|Choose from User and Password or AWS IAM
|Enter the Username
|Enter the Password
value connection options in database configuration refer to specific settings (keys) and their corresponding values that dictate how the application connects to the database
|Use Latest MongoDB Driver
|Benefit from the latest features and improvements by using the most up-to-date MongoDB driver.
|Use Dynamic Database Host
|Dynamically determine the host for the database connection.
|Use Dynamic Database Name
|Set the database name dynamically, allowing easy switching between databases.
|Use Dynamic Database Credentials
|Enable dynamic database credentials for secure and convenient management.
|Connect using SSL
|Securely access the database using an encrypted SSL connection, ensuring data integrity and confidentiality.
|Enable SSH Tunneling
|Securely access the database through encrypted SSH tunneling.
|Enhance security by restricting database access to specific whitelisted IP addresses.
Adding Database Queries
After configuring the connector, access it in your Connector Library. Click
Add query following the connection setup.
Here's how you can create and manage queries for your MongoDB database:
Name your Query: Provide a unique name for your query, which will be used for easy access.
Select a Collection: Specify the MongoDB collection on which you want to perform the action. This helps direct the query to the desired data set.
Choose an Action: MongoDB supports various actions, each with specific parameters. Select the appropriate action from the list provided. For example, if you select
Findas the action, the available parameters will include Filter, Projection, Sort, Limit, and Skip. If you choose
InsertOne,the parameters will change to Insert as Key: Value string.
Set Parameters: Depending on the chosen action, input the necessary parameters. For instance, if you're performing a
Findaction, specify the filter conditions and other relevant details. If it's an
InsertOneaction, provide the data you want to insert.
|Criteria to match documents. Specify conditions to filter and retrieve specific data from the collection.
|Fields to include/exclude from results. Define which fields should be included or excluded in the query results.
|Sorting order for results. Specify how the query results should be sorted based on one or more fields.
|Number of documents to skip. Set the offset for the query results, skipping a certain number of documents.
|Maximum number of documents to retrieve. Set a limit on the number of documents returned by the query.
|Modifications to apply. Define the changes you want to make to the selected documents in the collection.
|Data to be inserted. Provide the document or data that you want to insert into the collection.
|Array of stages for aggregation pipeline. Define a series of processing stages to transform and analyze data in the collection.
|Field for which distinct values are sought. Specify the field from which you want to find distinct values.
|Stages for aggregation pipeline. Define various stages such as grouping, filtering, and transformation to perform data aggregation.
- Run the Query: Once you've configured the action and parameters, you can execute the query by clicking
Test QueryThe response will be displayed based on the provided parameters, allowing you to review the retrieved data or the outcome of the query.
Utilize double curly brackets for incorporating dynamic variables. Prior to saving, test with sample values. Associate dynamic variables with controls/actions for real-time utilization.
Your saved queries will be visible beneath your connector within the Connector Library.
|Retrieve documents from a collection based on specified criteria.
|Retrieve a single document from a collection that matches a specified filter.
|Insert a single document into a collection.
|Insert multiple documents into a collection.
|Update a single document in a collection that matches a specified filter.
|Update multiple documents in a collection that match a specified filter.
|Delete a single document from a collection that matches a specified filter.
|Find distinct values for a specified field in a collection.
|Perform aggregation operations on a collection, such as grouping, sorting, and computing aggregates.
|Count the number of documents in a collection that match a specified filter.
Using MongoDB Connector
Follow the steps below to integrate the MongoDB Connector and execute queries:
Access Data Bind Section or Control Action:
- Navigate to the data bind section of the control
Select MongoDB Connector from
Data Bind Options -> Quick Select -> Database Queries
- From the available options, choose MongoDB Connector.
- Pick the specific connector query that will retrieve the desired data.
- Click on "Continue" to proceed.
- Test and Finalize:
Once you complete these steps, you'll be able to observe the results based on the input values when running the application.