> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# atoti.Session.connect_to_external_database()

#### Session.connect\_to\_external\_database(connection\_config, /)

Connect to an external database using DirectQuery.

<Note>
  This feature is not part of the community edition: it needs to be [unlocked](../guides/unlocking_all_features).
</Note>

* **Parameters:**
  **connection\_config** (*ExternalDatabaseConnectionConfigT*) – The config to connect to the external database.
  Each [DirectQuery plugin](../getting_started/plugins#directquery) has its own `ConnectionConfig` class.
* **Return type:**
  [*ExternalDatabaseConnection*](./atoti.directquery.external_database_connection#atoti.ExternalDatabaseConnection)\[*ExternalDatabaseConnectionConfigT*]
