AI2sql Docs
Go to AppContact
  • 1. Introduction
    • 1.1. What is AI2SQL?
    • 1.2. Key features of AI2SQL
    • 1.3. How to get started with AI2SQL
    • 1.4. What Users Can Ask AI2SQL
  • 2. AI2SQL Dashboard
    • 2.1. Accessing the dashboard
    • 2.2. Generating SQL based on predefined datasets
    • 2.3. Exploring sample queries and use cases
  • 3. Managing Tables
    • 3.1. Importing tables using DDL
    • 3.2. Manually adding tables
    • 3.3. Editing, Updating, and Deleting Table Information
    • 3.4. Importing Database Schema via CSV
  • 4. AI2SQL Workspace
    • 4.1. Navigating the workspace
    • 4.2. Generating SQL for specific database engines
    • 4.3. Selecting tables for SQL generation
    • 4.4. Saving and organizing queries in the workspace
  • 5. Formatting SQL
    • 5.1. Accessing the SQL formatter
    • 5.2. Customizing formatting options
    • 5.3. Applying formatting to your SQL queries
  • 6. SQL Fixer
    • 6.1. Identifying SQL errors with SQL Fixer
    • 6.2. Understanding common SQL error messages
    • 6.3. Resolving SQL errors using AI2SQL's suggestions
    • 6.4. Handling Long SQL Queries
  • 7. Formula Generator
    • 7.1. Overview of Formula Generator
    • 7.2. Excel, Google Sheets, and regex formula translation
    • 7.3. Power BI DAX formula translation
    • 7.4. Airtable formula translation
    • 7.5. Using Formula Generator to enhance SQL queries
  • 8. CSV Analyzer
  • 9. Database Connectors
    • 9.1. Supported database connectors
    • 9.2. Setting up database connections (MySQL, SQL Server, or PostgreSQL)
    • 9.2.1. AI2sql Oracle Cloud Connector
    • 9.3. Setting up MongoDB Connectors
    • 9.4. Google BigQuery Setup and Service Account Key Creation
    • 9.5. Generating SQL queries for connected databases
    • 9.6. Setting up Snowflake Connectors
    • 9.7. Troubleshooting AI2sql Connector Issues: A Comprehensive Checklist
    • 9.8. Requesting new database connectors
    • 9.9. System Security Overview
  • 10. Dataset Questions Generation
  • 11. AI2SQL ChatGPT Plugin User Guide
    • 11.1. Introduction
    • 11.2. Getting Started
    • 11.3. Obtaining Your Token
    • 11.4. Using Your Token
    • 11.5. Connecting Your MSSQL (SQL Server) Database
    • 11.6. Connecting Your MySQL Database
    • 11.7. Connecting Your PostgreSQL Database
    • 11.8. Generating SQL Queries
    • 11.9. Troubleshooting
  • 12. Troubleshooting and Support
    • 9.1. Common issues and solutions
    • 12.2. Chat Support
    • 12.3. Contacting AI2SQL support
    • 12.4. Community resources and forums
  • 13. Templates
    • 13.1. Custom Template Creation
    • 13.2. Save the Template
    • 13.3. Generate SQL Using Template
  • 14. AI2sql: SQL Generation from Database ER Diagrams
    • 14.1. Introduction
    • 14.2. SQL Generation Process
    • 14.3. Troubleshooting & FAQs
  • 15. AI2sql API Integration
  • 16. AI2SQL Dictionary Template
  • 17. AI2sql GPTs
    • 17.1. Getting Started
    • 17.2. Obtaining Your Token
    • 17.3. Connecting Your MySQL Database
  • 18. Connecting Your Local Database
  • 19. SQL File Uploader
    • 19.1 Generating SQL queries
Powered by GitBook
On this page
  1. 9. Database Connectors

9.3. Setting up MongoDB Connectors

Introduction

AI2SQL MongoDB connectors enable users to interact with MongoDB databases seamlessly. This help document guides users on how to provide their MongoDB credentials, including those from MongoDB Atlas, to connect with the AI2SQL platform.

Prerequisites

To use the AI2SQL MongoDB connectors, you must have the following:

  • Access to the AI2SQL platform

  • MongoDB server with valid credentials (host, port, username, password, and database) or MongoDB Atlas account

Connecting to MongoDB using AI2SQL

To connect to MongoDB using AI2SQL, follow these steps:

  1. Log in to the AI2SQL platform with your username and password.

  2. Navigate to the MongoDB connector section.

  3. Enter your MongoDB credentials in the respective fields:

    • Host: The server address or domain where your MongoDB instance is running.

    • Port: The port number on which your MongoDB instance is listening (default is 27017).

    • Username: Your MongoDB username with appropriate permissions.

    • Password: Your MongoDB password associated with the username.

    • Database: The name of the MongoDB database you want to connect to.

  4. Click on the "Connect" button to establish a connection with your MongoDB instance.

    If the connection is successful, you will see a "Connection established" message. If there is an issue with the connection, you will receive an error message with details about the problem. Check your MongoDB credentials and try again.

  5. Once connected, you can use the AI2SQL MongoDB connectors to fetch collections, query data, and perform other database-related tasks.

Getting MongoDB Atlas Connection Details

If you are using MongoDB Atlas, follow these steps to obtain your connection details:

  1. Log in to your MongoDB Atlas account.

  2. Navigate to the "Clusters" section.

  3. Click on the "Connect" button for the cluster you want to connect to.

  4. Choose "Connect your application."

  5. Select "Python" as the driver and choose the appropriate version.

  6. Copy the connection string provided. It should look like this:

    mongodb+srv://<username>:<password>@cluster0.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
  7. Replace <username> and <password> with your MongoDB Atlas username and password, respectively.

  8. Extract the following details from the connection string:

    • Host: The server address or domain (e.g., cluster0.mongodb.net)

    • Port: For MongoDB Atlas, the port is included in the connection string and is usually 27017.

    • Username: Your MongoDB Atlas username

    • Password: Your MongoDB Atlas password

    • Database: The database you want to connect to (replace myFirstDatabase with the desired database name)

  9. Enter these details in the AI2SQL MongoDB connector form, as described in Section 3, and click "Connect."

Troubleshooting and FAQs

  • Q: I cannot connect to my MongoDB instance. What should I do?

    A: Check your MongoDB credentials and ensure that your MongoDB instance is running and accessible. Verify that your MongoDB server is allowing connections from the AI2SQL platform's IP address.

  • Q: I received an authentication error. How can I resolve it?

    A: Ensure that your MongoDB username and password are correct, and the user has the necessary permissions to connect to the specified database.

Contacting Support

If you encounter any issues while using the AI2SQL MongoDB connectors or need assistance with the configuration and setup, please don't hesitate to contact the AI2SQL support team. They can provide guidance and help troubleshoot any problems you may be experiencing.

To contact the AI2SQL support team, you can:

  • Send an email to support@ai2sql.io with a detailed description of your issue or question. Please include any error messages, screenshots, or relevant information that can help diagnose the problem.

  • Reach out through the AI2SQL community forum (replace with your actual community forum URL), where you can ask questions and receive help from other users as well as the support team.

The AI2SQL support team will respond as quickly as possible to help you resolve any issues and ensure a smooth experience with the MongoDB connectors.

Previous9.2.1. AI2sql Oracle Cloud ConnectorNext9.4. Google BigQuery Setup and Service Account Key Creation

Last updated 1 year ago

Visit the AI2SQL support and submit a support ticket. Make sure to provide as much information as possible about the issue you're facing.

portal