-
Download the JDBC driver from here: https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html - I used the JDBC driver with the Athena SDK,
AthenaJDBC42-2.0.35.1000.jar
. -
Start
pyspark
with the--jars
option.
pyspark --jars AthenaJDBC42-2.0.35.1000.jar
- Use
spark.read.jdbc
to connect to Athena. You need to specify either a User/Password in the properties or set theAwsCredentialsProviderClass
property.