-
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
pysparkwith the--jarsoption.
pyspark --jars AthenaJDBC42-2.0.35.1000.jar- Use
spark.read.jdbcto connect to Athena. You need to specify either a User/Password in the properties or set theAwsCredentialsProviderClassproperty.