Wiki source code of Connecteur Amazon Athena

Last modified by Aurelie Bertrand on 2026/01/12 15:14

Show last authors
1 {{ddtoc}}{{/ddtoc}}
2
3 ----
4
5 = Prerequisites =
6
7 You must have the Athena JDBC driver in the form of one or more JAR files and its documentation.
8
9 Digdash is only compatible with version 3.1.0 of the Athena JDBC driver. You can download it using this link: [[https:~~/~~/downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/3.1.0/athena-jdbc-3.1.0-lean-jar-and-separate-dependencies-jars.zip>>https://downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/3.1.0/athena-jdbc-3.1.0-lean-jar-and-separate-dependencies-jars.zip]]
10
11 = Installation =
12
13 == Deploying the files ==
14
15 1. //(Optional, if the webapps have not yet been deployed). //Start the DigDash Enterprise server and wait for the webapps to be fully deployed.
16 1. Stop the server.
17 1. Unzip the previously downloaded Athena archive.
18 1. Some of the files contained in the archive are already delivered with Digdash in a different version that conflicts with the driver.
19 Delete the following files from the **runtime-dependencies** folder:
20 1*. //httpclient-4.5.xx.jar//
21 1*. //httpcore-4.4.xx.jar//
22 1*. //slf4j-api-x.x.xx.jar//
23 1. Copy:
24 ✔ the remaining JAR files to the **runtime-dependencies** folder
25 ✔ the //athena-jdb-3.1.x.jar //file present at the root of the unzipped archive
26 to the **/home/digdash/webapps/default/ddenterpriseapi/WEB-INF/lib **and **/home/digdash/webapps/default/studio/WEB-INF/lib** folders.
27 1. The Athena JDBC driver must now be registered in DigDash Enterprise Server.
28
29 == Registering the Athena JDBC driver ==
30
31 To register the driver :
32
33 1. Edit the following file:
34 **<DD Install>/webapps/ddenterpriseapi/WEB-INF/classes/resources/config/sqldriverrepository.xml**
35 1. Add an XML entry to the **sqldriverrepository.xml** file, which looks like the following example:
36
37 {{code cssClass="notranslate" language="xml"}}
38 <SQLDriver id="ATHENA"
39 name="AWS Athena"
40 url="athena://"
41 manufacturer="Amazon Web Services"
42 class="com.amazon.athena.jdbc.AthenaDriver"
43 urlsample="jdbc:athena://"
44 availability="both">
45 <properties></properties>
46 </SQLDriver>
47 {{/code}}
48
49 (% class="box warningmessage" %)
50 (((
51 //Important : Some characters are reserved in XML: '**&'**, '**"**',**'<'** or**'>'**. So if you use some of these characters, make sure you encode them to their corresponding XML entities.//
52 )))
53
54 XML correspondences :
55
56 * **&** => **&amp;**
57 * "=> **&quot;**
58 * **<** => **&lt;**
59 * **>** => **&gt;**
60
61 Example :
62
63 * (FALSE) urlsample="jdbc:mydriver:dbtest?opt1=0&opt2="value""
64 * (TRUE) urlsample="jdbc:mydriver:dbtest?opt1=0&amp;opt2=&quot;value&quot;"
65
66 Parameters :
67
68 * **id **: an identifier used internally by DigDash Enterprise, choose a non-existent string, by convention in uppercase, without spaces
69 * **name **: The name of the JDBC driver displayed in the administration console interface.
70 * **url **: The URL prefix of the JDBC driver (without "jdbc:"). See the documentation supplied with the JDBC driver.
71 * **manufacturer **: The name of the vendor/developer of the JDBC driver
72 * **class**: path to the driver's main java class. See the documentation supplied with the JDBC driver.
73 //Optional: JDBC 4 standard JDBC drivers do not need the java class to be taken into account.//
74 * **urlsample **: Example of the URL displayed in the administration console interface.
75 * **availability **: reserved. Leave at "both".
76
77 (% class="box warningmessage" %)
78 (((
79 //Important: Deployment is lost when you update the ddenterpriseapi.war file. Follow this driver deployment procedure each time you update DigDash Enterprise.//
80 )))
81
82 == Advanced specific properties ==
83
84 Go to [[Add JDBC Driver>>doc:Digdash.deployment.Connectivity_Database.adding_jdbc_driver.WebHome||anchor="advanced_prop"]] Driver page for more information.
85
86 = Configuring the database connection =
87
88 To configure the database connection, proceed as described on the [[Database Connection Manager>>doc:Digdash.user_guide.studio.managers.dbconnections.WebHome]] using the following items:
89
90 1. From the Database **Type **drop-down list, select **SQL**.
91 1. From the **JDBC Driver** drop-down list, select **AWS Athena**.
92 1. Separate the**URL **as follows:
93 jdbc//:athena:**~/~/WorkGroup=xxx**;**Region=xxx**;**AccessKeyId=xxx**;**SecretAccessKey=xxx**;//
94 1. The user and password are already entered in the URL. There is therefore no need to enter them.