Athena Data Source Connections¶
Here is a programmatic example for connecting to Athena.
CREATE DATACONNECTION athena_connection CXNPROPERTIES
(
'connection_type'='JDBC',
'jdbc_driver'='awsathena',
'host'='athena.<region>.amazonaws.com',
'port'='<port, typically 443>',
'user_key'='awssm://<my-username>',
'password_key'='awssm://<my-password>',
'jdbc.schema.name'='<Athena database name to connect to>',
'connection_properties'='{"AwsRegion":"<region>", "S3OutputLocation":"<The s3 default output path, can be found in Athena settings>"}'
);
Note: For
awsathena
, thejdbc.schema.name
is the actual Athena database name, following the Athena naming conventions.