PyAthenaJDBC
PyAthenaJDBC copied to clipboard
how to use custom credential provider jar with sqlalchemy
Hello,
We built a custom credential provider jar for custom authentication to athena. as per the aws documentation mentioned below.
https://aws.amazon.com/blogs/big-data/connect-to-amazon-athena-with-federated-identities-using-temporary-credentials/
but I have passed the extra jar(credential jar) in driver_path along with the athenajdbc jar. like driver_path="<path_to_driver_jar>;<path_to_custom_credentials_jar>"
But it is failing and not recognizing the custom class. Should I use a different approach to pass the extra jar?
If I pass only jdbc jar then it is throwing the credential class missing, if I pass both the jars ;
separated then it is throwing TypeError: Class com.simba.athena.jdbc.Driver is not found
It doesn't support loading multiple Jar files, I think it would be better to create a shaded jar(fat jar) file that contains the JDBC driver and custom credential classes and specify them in the driver class path. Alternatively, consider using a library that does not depend on JDBC. https://github.com/laughingman7743/PyAthena
It doesn't support loading multiple Jar files, I think it would be better to create a shaded jar(fat jar) file that contains the JDBC driver and custom credential classes and specify them in the driver class path. Alternatively, consider using a library that does not depend on JDBC. https://github.com/laughingman7743/PyAthena
Thanks @laughingman7743 does PyAthena supports custom authentication?(writing our own credential generator class)
It doesn't support the Java credential provider that you have created on your own. If so, I think you need to use the JDBC version.