databaseSQL

circle-check

The GLConnectors SQL Connector provides a powerful and flexible way to connect to and query your SQL databases directly from GL Connectors' servers. By leveraging the robustness of SQLAlchemy, it supports a wide range of database systems, allowing you to seamlessly integrate your existing data infrastructure.

This guide will walk you through configuring and how to use the SQL Connector.

Configuration Parameters

You can configure a new database integration in two ways: by providing a full connection url or by specifying individual connection parameters.

When initiating the integration, you pass a configuration dictionary. If the url field is provided, all other connection-specific fields are ignored.

Required Fields

This is the simplest method. Provide the full database connection string.

Required Fields:

  • url: The full URL to the database, including the protocol and hostname.

config = {
    "url": "postgresql://myuser:mypassword@myhost:5432/mydatabase",
    "identifier": "My-Production-DB" # Optional, but highly recommended
}

Additional Optional Fields

  • identifier: A custom string to help you identify this specific integration later. While this field is optional, it is highly recommended. If not provided, the identifier defaults to a concatenated string of connection details (driver:host:port:username:database), which can become long and difficult to read. Setting a clear, human-readable identifier is best practice.

  • extra_config: A dictionary for any extra parameters required by the database driver (e.g., SSL settings).

Drivers

circle-exclamation

Drivers must follow SQLAlchemy's supported engine that can be found herearrow-up-right. The following database types have been tested:

Database Type
Driver Name

MySQL

mysql

MariaDB

mysql or mariadb

PostgreSQL

postgresql

AWS Athena

awsathena+rest

Microsoft SQL Server

mssql+pymssql

Usage Example

Last updated