Configure JDBC account
Overview
You must create Generic JDBC Database Account to connect to data sources that you want to use in your pipelines. You can configure your account from SnapLogic Platform using the Designer or Manager.
Snap-account compatibility
All Snaps in the JDBC Snap Pack Snap Pack work with Generic JDBC Database Account :
| Snaps | Generic JDBC Database Account |
|---|---|
| Generic JDBC - Execute | |
| Generic JDBC - Insert | |
| Generic JDBC - Select | |
| Generic JDBC - Update |
Account encryption
| Standard Encryption | If you are using Standard Encryption, follow the High sensitivity settings under Enhanced Encryption. |
| Enhanced Encryption | If you have the Enhanced Account Encryption feature, the following describes
which fields are encrypted for each sensitivity level selected for this account:
|
Active Directory authentication
- JDBC Driver class:
com.microsoft.sqlserver.jdbc.SQLServerDriver - JDBC Connection URL:
jdbc:sqlserver://ServerNameFQDN:portNumber;databaseName=DBNAME
- In the account settings, add the following:
- Url property name and Url property value:
IntegratedSecurity | TrueAuthenticationScheme | JavaKerberos
- Enter your Active Directory Username and Password.
- Url property name and Url property value:
Connecting to Athena Database Using Athena JDBC Driver
Athena JDBC Driver 1.x versions are deprecated, and the Generic JDBC Snaps are not compatible with them. Therefore, we recommend you use Athena JDBC Driver 2.x or later for the AWS Athena database when using Generic JDBC Snaps.
Connecting to Cassandra Database Using Cassandra Simba Driver
To connect to the Cassandra database using the Cassandra Simba driver, ensure that the appropriate Simba JAR files are installed based on the version of JDK in the Snaplex node. Contact your Org admin to know the JDK in the Snaplex node. Learn more about the JAR version to be used: JDBC Install Guide.
Besides the JAR files, configure the following settings in the Account Settings when using the Cassandra Simba driver:
- JDBC Driver class:
"com.simba.cassandra.jdbc42.Driver" - JDBC URL:
jdbc:cassandra://<host>:<port>;AuthMech=1;UID=<user id>;PWD=<password>;DefaultKeyspace=<database name> - Database name: Auto detect
- For JDK 11 and above, use version 4.2 of the Cassandra Simba Driver.
- Of the JARs included with version 4.2, do not include the following since they are
already provided as part of the Snap pack:
-
asm-5.0.3.jar -
guava-16.0.1.jar -
jackson-annotations-2.6.0.jar -
jackson-core-2.6.3.jar -
jackson-databind-2.6.3.jar -
joda-time-2.9.1.jar -
metrics-core-3.1.2.jar -
snappy-java-1.1.2.6.jar -
slf4j-api-1.7.7.jar -
netty-transport-4.0.37.Final.jar -
netty-handler-4.0.37.Final.jar -
netty-common-4.0.37.Final.jar -
netty-codec-4.0.37.Final.jar -
netty-buffer-4.0.37.Final.jar
-
Typical JDBC Connection Properties for Various Databases
To download SAP HANA you must have an SAP ID and download it at http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/webcontent/uuid/402aa158-6a7a-2f10-0195-f43595f6fe5f
- Required File(s):
jconn4.jar - DRIVER CLASS:
com.sybase.jdbc4.jdbc.SybDriver - JDBC URL Format:
jdbc:sybase:Tds:<host>:<port2048>/<database>Example:
jdbc:sybase:Tds:10.0.0.2:2048, jdbc:sybase:Tds:mupp:5000/dbvistestThe jConnect JDBC driver is usually delivered as a zip file. First, you need to unzip this file and locate the jconn4.jar file, which usually is stored in the classes directory.
You can download the Sybase JDBC Driver from here.
Another open-source alternative to connect Sybase database is jTDS Drivers, which you can find at jTDS JDBC Driver.
- DRIVER CLASS: net.sourceforge.jtds.jdbc.Driver
- JDBC URL FORMAT:
jdbc:jtds:sybase://<host>[:<port>][/<database_name>]
Examples: jdbc:jtds:sybase://127.0.0.1:5000/SAMPLE
Examples
This section provides examples of JDBC connection details for different sources. Note that specifics may vary based on the Operating System or Database version.
Varies based on version. See HiveServer2 Clients - Apache Hive - Apache Software Foundation for general information on Hive JDBC Drivers for HiveServer2.
- JDBC Driver Jar: Varies based on version. Hive is usually provided as part of a
larger Hadoop cluster based on products from Cloudera, Hortonworks, or Amazon. You must
use the appropriate drivers for your Hive instance.
- Cloudera: The necessary driver and support jars can be acquired from Download Hive JDBC Driver 2.6.29.1037 | Cloudera .
- Hortonworks: The necessary driver and support jars can be acquired from Hive JDBC and ODBC Drivers - Hortonworks Data Platform .
-
Amazon EMR: The necessary driver and support jars can be acquired from Amazon EMR 2.x and 3.x AMI versions - Amazon EMR .
- JDBC Driver Class:
com.cloudera.hive.jdbc4.HS2Driver - JDBC URL:
jdbc:hive2://<host>:<port>
- JDBC jars:
shared/ifxjdbc.jar - JDBC Driver Class:
com.informix.jdbc.IfxDriver - JDBC URL:
jdbc:informix-sqll://cxdn-rpt.cx.claremont.edu:1550/hmudd:INFORMIXSERVER=cxdbreplica
Oracle does not support the JDBC-ODBC Bridge from Java 8 and recommends using JDBC drivers provided by the vendor for database. However, if the database vendor supports the JDBC ODBC bridge, then you can use it with the JDBC Snap Pack , but SnapLogic does not certify any JDBC ODBC bridge connections.
-
JDBC Driver Jar:
ngdbc.jar -
JDBC Driver Class:
com.sap.db.jdbc.Driver -
JDBC URL:
jdbc:sap://<host>:<port>/?currentschema=<your HANA Schema>
-
JDBC Driver Jar:
jconn4.jar -
JDBC Driver Class:
com.sybase.jdbc4.jdbc.SybDriver -
JDBC URL:
jdbc:sybase:Tds:<host>:<port2048>/<database>
-
JDBC Driver Jar:
terajdbc4_13.jar, tdgssconfig_13.jar -
JDBC Driver Class:
com.teradata.jdbc.TeraDriver -
JDBC URL:
jdbc:teradata://<host>:<port>/TMODE=ANSI,SHARSET=UTF8,DBS_PORT=1025
Troubleshooting
-
If you have several JDBC accounts, one for system A and another for system B, you must ensure that all drivers can be loaded. If driver A fails to load, then driver B will always fail, even if it is a valid driver, as this is the expected behavior of the JDBC driver registry. It loads all drivers and goes through them in sequence. If any driver fails in the process, all drivers loaded later will also fail. After fixing the failing account's driver, you must restart the JCC nodes.
- To disable the
mysql-cj-abandoned-connection-cleanupthread that is generated by MySQL JDBC driver, use the latest version of MySQL (later than 8.0.22) and add the following settings in the Node Properties:
| Key | Value |
|---|---|
jcc.jvm_options |
-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true
|
If the Snap fails to connect to the database, it retries three times.