# Connectors and Connection Strings

In Data Platform's Project, all available **data** are defined and configured in the [Lakehouse Manager](/en/product/lakehouse-manager/index).  

In the Python SDK, all those **data sources** are named by a unique **connection string** and accessible through **connectors** returned by the `connect()` function. The returned **Connector object** as well as its available methods depend on the **data source's type**.

A simple example to list tables from the default dataset:
```python
from forepaas.dwh import connect

# connect to default dataset
cn_prim = connect('dwh/default_dataset/')
# list databases tables
tables = cn_prim.list()
print(tables)
```

Data sources may be split in 4 categories:
* [Buckets](#buckets)
* [Storage Engines](#storage-engines)
* [Query Engine](#query-engine)
* [Sources](#sources)

> **Connection strings** are used in all Project's components to reference **data sources**, for instance in Data Processing Engine [Load](/en/product/dpe/actions/load/advanced-mode) and [Aggregate](/en/product/dpe/actions/aggregate/advanced-mode) actions or when [applying segmentation](/en/getting-further/segmentation/dwh-attributes?id=understanding-advanced-parameters).

---
## Buckets

[Buckets](/en/product/lakehouse-manager/buckets/index) are Data Platforms' built-in object store. Below, the connection string and its respective Connector object returned by the `connect function`.

| connection string | Connector | description |
| :---------------- | :-------: | :---------- |
| `connect("data_store")`| DataStore | Connects to the buckets |
| `connect("data_store/my-bucket")` | Bucket | Connects to a specific bucket |

Read more about [DataStore and Bucket connectors](/en/technical/sdk/dpe/connect-bucket).

---
## Storage Engines

Projects are linked to **Storage Engines** as main databases to store and query data at the heart of your Project.
 
A Project can be defined with multiple [datasets](/en/product/lakehouse-manager/datasets/index), but by default you will receive 1 dataset: **default_dataset**. You can also create custom internal and external datasets.

| connection string | Connector | description |
| :---------------- | :-------: | :---------- |
| `connect("dwh/default_dataset/")`| Dataset | Connects to the default dataset - **default_dataset** |
| `connect("dwh/exampleDataset/")`| Dataset | Connects to the custom dataset created by you - **exampleDataset** |

Read more about [Database connector](/en/technical/sdk/dpe/connect-dm).

---
## Query Engine (Trino)

| connection string | Connector | description |
| :---------------- | :-------: | :---------- |
| `connect("query_engine")`| Trino | Connects to the query engine (Trino) |
| `connect(f"query_engine/{catalog}/{schema}")` | Trino | Connects directly to a **schema** in a **catalog** |


---
## Sources

You may also connect to external data sources declared in [Connectors's Sources](/en/product/connectors/sources/index). Each external source has an associated **connection string** based on the initial name given to the source.
For instance, a new data source named `My first data` will have the connection string equal to `dwh/my_first_data`.  
The **technical name** is displayed on the main Connectors Source's page.

External sources may be split in a few types:
* **Databases connectors** have same methods as storage engines, see [Database connectores](/en/technical/sdk/dpe/connect-dm?id=lakehouse-manager-connector-methods)  
(i.e. Snowflake, PostgreSQL, Oracle, Microsoft SQL Server, Amazon Redshift, MongoDB...)  
* **Protocol connectors** when accessing file storage or object store (Data Platform Buckets, Data Platform File Upload, SFTP, Amazon S3, ...)  
Those connectors have same methods as [Bucket connector](/en/technical/sdk/dpe/connect-bucket?id=bucket-connector-methods)  
* **Stream** (i.e. Kafka, MQIT, Amazon Kinesis) or **External APIs** (i.e. Google Analytics, Facebook, Twitter, Mailchimp..)  
Those connectors are mainly designed to be used from [Connectors Analyzer](/en/product/connectors/analyzer/index) and [Data Processing Engine Load Actions](/en/product/dpe/actions/load/index). 