# Jupyter Notebook

Jupyter Notebook is an interactive computing environment that allows users to create and share documents containing live code, equations, visualizations, and narrative text. It supports various programming languages, including Python, R, and Julia, among others. Jupyter Notebook is commonly used for data analysis, machine learning, scientific computing, and research.

## Requirements

* Install the latest [e6data pip package](/product-documentation/connectors-and-drivers/python-connector.md).
* Recommended Jupyter Notebook version - v7.0.7

## Connection

Get the necessary [connection information](broken://pages/amzyzgmFtIIvAWabchFw) for your cluster:

* Host
* Port
* Username
* Password ([Personal Access Token](broken://pages/BO9IJX3Hj4YaBgnZ1VGK))
* Cluster uuid
* Secure

To use e6data with classic Jupyter Notebook and Python, follow these instructions:

1. Create a new notebook: in the classic Jupyter Notebook, on the **Files** tab, click **New > Python 3 (ipykernel)**.
2. Run the below command in the Jupyter Notebook paragraph,&#x20;

```python
pip install e6data-python-connector
```

3. Run the below script in the paragraph with the information prefilled,&#x20;

```python
from e6data_python_connector import Connection

username = '<username>'  # Your e6data Email ID.
password = '<password>'  # Access Token generated in the e6data console.

host = '<host>'  # IP address or hostname of the cluster to be used.
database = '<database>'  # # Database to perform the query on.
port = <port>  # Port of the e6data engine.
catalog_name = '<catalog_name>'
cluster_uuid = '<cluster_uuid>'  # Specify cluster UUID
secure = True # Flag to use a secure channel for data transfer, default to False

conn = Connection(
    host=host,
    port=port,
    username=username,
    database=database,
    password=password,
    cluster_uuid=cluster_uuid,
    secure=secure
)
```

4. To query data from e6 please use the below script,&#x20;

```python
query = """select * from <table>"""  # Replace with the query.

cursor = conn.cursor(catalog_name=catalog_name)
query_id = cursor.execute(query)  # The execute function returns a unique query ID, which can be use to abort the query.
all_records = cursor.fetchall()
for row in all_records:
   print(row)
```

<figure><img src="/files/hMpt6tVmHPznTwmAiftq" alt="" width="563"><figcaption></figcaption></figure>

## TLS/HTTPS

e6data utilizes globally trusted certificates, ensuring that the host and port provided by the connection dialogue are adequate. Any e6data cluster necessitating authentication must also employ TLS/HTTPS. If adhering to globally trusted certificate best practices, utilize the cluster’s HTTPS URL in the connection string as detailed in the aforementioned steps. (Only required for TLS connectivity type of endpoints.)&#x20;


---

# 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.e6data.com/product-documentation/connectors-and-drivers/jupyter-notebook.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.
