# Overview

Prism enables users to connect to a data warehouses via `Connector` objects. Connector objects are passed into the `PrismProject`'s instantiation via the [`connectors`](/fundamentals/prismproject-api.md#overview) keyword argument, and tasks can access connectors via [`CurrentRun.conn`](/fundamentals/currentrun-api/currentrun.conn.md).

Note that ***connector objects are entirely optional**.* You can just as easily create a separate connection in each of your downstream tasks. However, we like using `Connector` instances for the following reasons:

1. `Connector` instances are thread-safe. It automatically handles creating connection and cursor objects whenever you want to run SQL queries in a multi-threaded project.&#x20;
2. `Connector` instances can be shared across projects, facilitating collaboration and reducing duplicative code.

## Executing SQL

The `Connector` class has one public method: `execute_sql`. As the name suggests, this method allows users to execute SQL and return the results as a Python object.

Here is the full method definition:

```python
Connector.execute_sql(
    sql: str,
    return_type: Optional[Literal["pandas"]],
) -> Union[pd.DataFrame, List[List[Any]]]:
```

This method takes two arguments:

* `sql`: SQL query to execute
* `return_type`: return type — either `pandas` or `None`. If `pandas`, then the data is converted to a Pandas DataFrame. If `None`, then the data is returned as a list of tuples or dictionaries.

These are current `Connector` classes:

* BigQueryConnector
* PostgresConnector
* RedshiftConnector
* SnowflakeConnector
* TrinoConnector
* PrestoConnector


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.runprism.com/connectors/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
