Notebooks
Athena Notebooks bring the power of Jupyter notebooks directly into the Athena platform, enhancing your data analysis and coding experience. These notebooks allow you to conduct in-depth, AI-powered analyses that contain interactive code, equations, visualizations, and models.
Key Features
Chat with Athena in the sidebar
You can collaborate with Athena while you work. She can “see” your notebook and your currently selected cell. So if you are stuck on something, just pop open the sidebar and ask for help or to write the code for you!
Call Athena directly in a notebook cell
In Jupyter notebooks the double percentage signs ”%%” are cell magic commands. You can use Athena directly by using the %%ai athena
or %%ai athena -f code
command followed by your prompt your request.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Directly load uploaded Excel/CSV datasets within Notebooks
Effortlessly manage your datasets by uploading Excel or CSV files as Athena assets and loading them into Athena Notebooks with a single command via the chat sidebar.
Use the Athena SDK
We provide an SDK that exposes some of Athena’s capabilities. The SDK allows you to generate conversation messages, perform web searches, use tools and workflows, and more. You can use that SDK directly within Athena Notebooks, eliminating the need to enter or setup your API Key.
Athena Notebooks bring the power of Jupyter notebooks directly into the Athena platform, enhancing your data analysis and coding experience. These notebooks allow you to conduct in-depth, AI-powered analyses that contain interactive code, equations, visualizations, and models.
Key Features
Chat with Athena in the sidebar
You can collaborate with Athena while you work. She can “see” your notebook and your currently selected cell. So if you are stuck on something, just pop open the sidebar and ask for help or to write the code for you!
Call Athena directly in a notebook cell
In Jupyter notebooks the double percentage signs ”%%” are cell magic commands. You can use Athena directly by using the %%ai athena
or %%ai athena -f code
command followed by your prompt your request.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Enter the following code in a new cell of your Notebook and press Shift+Enter.
Directly load uploaded Excel/CSV datasets within Notebooks
Effortlessly manage your datasets by uploading Excel or CSV files as Athena assets and loading them into Athena Notebooks with a single command via the chat sidebar.
Use the Athena SDK
We provide an SDK that exposes some of Athena’s capabilities. The SDK allows you to generate conversation messages, perform web searches, use tools and workflows, and more. You can use that SDK directly within Athena Notebooks, eliminating the need to enter or setup your API Key.
Athena Notebooks enable you to seamlessly execute saved SQL queries within your notebook environment, allowing for efficient data analysis and workflow integration.
Step-by-step Instructions
Create a query snippet
Navigate to Spaces. Drag and drop the database you wish to query onto your Space. In the Chat sidebar, enter the following prompt and press Enter.
Save the query
Save your query snippet by clicking on the save icon present on top-right of the query snippet.
Get IDs
In the right Chat sidebar, enter the following prompt and press Enter.
your-query-name
and your-database-name
with the names of your query and database on which the query is executed.Queries in notebooks can be executed either by referencing a saved SQL snippet or by directly running SQL statements against your connected databases.
Create a Notebook
In the right Chat sidebar, enter the following prompt and press Enter.
Execute your query from the saved query snippet
Copy and paste the following python snippet in a new cell of the Notebook that just got created. Run the cell.
query_asset_id
with the asset_id
of the query retrieved from Step 3.Create a Notebook
In the right Chat sidebar, enter the following prompt and press Enter.
Execute your query from the saved query snippet
Copy and paste the following python snippet in a new cell of the Notebook that just got created. Run the cell.
query_asset_id
with the asset_id
of the query retrieved from Step 3.Create a Notebook
In the right Chat sidebar, enter the following prompt and press Enter.
Format and execute your query
Copy and paste the following python snippet in a new cell of the Notebook. You can modify your SQL query if required by this method. Run the cell.
your-sql-query
with the SQL query from your saved query snippet and database-asset-id
with the asset_id
of the database retrieved from Step 3.Merchandise Demand Forecasting
Use Athena Notebooks to forecast merchandise demand by analyzing historical sales data, eliminating coding, and visualizing sales trends for effective inventory management.
Network Optimization in R
Streamline supply chain efficiency and optimize logistics operations using AI-native Athena Notebooks in R, facilitating seamless management and comprehensive analysis without coding.