cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate athena queries from S3 With Python and Boto3?

Kaniz_Fatma
Community Manager
Community Manager
 
1 ACCEPTED SOLUTION

Accepted Solutions

shan_chandra
Esteemed Contributor
Esteemed Contributor

Please run the below steps in an isolated notebook  to connect to Athena

1. Install boto3 

%sh pip install boto3 

2. check if boto3 library is installed 

%python
import boto3
boto3.__version__

3. Run the below code 

%python 
import boto3
client = boto3.client('athena')

View solution in original post

1 REPLY 1

shan_chandra
Esteemed Contributor
Esteemed Contributor

Please run the below steps in an isolated notebook  to connect to Athena

1. Install boto3 

%sh pip install boto3 

2. check if boto3 library is installed 

%python
import boto3
boto3.__version__

3. Run the below code 

%python 
import boto3
client = boto3.client('athena')

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group